Check an e-invoice
check_invoiceValidate an e-invoice _invoice block offline before rendering: checks EN 16931 fields, totals, VAT categories/codes, and French B2B rules, returning ok status and field-level problems.
Instructions
Checks the _invoice block of an e-invoice offline, as the API does before it renders one: the fields EN 16931 asks for, the totals to the cent, VAT categories and code lists, and France's rules for an invoice between two French businesses. Free, no units, nothing sent. Returns ok and problems, each with the field, the rule (BR-…) where one applies and a message. Nothing is computed for you: change the values a problem names, check again, then call render with einvoice and the block as data._invoice. The validator that runs during the render holds the file to the full rule set and to PDF/A-3b as well.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| invoice | Yes | The _invoice block as it goes into data._invoice: number, issue_date, currency, seller, buyer, lines, tax.breakdown, totals and payment, as https://docs.formfeed.dev/templates/e-invoices#invoice-block describes | |
| profile | No | The profile the render will ask for; en16931 when left out. basic cannot carry a rounding amount and is refused between two French businesses |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | ||
| problems | Yes |