Automation Features Blog Pricing Contact

Convert UBL to XRechnung using REST-API

Promote a plain UBL 2.1 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.

POST /v1/convert/ubl/to/xrechnung

Code Example

curl -X POST https://api.invoicexml.com/v1/convert/ubl/to/xrechnung \
  -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 XRechnung UBL XML document.

Content-Type: application/xml

Frequently Asked Questions

Which UBL versions are accepted?

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

Does the output keep the UBL syntax?

Yes. The output is XRechnung encoded as UBL (XRechnung allows either UBL or CII syntax). If you need the CII variant, use /v1/convert/cii/to/xrechnung after a syntax conversion, or contact us about adding an explicit ubl-to-xrechnung-cii flavour.

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.