> For the complete documentation index, see [llms.txt](https://docs.hos.accessacloud.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hos.accessacloud.com/atreemo-api/api-reference/atreemo-api-reference/relationship.md).

# Relationship

Api Methods for Relationship

## DeleteAllMasters

> Delete all masters by SlaveCtcID and RelationID

```json
{"openapi":"3.0.3","info":{"title":"Atreemo API","version":"0.1.0"},"tags":[{"name":"Relationship","description":"Api Methods for Relationship"}],"servers":[{"url":"https://apim-hospitality-dev-uksouth.azure-api.net/atreemo-api","description":"Local DEV APIM import draft only; not a deployed endpoint announcement."}],"security":[{"AtreemoBearer":[]}],"components":{"securitySchemes":{"AtreemoBearer":{"type":"http","scheme":"bearer","description":"Atreemo access token obtained by the caller from the Atreemo instance `POST /token` endpoint (OAuth2 password grant) and sent as `Authorization: Bearer <token>`. See the Authorisation guide."}},"schemas":{"RelationshipOutput":{"type":"object","properties":{"Error":{"type":"string","description":"Error description"},"IsValid":{"type":"boolean","description":"Specify whether The result action is valid to be executed or not"},"Response":{"type":"boolean","description":"The call status (if true so the relation was successfully added to CRM, if false an error has occured and you will find the description in the field \"Error\")"}}}}},"paths":{"/api/Relationship/DeleteAllMasters":{"delete":{"operationId":"RelationshipDeleteAllMasters","summary":"DeleteAllMasters","tags":["Relationship"],"description":"Delete all masters by SlaveCtcID and RelationID","parameters":[{"name":"SlaveCtcID","in":"query","schema":{"type":"integer","format":"int32"},"description":"Native query parameter. CLR int SlaveCtcID in the pinned controller signature.","required":true},{"name":"RelationID","in":"query","schema":{"type":"integer","format":"int32"},"description":"Native query parameter. CLR int RelationID in the pinned controller signature.","required":true}],"responses":{"200":{"description":"OK (sample status in the public collection).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RelationshipOutput"}}}}}}}}}
```

## DeleteAllSalves

> Delete all slaves by MasterCtcID and RelationID

```json
{"openapi":"3.0.3","info":{"title":"Atreemo API","version":"0.1.0"},"tags":[{"name":"Relationship","description":"Api Methods for Relationship"}],"servers":[{"url":"https://apim-hospitality-dev-uksouth.azure-api.net/atreemo-api","description":"Local DEV APIM import draft only; not a deployed endpoint announcement."}],"security":[{"AtreemoBearer":[]}],"components":{"securitySchemes":{"AtreemoBearer":{"type":"http","scheme":"bearer","description":"Atreemo access token obtained by the caller from the Atreemo instance `POST /token` endpoint (OAuth2 password grant) and sent as `Authorization: Bearer <token>`. See the Authorisation guide."}},"schemas":{"RelationshipOutput":{"type":"object","properties":{"Error":{"type":"string","description":"Error description"},"IsValid":{"type":"boolean","description":"Specify whether The result action is valid to be executed or not"},"Response":{"type":"boolean","description":"The call status (if true so the relation was successfully added to CRM, if false an error has occured and you will find the description in the field \"Error\")"}}}}},"paths":{"/api/Relationship/DeleteAllSalves":{"delete":{"operationId":"RelationshipDeleteAllSalves","summary":"DeleteAllSalves","tags":["Relationship"],"description":"Delete all slaves by MasterCtcID and RelationID","parameters":[{"name":"MasterCtcID","in":"query","schema":{"type":"integer","format":"int32"},"description":"Native query parameter. CLR int MasterCtcID in the pinned controller signature.","required":true},{"name":"RelationID","in":"query","schema":{"type":"integer","format":"int32"},"description":"Native query parameter. CLR int RelationID in the pinned controller signature.","required":true}],"responses":{"200":{"description":"OK (sample status in the public collection).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RelationshipOutput"}}}}}}}}}
```

## DeleteByMasterAndSalve

> Delete a Relationship by Master and Slave Customer ID

```json
{"openapi":"3.0.3","info":{"title":"Atreemo API","version":"0.1.0"},"tags":[{"name":"Relationship","description":"Api Methods for Relationship"}],"servers":[{"url":"https://apim-hospitality-dev-uksouth.azure-api.net/atreemo-api","description":"Local DEV APIM import draft only; not a deployed endpoint announcement."}],"security":[{"AtreemoBearer":[]}],"components":{"securitySchemes":{"AtreemoBearer":{"type":"http","scheme":"bearer","description":"Atreemo access token obtained by the caller from the Atreemo instance `POST /token` endpoint (OAuth2 password grant) and sent as `Authorization: Bearer <token>`. See the Authorisation guide."}},"schemas":{"RelationshipOutput":{"type":"object","properties":{"Error":{"type":"string","description":"Error description"},"IsValid":{"type":"boolean","description":"Specify whether The result action is valid to be executed or not"},"Response":{"type":"boolean","description":"The call status (if true so the relation was successfully added to CRM, if false an error has occured and you will find the description in the field \"Error\")"}}}}},"paths":{"/api/Relationship/DeleteByMasterAndSalve":{"delete":{"operationId":"RelationshipDeleteByMasterAndSalve","summary":"DeleteByMasterAndSalve","tags":["Relationship"],"description":"Delete a Relationship by Master and Slave Customer ID","parameters":[{"name":"MasterCtcID","in":"query","schema":{"type":"integer","format":"int32"},"description":"Native query parameter. CLR int MasterCtcID in the pinned controller signature.","required":true},{"name":"SlaveCtcID","in":"query","schema":{"type":"integer","format":"int32"},"description":"Native query parameter. CLR int SlaveCtcID in the pinned controller signature.","required":true}],"responses":{"200":{"description":"OK (sample status in the public collection).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RelationshipOutput"}}}}}}}}}
```

## GetByMaster

> Get relations by Master Customer

```json
{"openapi":"3.0.3","info":{"title":"Atreemo API","version":"0.1.0"},"tags":[{"name":"Relationship","description":"Api Methods for Relationship"}],"servers":[{"url":"https://apim-hospitality-dev-uksouth.azure-api.net/atreemo-api","description":"Local DEV APIM import draft only; not a deployed endpoint announcement."}],"security":[{"AtreemoBearer":[]}],"components":{"securitySchemes":{"AtreemoBearer":{"type":"http","scheme":"bearer","description":"Atreemo access token obtained by the caller from the Atreemo instance `POST /token` endpoint (OAuth2 password grant) and sent as `Authorization: Bearer <token>`. See the Authorisation guide."}},"schemas":{"RelationDetails":{"type":"object","nullable":true,"properties":{"RelationID":{"type":"integer","format":"int32"},"RelationName":{"type":"string","nullable":true},"CtcID":{"type":"integer","format":"int32"},"SourceID":{"type":"string","nullable":true}},"description":"Source-backed JSON members, including inheritance and JSON naming/ignore attributes. No property is required solely because its CLR value type is non-nullable. Runtime and deployment alignment are unverified."}}},"paths":{"/api/Relationship/GetByMaster":{"get":{"operationId":"RelationshipGetByMaster","summary":"GetByMaster","tags":["Relationship"],"description":"Get relations by Master Customer","parameters":[{"name":"CtcID","in":"query","schema":{"type":"integer","format":"int32"},"description":"Native query parameter. CLR int CtcID in the pinned controller signature.","required":true}],"responses":{"200":{"description":"OK (sample status in the public collection).","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RelationDetails"}}}}}}}}}}
```

## GetBySlave

> Get relations by Slave Customer

```json
{"openapi":"3.0.3","info":{"title":"Atreemo API","version":"0.1.0"},"tags":[{"name":"Relationship","description":"Api Methods for Relationship"}],"servers":[{"url":"https://apim-hospitality-dev-uksouth.azure-api.net/atreemo-api","description":"Local DEV APIM import draft only; not a deployed endpoint announcement."}],"security":[{"AtreemoBearer":[]}],"components":{"securitySchemes":{"AtreemoBearer":{"type":"http","scheme":"bearer","description":"Atreemo access token obtained by the caller from the Atreemo instance `POST /token` endpoint (OAuth2 password grant) and sent as `Authorization: Bearer <token>`. See the Authorisation guide."}},"schemas":{"RelationDetails":{"type":"object","nullable":true,"properties":{"RelationID":{"type":"integer","format":"int32"},"RelationName":{"type":"string","nullable":true},"CtcID":{"type":"integer","format":"int32"},"SourceID":{"type":"string","nullable":true}},"description":"Source-backed JSON members, including inheritance and JSON naming/ignore attributes. No property is required solely because its CLR value type is non-nullable. Runtime and deployment alignment are unverified."}}},"paths":{"/api/Relationship/GetBySlave":{"get":{"operationId":"RelationshipGetBySlave","summary":"GetBySlave","tags":["Relationship"],"description":"Get relations by Slave Customer","parameters":[{"name":"CtcID","in":"query","schema":{"type":"integer","format":"int32"},"description":"Native query parameter. CLR int CtcID in the pinned controller signature.","required":true}],"responses":{"200":{"description":"OK (sample status in the public collection).","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RelationDetails"}}}}}}}}}}
```

## GetRelationships

> Get available relationships

```json
{"openapi":"3.0.3","info":{"title":"Atreemo API","version":"0.1.0"},"tags":[{"name":"Relationship","description":"Api Methods for Relationship"}],"servers":[{"url":"https://apim-hospitality-dev-uksouth.azure-api.net/atreemo-api","description":"Local DEV APIM import draft only; not a deployed endpoint announcement."}],"security":[{"AtreemoBearer":[]}],"components":{"securitySchemes":{"AtreemoBearer":{"type":"http","scheme":"bearer","description":"Atreemo access token obtained by the caller from the Atreemo instance `POST /token` endpoint (OAuth2 password grant) and sent as `Authorization: Bearer <token>`. See the Authorisation guide."}},"schemas":{"Relationship":{"type":"object","properties":{"ID":{"type":"integer","format":"int32","description":"Relationship ID"},"Name":{"type":"string","description":"Relationship Name"}}}}},"paths":{"/api/Relationship/GetRelationships":{"get":{"operationId":"RelationshipGetRelationships","summary":"GetRelationships","tags":["Relationship"],"description":"Get available relationships","responses":{"200":{"description":"OK (sample status in the public collection).","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Relationship"}}}}}}}}}}
```

## Post

> Add a Relationship

```json
{"openapi":"3.0.3","info":{"title":"Atreemo API","version":"0.1.0"},"tags":[{"name":"Relationship","description":"Api Methods for Relationship"}],"servers":[{"url":"https://apim-hospitality-dev-uksouth.azure-api.net/atreemo-api","description":"Local DEV APIM import draft only; not a deployed endpoint announcement."}],"security":[{"AtreemoBearer":[]}],"components":{"securitySchemes":{"AtreemoBearer":{"type":"http","scheme":"bearer","description":"Atreemo access token obtained by the caller from the Atreemo instance `POST /token` endpoint (OAuth2 password grant) and sent as `Authorization: Bearer <token>`. See the Authorisation guide."}},"schemas":{"CtcRelationship":{"type":"object","properties":{"MasterCtcID":{"type":"integer","format":"int32","description":"The Master CtcID"},"RelationID":{"type":"integer","format":"int32","description":"Call api/Relationship/GetRelationships to get available relationships"},"SlaveCtcID":{"type":"integer","format":"int32","description":"The Slave CtcID"},"SourceID":{"type":"string","description":"The source of the call"}}},"RelationshipOutput":{"type":"object","properties":{"Error":{"type":"string","description":"Error description"},"IsValid":{"type":"boolean","description":"Specify whether The result action is valid to be executed or not"},"Response":{"type":"boolean","description":"The call status (if true so the relation was successfully added to CRM, if false an error has occured and you will find the description in the field \"Error\")"}}}}},"paths":{"/api/Relationship/Post":{"post":{"operationId":"RelationshipPost","summary":"Post","tags":["Relationship"],"description":"Add a Relationship","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CtcRelationship"}}}},"responses":{"200":{"description":"OK (sample status in the public collection).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RelationshipOutput"}}}}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.hos.accessacloud.com/atreemo-api/api-reference/atreemo-api-reference/relationship.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
