v1
latestOpenAPI 3.1.02026-08-066378446.6 KBLink documents
<small>Requires an API token with the Document Manager role.</small>
Creates a relationship between the document referred to by the URL and another document. Allows representing relationships such as parent-child, amendment, renewal, etc. between documents.
The values that are sent in the request body will be normalised to create a "document relationship" where one of the documents is the "controller document" and the other is the "peripheral document". The resulting normalised relationship type will be one of the values defined in the DocumentRelationshipType enum. The normalised form of the relationship is what is returned in the response.
The following table shows how the different relationship types will be normalised and which role each of the documents will end up playing in the resulting relationship:
| Request relationship_type | Normalised type | URL document's role | Other document's role |
|---|---|---|---|
| parent_of | parent | controller_document | peripheral_document |
| child_of | parent | peripheral_document | controller_document |
| amendment_to | amendment | controller_document | peripheral_document |
| amended_by | amendment | peripheral_document | controller_document |
| renewal_of | renewal | controller_document | peripheral_document |
| renewed_by | renewal | peripheral_document | controller_document |
| addition_to | addition | controller_document | peripheral_document |
| added_to_by | addition | peripheral_document | controller_document |
| replacement_of | replacement | controller_document | peripheral_document |
| replaced_by | replacement | peripheral_document | controller_document |
| termination_of | termination | controller_document | peripheral_document |
| terminated_by | termination | peripheral_document | controller_document |
Path parameters
The document UUID
Request body
Example request
{
"other_document_uuid": "848b471e-2f1d-47c3-8c25-ad3f292097aa"
}Response
DocumentRelationshipResource
Example response
{
"data": {
"uuid": "c9872112-75dd-4d57-93ea-b8a305eabadb",
"controller_document": {
"uuid": "4df1e60a-0114-4dce-89e7-8c5ad397fcf2",
"name": "Kundenvertrag Muster GmbH",
"locale": "de-AT",
"template_uuid": "4df1e60a-0114-4dce-89e7-8c5ad397fcf2",
"parties": [
{
"uuid": "595703a2-b7f6-4772-a4b7-ab2f9fac3a9f",
"ref_uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"reference": "Employer",
"entity_name": "Demo Inc.",
"address": "1 Oxford Road\nHenley Bridge\nHB1 1PQ"
}
],
"links": {
"show": "https:...",
"latest_revision_pdf": "https:...",
"latest_revision_pdf_download": "https:..."
}
},
"peripheral_document": {
"uuid": "4df1e60a-0114-4dce-89e7-8c5ad397fcf2",
"name": "Kundenvertrag Muster GmbH",
"locale": "de-AT",
"template_uuid": "4df1e60a-0114-4dce-89e7-8c5ad397fcf2",
"parties": [
{
"uuid": "595703a2-b7f6-4772-a4b7-ab2f9fac3a9f",
"ref_uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"reference": "Employer",
"entity_name": "Demo Inc.",
"address": "1 Oxford Road\nHenley Bridge\nHB1 1PQ"
}
],
"links": {
"show": "https:...",
"latest_revision_pdf": "https:...",
"latest_revision_pdf_download": "https:..."
}
}
}
}