About this endpoint
What it does
This endpoint submits one or more PDF files for OCR-based auto-rotation so their page orientation can be corrected. It returns a batch identifier and a per-file job list with each job’s current status and progress.
Request Body
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| files | String Array | Yes | PDF files to auto-rotate. |
Response
Returns a JSON object with a batch_id string field and a jobs array field. Each item in jobs is an object with job_id (string), filename (string), status (string), progress (integer), and batch_id (string) fields.
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| batch_id | String | Yes | Parent id for this submit; also returned as X-Apy-Job-Id. |
| jobs | Object Array | Yes | Array of per-file job objects. Each job includes job_id, filename, status, progress, and batch_id. |
| jobs[].job_id | String | Yes | Job identifier for the individual file. |
| jobs[].filename | String | Yes | Name of the submitted PDF file. |
| jobs[].status | String | Yes | Current status of the individual job. |
| jobs[].progress | Integer | Yes | Progress value for the individual job. |
| jobs[].batch_id | String | No | Parent batch id this child belongs to. |
Notes
This endpoint kicks off an async job and returns immediately with a job identifier; the actual work runs in the background. Pair this call with the corresponding job_check endpoint — poll that until the status reaches a terminal state to retrieve the result. Use the batch_id field from the response, which is also returned as X-Apy-Job-Id.