Automation MCP Server Blog Pricing

AI PDF to CII API

Convert a PDF invoice into a UN/CEFACT Cross Industry Invoice XML document for European e-invoicing.

POST https://api.invoicexml.com/v1/transform/to/cii
  • Typed, scanned or photographed PDFs
  • Ready for ZUGFeRD and Factur-X
  • Totals checked against the PDF
  • Validated before delivery

Technical reference

Convert a PDF invoice into a standalone UN/CEFACT Cross Industry Invoice (CII) XML document. CII is the XML syntax that underpins both ZUGFeRD and Factur-X and is one of the two official syntaxes of the European EN 16931 standard.

Review every result before you use it

AI can make mistakes. Before you send the invoice or submit it to an authority, check every value in the XML against the source PDF, including the XML embedded in a ZUGFeRD or Factur-X PDF, not only the visual layer.

Code Example

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

Request

Parameter Type Description
file * binary The invoice file to process.
validationLanguage string Language of the finding messages when the generated invoice is rejected. Values: en, de, fr. Defaults to en. Only each finding's message changes; rule ids and field paths stay the same. Any other value is rejected with a 400 (errorCode 4002). See localized error messages.

Content-Type: multipart/form-data

The source and target formats are part of the endpoint path, and everything else (syntax, declared profile, specification identifier) is read from the document itself, so there is nothing more to configure.

Default texts the XML needs but the invoice does not state, such as the payment terms or the VAT exemption reason, are written in the language the invoice is written in: English, German or French, or English for any other language.

Headers

Header Value
Authorization * Bearer YOUR_API_KEY
Content-Type multipart/form-data

Response

200 Converted invoice

Returns the CII XML document.

Content-Type: application/xml

AI output requires human review of the structured data before use

With CII, the XML is the invoice. It is what the recipient's software and the tax authority process, so every value in it must be checked before you send it.

The XML is what the AI produced from your PDF. Compare these values in it against your source PDF:

  • Seller and buyer names, addresses and tax identifiers
  • Invoice number, issue date, due date and payment terms
  • Line items, quantities, unit prices and line totals
  • Tax rates, tax amounts and invoice totals
  • Payment details, such as the IBAN

To see the XML in a readable form:

The rendered PDF is built only from the XML values, so what you read there is exactly what the recipient's system receives. Only send, book or submit the invoice once every value matches. Our Terms of Service require this review for all AI output.

Useful resources

Companion material for integrating against the API.

Frequently Asked Questions

What is CII?

CII (Cross Industry Invoice) is an XML schema maintained by UN/CEFACT. It is one of the two syntaxes allowed by the European e-invoicing standard EN 16931, the other being UBL.

When should I use CII instead of UBL?

CII is the default syntax for ZUGFeRD and Factur-X invoices. Use CII when your trading partners or national regulations (e.g., Germany, France) expect CII-based documents.

Is the output embedded in a PDF?

No. This endpoint returns a standalone CII XML file. If you need the XML embedded inside a PDF/A-3, use the /v1/transform/to/facturx or /v1/transform/to/zugferd endpoints instead.

Is the XML validated?

Yes. Every generated CII document is validated against EN 16931 Schematron business rules before delivery to ensure compliance.

What CII version is used?

The API generates CII in the schema release EN 16931 binds to, ensuring compatibility with all European e-invoicing infrastructure.

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