Automation MCP Server Blog Pricing

ZUGFeRD to CII Conversion API

Extract the embedded CII XML from a ZUGFeRD PDF and return it as a standalone CII document.

POST https://api.invoicexml.com/v1/convert/zugferd/to/cii
  • Embedded CII as a standalone file
  • EN 16931 rules checked first
  • Embedded profile kept as declared
  • Findings in English, German or French

Technical reference

Upload a ZUGFeRD PDF/A-3 hybrid invoice and receive its embedded UN/CEFACT CII XML as a standalone file. The XML is shape-checked and validated against EN 16931 Schematron rules before delivery.

Code Example

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

Request

Parameter Type Description
file * binary The Factur-X or ZUGFeRD PDF 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 embedded CII XML document.

Content-Type: application/xml

Useful resources

Companion material for integrating against the API.

Frequently Asked Questions

How does this differ from /v1/extract/xml?

/v1/extract/xml streams the embedded XML out of the PDF as-is, without validation. /v1/convert/zugferd/to/cii returns the same XML but runs EN 16931 Schematron validation first, so a malformed embedded attachment surfaces as a 4001 response.

What happens if the PDF has no embedded XML?

The API returns a 400 response with errorCode 4006 (NoEmbeddedXml).

Which profile does the returned CII declare?

The profile the embedded XML declares, for example BASIC, EN 16931 or EXTENDED. The XML comes back as a standalone file named after your upload, ready for your ERP import or for further processing.

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