Generate an EN 16931 invoice
generate_invoiceRead-onlyIdempotent
Create an EN 16931 e-invoice from structured data: Factur-X PDF/A-3, CII XML, or UBL 2.1 XML.
Use when you have the parties, lines and dates and need the document. To revise one, correct the input
and regenerate; save and deliver the returned file through your own system. Do not use when you already have a
visual PDF and CII XML: call embed_xml. To check a document you did not create here, call validate_invoice;
to read one, call extract_invoice.
Start invoice from get_invoice_example, replacing sample parties and dates. Leave totals and line
net_amount omitted to compute them from quantities, prices, allowances and charges. For ubl-xml,
profile must be en16931 or extended-ctc-fr; extended and basicwl are CII/PDF-only. profile selects
the XML model while check selects validation rules: use check=base for non-French invoices;
changing check does not disable party_check. language and footer_text affect only the visual PDF.
Omitted party_check enables registry checks only for extended-ctc-fr; true/false explicitly
overrides that default. Enabled checks send party identifiers/address and seller IBAN to EU Verify.
A not_ready verdict blocks output with field pointers. Successful checks add evidence ids;
registry outages do not block generation and are reported as warnings, not proof of readiness.
XSD/business-rule failures return a tool error with rule ids; fix the input and retry.
Requires an authenticated trial, prepaid or subscription allowance (OAuth or API key).
Each successful result uses one document operation, including repeated calls.
Returns a JSON text summary (totals, warnings, evidence) and an embedded resource: base64 PDF
or XML text. No invoice is stored or sent to a recipient.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| check | No | Rule set the output must pass before it is returned: fr-ctc (default) = EN 16931 + French CTC rules (BR-FR-*), base = EN 16931 only (non-French sellers). | fr-ctc |
| output | No | facturx-pdf (default): PDF/A-3 with the visual invoice and CII XML inside, the hybrid file French platforms accept. cii-xml: UN/CEFACT CII XML alone. ubl-xml: UBL 2.1 XML alone. | facturx-pdf |
| invoice | Yes | Invoice data: seller, buyer, lines, dates, payment terms. Amounts are decimal strings ("1200.00"), dates ISO 8601. Totals and the VAT breakdown are computed. Full JSON Schema in the resource facturx://schema/invoice. | |
| profile | No | EN 16931 conformance level written in the XML: en16931 (default, full semantic model), extended (optional business terms), extended-ctc-fr (French B2B mandate; parties are checked before the file is emitted), basicwl (no lines) | en16931 |
| language | No | Language of the visual PDF: fr (default) or en. Ignored when output is cii-xml or ubl-xml. | fr |
| footer_text | No | Optional text printed in the PDF footer. Omit it for no footer. Ignored for XML-only output. | |
| party_check | No | Ask EU Verify whether the seller and buyer are invoice-ready before emitting. true checks. false skips. Omit it and extended-ctc-fr checks, other profiles do not. not_ready is a tool error and no file is returned. |