UBL to XRechnung Conversion API
Upgrade a UBL EN 16931 invoice to an XRechnung-conformant UBL document for German B2G portals.
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.
Useful resources
Companion material for integrating against the API.
Runnable samples in C#, Java, PHP, Python, Node.js, and browser JavaScript, one repository per format.
github.com/InvoiceXML
Run this endpoint on your own file or data straight from your browser, no code and no sign-up required.
www.invoicexml.com/api/convert/ubl/to/xrechnung
The full OpenAPI 3.1 document. Drop it into Postman, Insomnia, or any code generator to scaffold a client.
api.invoicexml.com/v1/openapi
Browse and call every endpoint directly from the browser, powered by Scalar.
api.invoicexml.com/v1/scalar
Frequently Asked Questions
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.