Converter API
Convert e-invoices between XRechnung, ZUGFeRD/Factur-X and UBL – lossless where the target profile allows it. Fields that cannot be mapped are reported as warnings.
Available today: combine Parser + Creator
LiveNo need to wait for the Converter API: the Parser API returns a canonical invoice JSON for every supported invoice, and the Creator API accepts it directly as input. Two API calls give you a complete conversion today – in this example: XRechnung to ZUGFeRD.
- 1Parse the source invoice – POST /api/v1/invoice/parse accepts XML or ZUGFeRD/Factur-X PDF (Base64) and auto-detects format and country.
- 2Optionally validate – the validate endpoint checks the invoice JSON against country rules without consuming your quota.
- 3Generate the target format – pass the invoice JSON unchanged to the target format's generate endpoint; set the ZUGFeRD profile via formatOptions.profile.
1# Works today – Parser + Creator API combined2 3# 1) Parse the source (auto-detects format & country)4INVOICE=$(curl -s -X POST https://service.invoice-api.xhub.io/api/v1/invoice/parse \5 -H "Authorization: Bearer sk_live_abc123..." \6 -H "Content-Type: application/json" \7 -d '{"data": "'$(base64 -i xrechnung.xml)'", "filename": "xrechnung.xml"}' \8 | jq '.invoice')9 10# 2) Generate the target format from the unchanged invoice JSON11jq -n --argjson inv "$INVOICE" '{invoice: $inv, formatOptions: {profile: "EN16931"}}' \12 | curl -s -X POST https://service.invoice-api.xhub.io/api/v1/invoice/de/zugferd/generate \13 -H "Authorization: Bearer sk_live_abc123..." \14 -H "Content-Type: application/json" \15 -d @- \16 | jq -r '.data' | base64 -d > rechnung-zugferd.pdfLimits: input invoices from 28 countries are recognized; output covers 11 formats across 14 countries. Conversion goes through the canonical invoice model – format-specific extra fields it does not cover are lost; the parse response flags them in warnings.
Bidirectional
Convert in both directions between all current formats
Validated
Automatic validation of source and target format against the official schemas (EN 16931, KoSIT)
PDF Included
ZUGFeRD conversion automatically generates a PDF/A-3
Conversion Matrix
| From | To |
|---|---|
| XRechnung 3.0 | ZUGFeRD / Factur-XUBL (Peppol BIS 3.0) |
| XRechnung 2.x | XRechnung 3.0ZUGFeRD / Factur-XUBL (Peppol BIS 3.0) |
| ZUGFeRD / Factur-X | XRechnung 3.0UBL (Peppol BIS 3.0) |
| UBL (Peppol BIS 3.0) | XRechnung 3.0ZUGFeRD / Factur-X |
Example
1# Planned API – not yet available2curl -X POST https://service.invoice-api.xhub.io/api/v1/invoice/convert \3 -H "Authorization: Bearer sk_live_abc123..." \4 -H "Content-Type: application/json" \5 -d '{6 "xml": "<?xml version=\"1.0\"?>\n<Invoice xmlns=\"urn:oasis:names:specification:ubl:schema:xsd:Invoice-2\">...</Invoice>",7 "sourceFormat": "xrechnung",8 "targetFormat": "zugferd"9 }'Alternative: Multipart File Upload
1# Planned API – not yet available2curl -X POST https://service.invoice-api.xhub.io/api/v1/invoice/convert \3 -H "Authorization: Bearer sk_live_abc123..." \4 -H "Content-Type: multipart/form-data" \5 -F "file=@xrechnung.xml" \6 -F "targetFormat=zugferd"Response
1{2 "success": true,3 "sourceFormat": "xrechnung",4 "targetFormat": "zugferd",5 "filename": "invoice-converted.pdf",6 "mimeType": "application/pdf",7 "hash": "sha256:xyz789...",8 "data": "JVBERi0xLjcKCjEgMCBvYmoKPDwKL1R5cGUgL0NhdGFsb2cK...",9 "errors": [],10 "warnings": []11}Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
xml | string | The XML invoice to convert | |
sourceFormat | string | - | Source format. Automatically detected if not specified |
targetFormat | string | Target format for conversion | |
profile | string | - | ZUGFeRD profile: MINIMUM, BASIC, BASIC-WL, EN16931, EXTENDED (Default: EN16931) |
validateSource | boolean | - | Validate source XML before conversion (Default: true) |
validateTarget | boolean | - | Validate target XML after conversion (Default: true) |
Format Values
xrechnungXRechnung 3.0
zugferdZUGFeRD 2.x
facturxFactur-X 1.0.x
ubl-peppolUBL (Peppol BIS 3.0)
ZUGFeRD and Factur-X are the same Franco-German hybrid standard (PDF/A-3 with embedded EN 16931 XML) – both values produce the same result. Older versions are auto-detected as source format; the target is always the current version.
ZUGFeRD Profiles
When converting to ZUGFeRD, you can specify the profile. The profile determines which fields are included in the XML.
MINIMUMRequired fields only, for simple invoices
BASICBasic information for automatic processing
BASIC-WLBASIC without line items (totals only)
EN16931EU standard, recommended for B2G (default)
EXTENDEDAll fields, maximum detail
ZUGFeRD PDF Generation
When converting to ZUGFeRD, a PDF/A-3 is automatically created with embedded XML. The PDF uses a standard layout. For custom PDF designs, use the Visualizer API (planned Q4/2026).
Typical Use Cases
You have created XRechnung invoices for authorities and want to send the same invoices as PDF with embedded XML to business customers.
You receive ZUGFeRD invoices from suppliers and need to convert them to XRechnung for further processing.
Migrate existing XRechnung invoices to the current version 3.0 for compatibility with current government systems.
Prepare French Factur-X invoices for the German market and send them to public contracting authorities.