Zum Hauptinhalt springen
Document Operations

Link documents

<small>Requires an API token with the Document Manager role.</small>

POST
/documents/{document}/linked-documents

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_typeNormalised typeURL document's roleOther document's role
parent_ofparentcontroller_documentperipheral_document
child_ofparentperipheral_documentcontroller_document
amendment_toamendmentcontroller_documentperipheral_document
amended_byamendmentperipheral_documentcontroller_document
renewal_ofrenewalcontroller_documentperipheral_document
renewed_byrenewalperipheral_documentcontroller_document
addition_toadditioncontroller_documentperipheral_document
added_to_byadditionperipheral_documentcontroller_document
replacement_ofreplacementcontroller_documentperipheral_document
replaced_byreplacementperipheral_documentcontroller_document
termination_ofterminationcontroller_documentperipheral_document
terminated_byterminationperipheral_documentcontroller_document
Authorizationstringheadererforderlich

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

documentstringerforderlich

The document UUID

Body

application/json
other_document_uuidstringerforderlich

UUID of the document to link to

Beispiel: 848b471e-2f1d-47c3-8c25-ad3f292097aa
relationship_typeenum<string>erforderlich

The type of relationship between the documents

Verfügbare Optionen: parent_of, child_of, amendment_to, amended_by, renewal_of, renewed_by, addition_to, added_to_by, replacement_of, replaced_by, termination_of, terminated_by
Beispiel: parent_of

Antwort

application/json

DocumentRelationshipResource

dataobjecterforderlich