Automation MCP Server Blog Pricing

XRechnung to UBL Conversion API

Convert an XRechnung XML invoice (CII or UBL syntax) to EN 16931 UBL or, with profile=peppol-bis-3, to Peppol BIS Billing.

POST https://api.invoicexml.com/v1/convert/xrechnung/to/ubl
  • Turns XRechnung into Peppol BIS
  • UBL or CII input, detected for you
  • Leitweg-ID and buyer reference kept
  • Validated against the chosen profile

Technical reference

Convert an XRechnung XML invoice (CII or UBL syntax, the root element is auto-detected) to UBL. By default the German XRechnung CIUS layer is dropped and the document is rebranded with the base EN 16931 customization, ready for any EN 16931-conformant consumer. Name a UBL profile in the optional profile field, such as peppol-bis-3, and the invoice declares that profile and is validated against its rules, ready for the Peppol network.

Code Example

curl -X POST https://api.invoicexml.com/v1/convert/xrechnung/to/ubl \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "[email protected]" \
  -F "profile=peppol-bis-3" \
  -F "validationLanguage=de"

Request

Parameter Type Description
file * binary The XML invoice file to convert.
profile string Optional. UBL profile of the converted invoice: en16931 (the default), peppol-bis-3, nlcius, ehf or pint, in any letter case. The invoice declares the profile's specification identifier (BT-24) and, where the profile requires one, its business process (BT-23), must meet the profile's requirements (for Peppol, the seller and buyer electronic addresses and a buyer or order reference), and is validated against the profile's rule set. With the default, the invoice declares plain EN 16931, whatever the uploaded file declared, and is validated against the EN 16931 rules. Any other value is rejected with a 400 (errorCode 4002).
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 converted UBL XML document.

Content-Type: application/xml

Useful resources

Companion material for integrating against the API.

Frequently Asked Questions

Which XRechnung syntax is accepted?

Both. XRechnung allows the invoice to be encoded as UBL or CII; the endpoint auto-detects the root element and converts either to UBL.

Is German-specific data lost?

No. The conversion preserves every EN 16931 Business Term, only the customization identifier (BT-24) is rebranded from XRechnung to the EN 16931 baseline, or to the profile you name. Buyer reference, Leitweg-ID, and other XRechnung-mandated fields remain in the document.

Can I send the converted invoice over Peppol?

Yes, with profile=peppol-bis-3. The invoice then declares the Peppol BIS Billing specification and business process identifiers and is validated against the Peppol rule set, including the German national rules. XRechnung already requires the electronic addresses and the buyer reference that Peppol routes on, so a valid XRechnung usually converts without further data. The exception is an address under the email scheme EM, which XRechnung allows and Peppol does not (PEPPOL-EN16931-CL008). The field also takes nlcius, ehf and pint, and defaults to en16931.

Is the output validated?

Yes. The generated UBL is validated against the rules of its profile: the EN 16931 Schematron rules by default, or the rules of the profile you name. Validation failures are returned as 400 with the specific rule violations.

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