EU E-Invoice API
v1.0.1Validate, parse and generate EU e-invoices: XRechnung, ZUGFeRD, Peppol BIS, KSeF, FatturaPA.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
validate_invoice Validate e-invoice
Validate an XRechnung / EN 16931 invoice (CII or UBL XML), a Peppol BIS, CIUS-RO, Croatian eRačun (HR-CIUS), Polish KSeF FA(3) or Italian FatturaPA invoice, or a ZUGFeRD / Factur-X PDF against the official rules (KoSIT XRechnung, EN 16931 Schematron, FeRD, the French rules BR-FR for sellers in France, OpenPeppol, CIUS-RO, the Croatian HR-CIUS rules, the FA(3) and FatturaPA XML schemas plus the offline SDI controls, PDF/A-3 via veraPDF). The format is detected from the content. Returns `valid`, the detected format and profile, and every finding with rule id, severity, message and XPath.
| Parameter | Type | Description |
|---|---|---|
base64 | string | The invoice file (XML or PDF), base64-encoded. |
path | string | Local path of the invoice file (XML, or PDF with embedded XML). |
preview | boolean | Validate against the upcoming rule sets (published but not yet mandatory) instead of the rules in force, to check early whether invoices will still pass. Paid plans only. |
rulesets | array | Pin rule-set versions instead of the defaults, e.g. ["xrechnung@3.0.2"]. Call list_formats for the versions available. |
xml | string | The invoice XML as text (CII or UBL). |
parse_invoice Parse e-invoice to JSON
Read an XRechnung / EN 16931 XML or a ZUGFeRD / Factur-X PDF into normalized EN 16931 JSON (fields annotated with their BT numbers), validate it, and recompute the totals. Returns `invoice` (normalized JSON) plus `valid`, `findings` and `calculation` (declared vs computed totals). The `invoice` object can be edited and passed to generate_invoice.
| Parameter | Type | Description |
|---|---|---|
base64 | string | The invoice file (XML or PDF), base64-encoded. |
path | string | Local path of the invoice file (XML, or PDF with embedded XML). |
rulesets | array | Pin rule-set versions instead of the defaults, e.g. ["xrechnung@3.0.2"]. Call list_formats for the versions available. |
xml | string | The invoice XML as text (CII or UBL). |
generate_invoice Generate e-invoice
Generate an e-invoice (XRechnung, plain EN 16931, CIUS-RO, Peppol BIS, KSeF FA(3) or FatturaPA XML, or a ZUGFeRD / Factur-X PDF/A-3) from normalized EN 16931 JSON. Every document is validated by the API before it is returned; if it is not valid you get the findings instead. PDFs are written to a file and the path is returned. The specification identifier (BT-24) is set from `format`: when converting a parsed invoice to another format, remove `context.specificationIdentifier`.
| Parameter | Type | Description |
|---|---|---|
format * | string | xrechnung-cii / xrechnung-ubl: XRechnung XML. zugferd-en16931: ZUGFeRD 2.x / Factur-X PDF/A-3 (EN 16931 profile; for France set context.businessProcessType to the billing framework, e.g. S1). facturx-… |
invoice | object | The invoice as normalized EN 16931 JSON: the same shape parse_invoice returns in `invoice`. |
invoicePath | string | Local path of a JSON file with the normalized invoice (instead of `invoice`). |
outputPath | string | Where to write the generated file. PDFs are always written to a file; XML is also returned as text. |
overwrite | boolean | Replace outputPath if it exists (default false). |
pdfBase64 | string | PDF formats only: your own PDF/A, base64-encoded (instead of pdfPath). |
pdfPath | string | PDF formats only: your own PDF/A-1, -2 or -3 as the visual part. Without it a neutral layout is rendered. |
list_formats List formats and rule sets
List the rule-set versions the API validates against (the defaults and upcoming preview versions) and the invoice formats each one covers (GET /v1/formats). Use it to choose values for `rulesets`. Counts no documents.