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 on status.
  • 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; treat Retry-After as a minimum delay.

Shape by status

  • awaiting_upload, queued, processing - identity, policy, and processing metadata only. No data, no validation.
  • completed, needs_review - include the invoice.v1 data tree and validation checks, plus processing.result_expires_at.
  • failed - carries the public error; 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.

Retention and deletion details