Automation MCP Server Blog Pricing

CII to XRechnung Conversion API

Upgrade a UN/CEFACT CII EN 16931 invoice to an XRechnung-conformant document for German B2G portals.

POST https://api.invoicexml.com/v1/convert/cii/to/xrechnung
  • Your CII turned into XRechnung UBL
  • Full KoSIT rules checked
  • Leitweg-ID checked before delivery
  • Ready for ZRE and OZG-RE

Technical reference

Promote a plain UN/CEFACT CII 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.

Code Example

curl -X POST https://api.invoicexml.com/v1/convert/cii/to/xrechnung \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "[email protected]" \
  -F "validationLanguage=de"

Request

Parameter Type Description
file * binary The XML invoice file to convert.
validationLanguage string Optional. Language of the finding messages when the converted invoice is rejected: en (default), de or fr, in any letter case. Only each finding's message changes; rule, btCodes, fields and raw stay the same. Any other value is rejected with a 400 (errorCode 4002). See localized error messages.

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.

Content-Type: application/xml

Useful resources

Companion material for integrating against the API.

Frequently Asked Questions

Which CII versions are accepted?

CII in the schema release EN 16931 binds to, the same one 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.

Start free today

Ready to automate your invoices?

Validate, convert and embed compliant e-invoices through one API. Start your 30-day free trial. No credit card required.

GDPR Compliant No credit card required Setup in minutes
Peppol UBL
Factur-X
EN 16931
142 / 142 passed
Compliant
PDF/A-3 embedded