AI-extract draft invoices from documents

POST/api/v1/invoices/ai-create

Upload pasted text, PDFs, images, Excel files, or a CSV to extract draft invoice entities using AI. Returns draft invoices ready for user review before creation.

Operation ID: ai_create_invoice_payload_api_v1_invoices_ai_create_post·View as markdown·OpenAPI slice

Authentication

Bearer token authentication. Pass your DayZero API token in the Authorization header and the target business UUID in x-business-id.

Request body

pasted_textstring

Raw text content to extract an invoice from. Limit 1 invoice per text input. Mutually exclusive with pasted_text_s3_key.

pasted_text_s3_keystring

S3 key of pasted text content. Limit 1 invoice per text input. Mutually exclusive with pasted_text.

single_invoice_s3_keysarray · string

S3 keys of individual invoice documents (PDFs, images, Excel). Each file is processed independently.

multi_invoice_s3_keystring

S3 key of a CSV file containing multiple invoices.

Responses

201Successful Response

successboolean
messagestring
codestring
dataInvoiceAICreatePayloadResponse

400Bad Request - Invalid input

401Unauthorized - Authentication required

403Forbidden - Insufficient permissions

422Validation Error

detailarray · ValidationErrorValidationError
5 fields
locarray · string | integerrequired
msgstringrequired
typestringrequired
inputobject
ctxobject