Document Relation

Create document relation

Create a new document relation object.

post/api/v1/document_relations

Request body

idinteger

ID of the document relation

type'export' | 'einvoice'

Type of relationship. Possible values:

  • export - Related documents are exports of the annotation data (e.g. in XML or JSON formats).
  • einvoice - Related documents were created during import of an einvoice (e.g. validation report, visualisation, ...)
keystring nullable

Key used to distinguish several relationships of the same type. Note: The combination of type, key and annotation attribute values must be unique.

annotationstring uri

Annotation

documentsstring[]

List of related documents

urlstring uri

URL of the relation

Example request

{
  "id": 1,
  "type": "export",
  "annotation": "https://example.rossum.app/api/v1/annotations/314159",
  "documents": [
    "https://example.rossum.app/api/v1/documents/124",
    "https://example.rossum.app/api/v1/documents/125"
  ],
  "url": "https://example.rossum.app/api/v1/document_relations/1"
}

Response

Created

idinteger required

ID of the document relation

type'export' | 'einvoice' required

Type of relationship. Possible values:

  • export - Related documents are exports of the annotation data (e.g. in XML or JSON formats).
  • einvoice - Related documents were created during import of an einvoice (e.g. validation report, visualisation, ...)
keystring nullable required

Key used to distinguish several relationships of the same type. Note: The combination of type, key and annotation attribute values must be unique.

annotationstring uri required

Annotation

documentsstring[] required

List of related documents

urlstring uri required

URL of the relation

Example response

{
  "id": 1,
  "type": "export",
  "annotation": "https://example.rossum.app/api/v1/annotations/314159",
  "documents": [
    "https://example.rossum.app/api/v1/documents/124",
    "https://example.rossum.app/api/v1/documents/125"
  ],
  "url": "https://example.rossum.app/api/v1/document_relations/1"
}

Changes