v1

latestOpenAPI 3.0.3MIT2026-08-04143307364.8 KB
Document API - Splitting

Split pages of a document

Split / merge / rotate / delete pages of a document. Documents with multiple pages can be splitted into multiple documents, or merged into one document. Each page can also be rotated. Edit operations will trigger re-parsing of the documents involved.

post/v3/validate/{identifier}/split

Path parameters

identifierstring required

Unique identifier for the document

Document's identifier

Request body

Example request

{
  "splits": [
    {
      "pages": [
        {
          "rotation": 90
        }
      ]
    }
  ]
}

Response

Successfully edited the document and re-parsing is underway.

identifierstring

Unique identifier for the document

customIdentifierstring nullable

Optional identifier for the document that you can set to track the document in the Affinda system. Is not required to be unique.

fileNamestring nullable

Optional filename of the file

readyboolean

If true, the document has finished processing. Particularly useful if an endpoint request specified wait=False, when polling use this variable to determine when to stop polling

readyDtstring date-time nullable

The datetime when the document was ready

failedboolean

If true, some exception was raised during processing. Check the 'error' field of the main return object.

expiryTimestring date-time nullable

The date/time in ISO-8601 format when the document will be automatically deleted. Defaults to no expiry.

languagestring nullable

The document's language.

pdfstring nullable

The URL to the document's pdf (if the uploaded document is not already pdf, it's converted to pdf as part of the parsing process).

isVerifiedboolean

This is true if the 'confirm' button has been clicked in the Affinda validation tool

reviewUrlstring nullable

Signed URL (valid for 60 minutes) to access the validation tool. Not applicable for documents types such a resumes.

ocrConfidencenumber nullable

The overall confidence in the conversion of image to text. (only applicable for images or PDF documents without a text layer)

createdDtstring date-time
documentTypestring
isOcrdboolean

Example response

[
  {
    "customIdentifier": "46ab8b02-0e5b-420c-877c-8b678d46a834",
    "fileName": "Document.pdf",
    "ready": true,
    "readyDt": "2020-12-10T01:43:32.276724Z",
    "language": "en",
    "pdf": "https://affinda-api.s3.amazonaws.com/media/documents/Document.pdf?AWSAccessKeyId=KEY&Signature=SIG&Expires=1663302062",
    "pages": [
      {
        "image": "https://affinda-api.s3.amazonaws.com/media/pages/Page.png?AWSAccessKeyId=KEY&Signature=SIG&Expires=1663302062",
        "imageTranslated": "https://affinda-api.s3.amazonaws.com/media/pages/PageTranslated.png?AWSAccessKeyId=KEY&Signature=SIG&Expires=1663302062",
        "height": 700,
        "width": 500,
        "rotation": 90
      }
    ],
    "reviewUrl": "https://app.affinda.com/review/XJ5kK123?signature=12345",
    "ocrConfidence": 0.97,
    "documentType": "resume",
    "regionBias": {
      "strict": true
    }
  }
]