How It Works Automation Blog Contact
EN FR DE

Convert CII to UBL using REST-API

Convert a UN/CEFACT Cross Industry Invoice (CII) XML document to UBL 2.1 XML. The API maps every EN 16931 Business Term from the CII nested structure to the equivalent UBL flat component model, producing a validated UBL 2.1 invoice ready for the Peppol network or any system that requires UBL syntax.

POST https://api.invoicexml.com/v1/convert/cii/to/ubl

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 Returns the converted UBL 2.1 XML document.
Content-Type: application/xml

Code Example

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

Frequently Asked Questions

What CII versions are accepted?

The endpoint accepts CII D16B — the version referenced by EN 16931. This is the same schema used inside ZUGFeRD and Factur-X files.

Is the output Peppol BIS 3.0 compliant?

The output is a valid UBL 2.1 document conforming to EN 16931. If the source CII contains all fields required by Peppol BIS Billing 3.0, the output will be Peppol-compliant.

Are all EN 16931 fields preserved?

Yes. The conversion maps every EN 16931 Business Term (BT) from CII to UBL. No semantic data is lost — only the XML syntax changes.

Can I convert ZUGFeRD or Factur-X embedded XML?

This endpoint expects standalone CII XML. Extract the embedded XML from a ZUGFeRD or Factur-X PDF first using /v1/extract/xml, then pass the result to this endpoint.

Is the output validated?

Yes. The generated UBL 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.