Annotation

Split annotation

Splits an annotation into multiple separate annotations by reorganizing and possibly also rotating its pages. Each resulting annotation will have its own document with the specified pages.

When using this endpoint, status of the original annotation is switched to split, status of the newly created annotations is importing and the extraction phase begins over again.

This endpoint can be used for splitting annotations also from webhook listening to annotation_content.initialize event and action.

post/api/v1/annotations/{annotationID}/split

Path parameters

annotationIDinteger required

Annotation ID

Request body

Example request

{
  "documents": [
    {
      "pages": [
        {
          "page": "https://example.rossum.app/api/v1/pages/12345",
          "rotation_deg": 90
        }
      ],
      "metadata": {
        "annotation": {
          "some_key": "some value"
        }
      }
    }
  ]
}

Response

Annotation split successfully

Example response

{
  "results": [
    {
      "annotation": "https://example.rossum.app/api/v1/annotations/67890",
      "document": "https://example.rossum.app/api/v1/documents/54321"
    }
  ]
}

Changes