Relation

Partial update relation

Update part of relation object.

patch/api/v1/relations/{relationID}

Path parameters

relationIDinteger required

A unique integer value identifying this relation.

Request body

idinteger

ID of the relation

type'edit' | 'attachment' | 'duplicate'

Type of relationship. Possible values are: edit, attachment, duplicate.

  • edit relation is created after editing annotation in user interface (rotation or split of the document)
  • attachment is a relationship representing the state that one or more documents are attachments to another document
  • duplicate relation is created after importing the same document that already exists in Rossum for current organization
keystring nullable

Key used to distinguish several instances of the same type.

  • For attachment relations, this is null
  • For duplicate relations, this is set to a hash of document content
  • For edit relations, this is typically null
parentstring uri nullable

URL of the parent annotation in case of 1-M relationship

annotationsstring[]

List of related annotations

urlstring uri

URL of the relation

Example request

{
  "id": 1,
  "type": "edit",
  "parent": "https://example.rossum.app/api/v1/annotations/123",
  "annotations": [
    "https://example.rossum.app/api/v1/annotations/124",
    "https://example.rossum.app/api/v1/annotations/125"
  ],
  "url": "https://example.rossum.app/api/v1/relations/1"
}

Response

OK

idinteger required

ID of the relation

type'edit' | 'attachment' | 'duplicate' required

Type of relationship. Possible values are: edit, attachment, duplicate.

  • edit relation is created after editing annotation in user interface (rotation or split of the document)
  • attachment is a relationship representing the state that one or more documents are attachments to another document
  • duplicate relation is created after importing the same document that already exists in Rossum for current organization
keystring nullable required

Key used to distinguish several instances of the same type.

  • For attachment relations, this is null
  • For duplicate relations, this is set to a hash of document content
  • For edit relations, this is typically null
parentstring uri nullable required

URL of the parent annotation in case of 1-M relationship

annotationsstring[] required

List of related annotations

urlstring uri required

URL of the relation

Example response

{
  "id": 1,
  "type": "edit",
  "parent": "https://example.rossum.app/api/v1/annotations/123",
  "annotations": [
    "https://example.rossum.app/api/v1/annotations/124",
    "https://example.rossum.app/api/v1/annotations/125"
  ],
  "url": "https://example.rossum.app/api/v1/relations/1"
}

Changes

No recorded changes to this endpoint across all 1 revision of this API.