---
title: "Split pages of a document"
method: POST
path: "/v3/validate/{identifier}/split"
tags: ["Document API - Splitting"]
deprecated: true
---

# Split pages of a document

`POST /v3/validate/{identifier}/split`

> **Deprecated.**

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.

## Path parameters

- `identifier` string, required — Unique identifier for the document

## Request body

- DocumentEditRequest
  - `splits` DocumentSplit[], required
    - `identifier` string — Specify document identifier in the first split to signal that this is the root document where other splits are splitted from. Don't specify document identifier in subsequent splits.
    - `pages` DocumentSplitPage[], required
      - `id` integer, required — Page's ID
      - `rotation` integer — Specify a degree of rotation if you want to rotate a page. Possitive number for clockwise rotation, and negative number for counter-clockwise rotation.

## Response `200`

Successfully edited the document and re-parsing is underway.

- Meta[]
  - `identifier` string — Unique identifier for the document
  - `customIdentifier` string, nullable — Optional identifier for the document that you can set to track the document in the Affinda system. Is not required to be unique.
  - `fileName` string, nullable — Optional filename of the file
  - `ready` boolean — 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
  - `readyDt` string, date-time, nullable — The datetime when the document was ready
  - `failed` boolean — If true, some exception was raised during processing. Check the 'error' field of the main return object.
  - `expiryTime` string, date-time, nullable — The date/time in ISO-8601 format when the document will be automatically deleted. Defaults to no expiry.
  - `language` string, nullable — The document's language.
  - `pdf` string, 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).
  - `parentDocument` object, nullable — If this document is part of a splitted document, this attribute points to the original document that this document is splitted from.
    - `identifier` string — Unique identifier for the document
  - `childDocuments` object[] — If this document has been splitted into a number of child documents, this attribute points to those child documents.
    - `identifier` string — Unique identifier for the document
  - `pages` PageMeta[] — The document's pages.
    - `id` integer, required
    - `pageIndex` integer, required — Page number within the document, starts from 0.
    - `image` string, nullable, required — The URL to the image of the page.
    - `imageTranslated` string, nullable — The URL to the translated image of the page.
    - `height` number, required — Height of the page's image in px.
    - `width` number, required — Width of the page's image in px.
    - `rotation` integer, required — The degree of rotation applied to the page. Greater than 0 indicates clockwise rotation. Less than 0 indicates counter-clockwise rotation.
  - `isVerified` boolean — This is true if the 'confirm' button has been clicked in the Affinda validation tool
  - `reviewUrl` string, nullable — Signed URL (valid for 60 minutes) to access the validation tool. Not applicable for documents types such a resumes.
  - `ocrConfidence` number, nullable — The overall confidence in the conversion of image to text. (only applicable for images or PDF documents without a text layer)
  - `createdDt` string, date-time
  - `documentType` string
  - `regionBias` RegionBias, nullable
    - `country` string, nullable — A single alpha-2 country code (e.g. AU) used by google geocoding service
    - `countries` string[], nullable — A list of alpha-2 country codes used by Pelias
    - `squareCoordinates` number[], nullable — A list of coordinates used by Pelias in the shape of [min_lon, min_lat, max_lon, max_lat]
    - `strict` boolean — If true, the location must be within the region, as opposed to prefering locations within the region. Default to false.
  - `isOcrd` boolean

## Other responses

- `400` — Bad request. If it is a validation error will contain a list of each invalid field
- `401` — Authorisation error
- `default` — UnexpectedError

---

[API](https://skmtc.net/affinda/apis/affinda-api-2.md) · [All operations](https://skmtc.net/affinda/apis/affinda-api-2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/affinda/affinda-api-2/versions/6772e50cb58e/schema)
