CII to XRechnung Conversion API Reference
Promote a plain UN/CEFACT CII D16B EN 16931 invoice to an XRechnung-conformant document in UBL syntax, the XRechnung default across the API. Every EN 16931 business term is mapped from the CII nested model to UBL, the customization identifier (BT-24) is set to the latest XRechnung CIUS URN, German B2G constraints are applied, and the output is validated against the XRechnung Schematron rules before delivery. Ready for ZRE / OZG-RE submission.
https://api.invoicexml.com/v1/convert/cii/to/xrechnung
Code Example
curl -X POST https://api.invoicexml.com/v1/convert/cii/to/xrechnung \ -H "Authorization: Bearer YOUR_API_KEY" \ -F "[email protected]"
Request
| Parameter | Type | Description |
|---|---|---|
| file * | binary | The XML invoice file to convert. |
Content-Type: multipart/form-data
Headers
| Header | Value |
|---|---|
| Authorization * | Bearer YOUR_API_KEY |
| Content-Type | multipart/form-data |
Response
200 Converted XML
Returns the converted XRechnung UBL XML document.
Frequently Asked Questions
Which CII versions are accepted?
CII D16B, the version referenced by EN 16931 and used inside ZUGFeRD and Factur-X.
Does the output keep the CII syntax?
No. The output is XRechnung in UBL syntax, the default every XRechnung-producing route shares (XRechnung allows either syntax and both are legally equivalent). If your workflow needs the CII binding from this conversion, contact us and we will add the option.
Is the output validated?
Yes. The generated XRechnung is validated against the full XRechnung Schematron rule set on top of EN 16931. Missing German B2G fields (e.g. BT-10 buyer reference / Leitweg-ID) surface as 4001 validation failures.
Can I embed XRechnung in a ZUGFeRD or Factur-X PDF?
Yes, via the CII binding: the hybrid containers embed CII payloads. Create the invoice with POST /v1/create/xrechnung and options.syntax set to cii, then pass the result to /v1/embed/facturx or /v1/embed/zugferd to produce a hybrid PDF/A-3 with the XRechnung XML inside.