Open Reassign Pages
This endpoint allows a document to split, merge, re-arrange multiple page pdfs and create new documents. This functionality is useful for incorrectly split documents which can be split further, merged back together, and re-arranged as required.
POST Parameters
| Parameter | Required | Value | Description |
|---|---|---|---|
api_key | {key} | An API key that has access to the resource you want to query for. | |
source_document_id | {integer} | The source id of document you need to split, merge or re-arrange. | |
source_pages | {string} | Page or range of pages in the source document, for example 1 or 1-3. | |
target_type | {string} | The options are new or existing. "new" – creates a new document. "existing" – uses an existing target document. | |
target_document_id | {integer} | The target id of document if merging or re-arranging. | |
target_position | {integer} | The document page number where the source document(s) will be inserted into or merged; For example 4. |
Page Operations: Use target_type="new" to create a new document, or target_type="existing" with target_document_id to merge into an existing document.
Sample Request
POST https://api-app.xtracta.com/v1/documents/reassign_pages HTTP/1.1 api_key=123&source_document_id=123456&source_pages=1-3&target=new&target_document_id=234567&target_position=4
Sample Response
<?xml version="1.0" encoding="UTF-8"?>
<documents_response>
<status>200</status>
<message>The request has been successfully processed</message>
</documents_response>
Schema Definition
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
<xs:simpleType name="ConfidenceType">
<xs:union>
<xs:simpleType>
<xs:restriction base="xs:integer">
<xs:minInclusive value="0"/>
<xs:maxInclusive value="100"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value=""/>
</xs:restriction>
</xs:simpleType>
</xs:union>
</xs:simpleType>
<xs:element name="documents_response">
<xs:complexType>
<xs:sequence>
<xs:element name="status" type="xs:integer" minOccurs="0"/>
<xs:element name="message" type="xs:string" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>