API reference
Five operations, one lifecycle.
Create a document, upload its file, confirm the upload, then retrieve the result. Every page here is rendered from the same OpenAPI source as the downloadable openapi.json, so the two always match.
On this page
Operations
/v1/documentsCreate document
Create an invoice document and upload authorization
createDocument/v1/documents/{document_id}/upload-completeConfirm upload
Confirm a direct upload and admit it for processing
completeDocumentUpload/v1/documents/{document_id}Retrieve document
Retrieve the current document resource
getDocument/v1/documents/{document_id}Delete document
Delete a document and its retained customer content
deleteDocument/v1/usageRetrieve usage
Retrieve current or historical processing usage
getUsageIntegration controls
- Send
Idempotency-Keyon create and keep its request body stable. - Treat
Retry-Afteras a minimum for polling and retry. - Upload with exactly the returned method, URL and headers; never add your API key or follow redirects.
- Branch on the final status, and save the result before
processing.result_expires_at. - Use
accounting_entity_idto keep duplicate detection separate per client or company. Choosepolicybefore you submit; see all review policy settings for required fields, line-item acceptance and duplicate detection.
Known error codes
invalid_request · invalid_callback_url · invalid_api_key · billing_required · forbidden · document_not_found · idempotency_conflict · upload_not_complete · invalid_document_state · upload_expired · document_expired · document_too_large · unsupported_content_type · upload_size_mismatch · invalid_document · usage_limit_exceeded · usage_period_not_found · rate_limit_exceeded · internal_error · service_unavailableUnknown future codes
New codes may be added. Keep an unknown code for logging, then recover using the HTTP status, retryable and the document’s current status. Never parse message text to decide what to do.
Versions
The /v1 routes, the invoice.v1 result schema, the SDK and this HTTP reference each have their own version and change independently.