Skip to main content
Import an invoice from documents

Authorizations

Authorization
string
header
required

Personal API key sent as a bearer token, together with X-Organization-Id. The key must have at least the access level the endpoint requires (read, write or admin).

Headers

X-Organization-Id
string

The organization to act in. Required for personal API keys; list the organizations you can access with GET /v1/organizations.

Idempotency-Key
string

Optional protection for safely retrying a request after a timeout or lost response. Choose a unique value (for example, a UUID) for each action and reuse it with the same input when retrying. Omit it for a normal request.

Required string length: 1 - 200
Pattern: ^[\x21-\x7e]+$

Body

application/json
primary_document_id
string<uuid>
required

The uploaded document that contains the invoice.

attachment_document_ids
string<uuid>[]

Up to 50 other uploaded documents, in order. Must not include the primary document.

Maximum array length: 50

Response

Idempotent replay: the same import in its current state.

id
string<uuid>
required
status
enum<string>
required
Available options:
queued,
running,
completed,
failed,
cancelled
origin
enum<string>
required

How the invoice was submitted.

Available options:
upload,
api,
email,
integration
supersedes_invoice
boolean
required

True when this import replaces an existing invoice from the same source.

deleted_at
string<date-time> | null
required
primary_document
object | null
required
source_count
integer
required
Required range: x >= 0
attachment_count
integer
required
Required range: x >= 0
retryable
boolean
required

Whether the import can be retried.

provenance
object
required
classification_reason
string | null
required
outcome
enum<string> | null
required
Available options:
imported,
duplicate,
not_invoice,
null
invoice_id
string<uuid> | null
required
workflow_run_id
string<uuid>
required
workflow_run_item_id
string<uuid>
required
failure
object | null
required
created_at
string<date-time>
required
updated_at
string<date-time>
required
sources
object[]
required
sources_next_cursor
string | null
required
evidence
object[]
required

The latest result of each extraction step, for diagnostics. More steps may be added.

Maximum array length: 4