Convert UBL to CII using REST-API
Convert a UBL 2.1 XML invoice to a UN/CEFACT Cross Industry Invoice (CII) D16B XML document. The API maps every EN 16931 Business Term from UBL's flat cac:/cbc: component structure to the equivalent CII nested trade model, producing a validated CII document ready for ZUGFeRD or Factur-X embedding, or standalone CII delivery.
https://api.invoicexml.com/v1/convert/ubl/to/cii
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
Code Example
curl -X POST https://api.invoicexml.com/v1/convert/ubl/to/cii \ -H "Authorization: Bearer YOUR_API_KEY" \ -F "[email protected]"
Frequently Asked Questions
What UBL versions are accepted?
The endpoint accepts UBL 2.1 — the version adopted by EN 16931 and used by the Peppol network. Both <Invoice> and <CreditNote> document types are supported.
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. You can attach it to a PDF/A-3 container. Alternatively, use /v1/create/zugferd or /v1/create/facturx to generate the complete hybrid PDF.
Are all EN 16931 fields preserved?
Yes. The conversion maps every EN 16931 Business Term (BT) from UBL to CII. No semantic data is lost — only the XML syntax changes.
Does this work with Peppol BIS invoices?
Yes. Peppol BIS Billing 3.0 invoices are UBL 2.1 documents conforming to EN 16931. They convert cleanly to CII since both syntaxes express the same semantic model.
Is the output validated?
Yes. The generated CII document is validated against EN 16931 Schematron business rules before delivery. If validation fails, the API returns a 400 response with the specific rule violations.