Automation MCP Server Blog Pricing

XRechnung to CII Conversion API

Convert an XRechnung XML invoice (CII or UBL syntax) to plain EN 16931 CII XML.

POST https://api.invoicexml.com/v1/convert/xrechnung/to/cii
  • UBL or CII input, detected for you
  • Plain EN 16931 CII output
  • Ready for ZUGFeRD or Factur-X
  • Validated before delivery

Technical reference

Convert an XRechnung XML invoice (CII or UBL syntax, the root element is auto-detected) to a plain EN 16931 UN/CEFACT CII XML document. The German XRechnung CIUS layer is dropped, the document is rebranded with the base EN 16931 customization, and the output is ready for ZUGFeRD or Factur-X embedding, or standalone CII delivery.

Code Example

curl -X POST https://api.invoicexml.com/v1/convert/xrechnung/to/cii \
  -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 CII XML document.

Content-Type: application/xml

Useful resources

Companion material for integrating against the API.

Frequently Asked Questions

Which XRechnung syntax is accepted?

Both. XRechnung allows the invoice to be encoded as UBL or CII; the endpoint auto-detects the root element and converts either to CII.

Can I embed the output in a ZUGFeRD or Factur-X PDF?

Yes. The generated CII XML is structurally identical to the XML embedded in ZUGFeRD and Factur-X documents. Use POST /v1/embed/facturx or /v1/embed/zugferd to wrap it inside a PDF/A-3 container in a single call.

Is the output validated?

Yes. The generated CII is validated against EN 16931 Schematron rules. Validation failures are returned as 400 with the specific rule violations.

Can I get the validation messages in German or French?

Yes. Send validationLanguage=de or validationLanguage=fr with the upload, and the message of every finding comes back in that language. The rule, btCodes and fields stay the same in every language, so your code can keep matching on them.

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