Automation Features Blog Pricing Contact

Convert XRechnung to CII using REST-API

Convert an XRechnung XML invoice (CII or UBL syntax, the root element is auto-detected) to a plain EN 16931 UN/CEFACT CII D16B 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.

POST /v1/convert/xrechnung/to/cii

Code Example

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

Content-Type: application/xml

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 D16B.

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 2.x 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.