Read an e-invoice into JSON
parse_invoiceRead an existing e-invoice into JSON keyed on EN 16931 Business Terms.
The JSON is the input format of generate_invoice, so you can edit it and
create the invoice again.
Input: invoice_base64 is the base64 of an XML invoice (UBL or CII) or a
ZUGFeRD / Factur-X PDF, at most 4 MB decoded; or pass the file as a download
link in file. A PDF may have at most 500 pages and 16 attachments.
Returns model (the invoice as JSON), detection (syntax, flavor,
customization_id) and source ("xml" or "pdf-embedded"). A file that cannot
be read fails with an error that starts with an error code, e.g. a PDF without
embedded XML, a UBL credit note or malformed XML.
Credits: 2 per call.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | No | The file as a download link, instead of `invoice_base64`. In ChatGPT, pass the user's uploaded file here. Other clients can set `download_url` to a public https URL. | |
| invoice_base64 | No | The invoice file, base64-encoded. At most 4 MB decoded. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||