Automation MCP Server Blog Pricing

UBL to XRechnung Conversion API

Upgrade a UBL EN 16931 invoice to an XRechnung-conformant UBL document for German B2G portals.

POST https://api.invoicexml.com/v1/convert/ubl/to/xrechnung
  • Ready for German B2G portals
  • Full KoSIT rules checked
  • Leitweg-ID checked before delivery
  • Always the current XRechnung version

Technical reference

Promote a plain UBL EN 16931 invoice to an XRechnung-conformant document. The customization identifier (BT-24) is rebranded to the latest XRechnung CIUS URN, German B2G constraints are applied, and the output is validated against the XRechnung Schematron rules before delivery. Ready for ZRE / OZG-RE and other German portals.

Code Example

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

Request

Parameter Type Description
file * binary The XML invoice file 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 converted XRechnung UBL XML document.

Content-Type: application/xml

Useful resources

Companion material for integrating against the API.

Frequently Asked Questions

Which UBL versions are accepted?

UBL (the syntax adopted by EN 16931 and Peppol BIS Billing). Both <Invoice> and <CreditNote> document types are supported.

Does the output keep the UBL syntax?

Yes. The output is XRechnung encoded as UBL, the default every XRechnung-producing route shares (XRechnung allows either UBL or CII syntax). If you need the CII variant from this conversion, contact us and we will add the option.

Is the output validated?

Yes. The generated XRechnung is validated against the full XRechnung Schematron rule set on top of EN 16931. Missing German B2G fields (e.g. BT-10 buyer reference / Leitweg-ID) surface as 4001 validation failures.

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