Server
Our API infrastructure is hosted in Frankfurt, Germany, ensuring high performance and data sovereignty. The system is architected for reliability and scalability. For enterprise requirements, such as dedicated instances or specific geographic locations, please contact us.
Any Doc Split API - version 1 (v1)
This endpoint splits a stack of pages into separate documents so that each document only contains the pages that belong to it.
Click the following box to see the detailed description of this API if the box is not expanded.
Parameters
| api-key (header) |
API key which you will receive with your subscription here |
| file (form-data) |
File of the receipts or invoices. To be sent in the body as form-data with the key 'file'. If the document has multiple pages, you can attach them all as separate image files (supported image formats include: png, jpg, tif) or as a PDF.
|
Responses
| 200 |
OK is returned to indicate that the document was processed successfully.
The response is a JSON object with two fields:
- splits — a list of the detected document segments. Each segment is an array of two numbers, where the first number is the start page of the segment and the second number is the end page of the segment (1-based and inclusive). The segments are returned in the original page order and together cover every page of the upload.
- meta — additional information about the split. It currently contains emptyPages, a list of the 1-based page indexes that were detected as empty/blank (for example the blank backs of single-sided sheets scanned in duplex). These pages are folded into the preceding document and were skipped when deciding where to split. The list is empty when no empty pages were detected.
Suppose we have a document with 5 pages which needs to be splitted. We can split it into two segments: the first segment contains the first 3 pages and the second segment contains the last 2 pages. In this example page 3 was detected as an empty page, so it is reported under meta.emptyPages while still being part of the first segment.
An example result can look like this:
{
"splits": [
[
1,
3
],
[
4,
5
]
],
"meta": {
"emptyPages": [
3
]
}
}
|
| 403 |
BadCredentialException is used to indicate that for example the API key is not valid.
|
| 404 |
FileNotFoundException is used to indicate that there is no file found.
|
| 405 |
MethodNotAllowedException: Access to the API not allowed. There are multiple reasons possible: you reached the agreed quota, your contract expired or another internal error. Please contact us if the error persists.
|
| 500 |
InternalServerErrorException is used to indicate that something went wrong. Reason is not known.
|