API reference
Retrieve document
Retrieve the current document resource. Poll this endpoint until a terminal status, or receive an optional callback as an untrusted wakeup hint and fetch here with authenticated credentials.
On this page
GET/v1/documents/{document_id}
Path parameters
document_idstringrequired
The doc_… identifier returned by create document.
Responses
200- the document resource. Its shape is a discriminated union onstatus.404- unknown document for this account; tenant isolation never leaks existence across accounts.410-document_expired: the retained result passed its deadline and is gone.429- throttled; treatRetry-Afteras a minimum delay.
Shape by status
awaiting_upload,queued,processing- identity, policy, and processing metadata only. Nodata, novalidation.completed,needs_review- include theinvoice.v1datatree andvalidationchecks, plusprocessing.result_expires_at.failed- carries the publicerror; no usable result exists.
The data value validates against the standalone invoice.v1 JSON Schema. See the schema reference for field semantics.
Polling and retention
While queued or processing, responses may include a Retry-After header - treat it as a minimum delay. Terminal structured results are retained 7 days by default; persist what your workflow needs before processing.result_expires_at.