# Business relations links

Endpoints for defining and managing relationships between two business relations.

## POST /v1.1/business-relations/{crmCode}/links

> Link multiple business relations to a primary one

```json
{"openapi":"3.0.3","info":{"title":"Apentis API","version":"1.1.0"},"tags":[{"name":"Business relations links","description":"Endpoints for defining and managing relationships between two business relations."}],"servers":[{"url":"https://www.riskquadrant.com/api","description":"API for Production environment - Luxembourg"},{"url":"https://www.riskquadrant.ch/api","description":"API for Production environment - Switzerland"},{"url":"https://www.rq-test.com/api","description":"API for Test environment (for sandbox integration)"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"BusinessRelationLink":{"type":"object","required":["linkedCrmCode","role"],"properties":{"linkedCrmCode":{"type":"string","maxLength":100,"description":"The crmCode of the business relation to link (e.g., a person)."},"role":{"type":"string","enum":["Director","Board member","Trustee","Protector","Settlor","Beneficiary of the trust","Key person","Corporate director","President","Treasurer","Secretary","General partner","Limited partner","Beneficial owner","Member","Shareholder"],"description":"The role of the linked business relation in relation to the main one. Please see the GitBook documentation to see authorized links between entities."}}},"ErrorResponse":{"type":"object","properties":{"error":{"type":"string","description":"Short description of the error"},"code":{"type":"integer","description":"Application-specific or HTTP error code"}}}}},"paths":{"/v1.1/business-relations/{crmCode}/links":{"post":{"summary":"Link multiple business relations to a primary one","tags":["Business relations links"],"parameters":[{"in":"path","name":"crmCode","required":true,"schema":{"type":"string"},"description":"The primary business relation (e.g., a company)."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BusinessRelationLink"}}}}},"responses":{"201":{"description":"Links created successfully","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"linksCreated":{"type":"array","items":{"$ref":"#/components/schemas/BusinessRelationLink"}}}}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```

## Delete business relation links

> Deletes links for a given primary business relation. If the request body contains one or more objects with \`linkedCrmCode\` and \`role\`, only those specific links are deleted. If the request body is empty, or if no \`linkedCrmCode\` is provided, all links for the specified primary business relation are deleted.<br>

```json
{"openapi":"3.0.3","info":{"title":"Apentis API","version":"1.1.0"},"tags":[{"name":"Business relations links","description":"Endpoints for defining and managing relationships between two business relations."}],"servers":[{"url":"https://www.riskquadrant.com/api","description":"API for Production environment - Luxembourg"},{"url":"https://www.riskquadrant.ch/api","description":"API for Production environment - Switzerland"},{"url":"https://www.rq-test.com/api","description":"API for Test environment (for sandbox integration)"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"BusinessRelationLinkDeleteRequest":{"type":"array","items":{"type":"object","required":["linkedCrmCode","role"],"properties":{"linkedCrmCode":{"type":"string","maxLength":100,"description":"The CRM code of the related business relation to unlink."},"role":{"type":"string","enum":["Director","Board member","Trustee","Protector","Settlor","Beneficiary of the trust","Key person","Corporate director","President","Treasurer","Secretary","General partner","Limited partner","Beneficial owner","Member","Shareholder"],"description":"Role to remove from the relationship."}}}},"ErrorResponse":{"type":"object","properties":{"error":{"type":"string","description":"Short description of the error"},"code":{"type":"integer","description":"Application-specific or HTTP error code"}}}}},"paths":{"/v1.1/business-relations/{crmCode}/links":{"delete":{"summary":"Delete business relation links","description":"Deletes links for a given primary business relation. If the request body contains one or more objects with `linkedCrmCode` and `role`, only those specific links are deleted. If the request body is empty, or if no `linkedCrmCode` is provided, all links for the specified primary business relation are deleted.\n","tags":["Business relations links"],"parameters":[{"name":"crmCode","in":"path","required":true,"schema":{"type":"string"},"description":"The CRM code of the primary business relation."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BusinessRelationLinkDeleteRequest"}}}},"responses":{"200":{"description":"Links deleted successfully","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"deletedLinks":{"type":"array","items":{"type":"object","properties":{"linkedCrmCode":{"type":"string"},"role":{"type":"string"}}}}}}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://apentis.gitbook.io/apentis-api/api-reference/business-relations-links.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
