Convert ZUGFeRD PDF to UBL using REST-API
Upload a ZUGFeRD 2.x PDF/A-3 hybrid invoice and receive a UBL 2.1 XML document. The API extracts the embedded factur-x.xml, maps every EN 16931 Business Term from the CII nested model to the UBL flat component structure, and validates the result against the EN 16931 Schematron rules.
POST
https://api.invoicexml.com/v1/convert/zugferd/to/ubl
Code Example
curl -X POST https://api.invoicexml.com/v1/convert/zugferd/to/ubl \ -H "Authorization: Bearer YOUR_API_KEY" \ -F "[email protected]"
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 Converted XML
Returns the converted UBL 2.1 XML document.
Content-Type: application/xml
Frequently Asked Questions
What happens if the PDF has no embedded XML?
The API returns a 400 response with errorCode 4006 (NoEmbeddedXml). For PDFs without an embedded XML attachment, use POST /v1/transform/to/ubl (AI extraction).
Are all EN 16931 fields preserved?
Yes. The conversion maps every EN 16931 Business Term from CII to UBL; no semantic data is lost.