Automation MCP Server Features Blog Pricing Contact
POST /v1/convert/cii/to/ubl

CII to UBL Converter API

Convert UN/CEFACT CII D16B invoices into UBL 2.1 with one REST call. The deeply nested CII trade model is remapped onto UBL's component structure, every EN 16931 Business Term preserved, and the output is Schematron-validated and ready for the Peppol network.

The typical use case: your invoices originate as CII, standalone or extracted from ZUGFeRD and Factur-X hybrids, but your access point, marketplace, or buyer platform only accepts UBL. This endpoint is the bridge, maintained server-side so you never track EN 16931 artefact releases yourself.

Bash
curl -X POST https://api.invoicexml.com/v1/convert/cii/to/ubl \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "[email protected]" \
  -o invoice-ubl.xml
200 OK · Application/XML
<?xml version="1.0" encoding="UTF-8"?>
<Invoice xmlns="urn:oasis:names:specification:ubl
  :schema:xsd:Invoice-2">
  <cbc:CustomizationID>urn:cen.eu:en16931:2017</cbc:CustomizationID>
  <cbc:ID>INV-2026-0117</cbc:ID>
  <cac:AccountingSupplierParty></cac:AccountingSupplierParty>
</Invoice>

REST API Demo

Convert a CII invoice to UBL now

This demo calls the same POST /v1/convert/cii/to/ubl endpoint your integration will use. Drop a CII D16B XML file and the converted UBL 2.1 document downloads immediately.

Drop a CII D16B XML file to test the API

or browse files to upload

REST API demo · POST /v1/convert/cii/to/ubl · XML · Max 20 MB

Your file is processed in memory and deleted immediately. Nothing is stored.

Why teams convert CII to UBL

CII dominates the German and French hybrid formats; UBL dominates network delivery. Most cross-border pipelines eventually need this exact hop.

Deliver over Peppol

Peppol BIS Billing 3.0 is UBL-based. If your system produces CII (or ZUGFeRD hybrids whose payload is CII), converting to UBL is the prerequisite for handing the invoice to your Peppol access point.

Unwrap ZUGFeRD and Factur-X

Received hybrid PDFs carry CII inside. Chain POST /v1/extract/xml with this endpoint to turn any incoming ZUGFeRD or Factur-X invoice into UBL for a UBL-only AP system, or call /v1/convert/facturx/to/ubl to do both in one request.

UBL-first markets

The Netherlands (NLCIUS), Norway (EHF), and most Peppol-centric platforms specify UBL. Converting once at the boundary lets a CII-based billing system serve those markets without a second document generator.

A semantic mapping, not a stylesheet

Nested trade model unwound

CII splits invoice data across ApplicableHeaderTradeAgreement, Delivery, and Settlement inside SupplyChainTradeTransaction. The converter relocates each EN 16931 Business Term to its UBL component, resolving the grouping differences (payment means, allowances, tax breakdowns) that trip up hand-written XSLT.

Correct document typing

CII expresses invoices and credit notes through one root plus a type code. The converter reads BT-3 and emits the correct UBL document, an Invoice or a CreditNote root with the element names each schema requires.

Totals that reconcile

Monetary totals, rounding amounts, prepaid amounts, and VAT category breakdowns transfer exactly, so EN 16931 arithmetic rules (BR-CO-10 through BR-CO-15) hold on the UBL side just as they did in the source.

Validated before delivery

Every output document passes the EN 16931 Schematron rule set before it is returned. Failures come back as HTTP 400 with rule IDs and field paths instead of a corrupt download.

One request, one converted document

Send the CII file as multipart/form-data. The response body is the converted UBL 2.1 XML, ready to save or forward to your access point.

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

On success you receive the UBL document with Content-Type application/xml. On a validation failure you receive HTTP 400 with structured, human-readable findings.

Complete UBL Toolkit

Everything you need to create, convert, validate, and preview UBL invoices, via REST API or online.

Frequently Asked Questions

Can I convert the XML inside a ZUGFeRD or Factur-X PDF?

Yes, in two calls. First pull the embedded CII out of the hybrid PDF with POST /v1/extract/xml, then pass the standalone XML to this endpoint. The embedded XML in ZUGFeRD 2.x and Factur-X is exactly the CII D16B this converter expects. If you skip the extraction, use /v1/convert/facturx/to/ubl or /v1/convert/zugferd/to/ubl, which accept the PDF directly.

Is the UBL output usable on the Peppol network?

The output is a valid UBL 2.1 document conforming to EN 16931, which is the syntax Peppol BIS Billing 3.0 builds on. If the source CII carries all the fields Peppol additionally mandates (endpoint IDs with scheme identifiers, for example), the converted document passes Peppol validation. Run it through POST /v1/validate/ubl to confirm before sending.

Is any invoice data lost in the conversion?

No. UBL and CII are two syntax bindings of the same EN 16931 semantic model, and the converter maps every Business Term present in the source. Amounts, VAT categories, payment terms, and line data arrive in the UBL output unchanged.

Which CII version does the endpoint accept?

CII D16B, the UN/CEFACT release referenced by EN 16931. It is the same schema used inside ZUGFeRD 2.x and Factur-X, and the format produced by most German and French e-invoicing systems.

What happens when the source document is invalid?

The generated UBL is validated against the EN 16931 Schematron rules before delivery. If the result would violate a business rule, the API returns HTTP 400 with each finding as a structured object: rule ID, plain-language message, and the field path it maps to. You never receive a silently broken file.

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