PDF Extractor Docs

Public interface

API contract

Upload a document

POST /api/v1/documents

Send a multipart form with one field named file. The field must contain a PDF.

{
"job_id": "a UUID value",
"status": "PROCESSING"
}

The server returns HTTP 202 Accepted.

Read job status

GET /api/v1/jobs/{job_id}

{
"job_id": "a UUID value",
"filename": "invoice.pdf",
"status": "PROCESSING",
"result_available": false,
"error": null
}

Possible status values are PENDING, PROCESSING, COMPLETED, FAILED, and CANCELLED.

Read the result

GET /api/v1/jobs/{job_id}/result

{
"job_id": "a UUID value",
"status": "COMPLETED",
"data": {},
"metadata": {}
}

The server returns HTTP 409 Conflict when extraction is not complete.

Error response

{
"error": {
"code": "INVALID_PDF",
"message": "Upload a PDF file."
}
}

Common error codes are INVALID_PDF, JOB_NOT_FOUND, RESULT_NOT_AVAILABLE, and EXTRACTION_SUBMISSION_FAILED.