Converter API
Convert e-invoices between different formats without data loss. XRechnung, ZUGFeRD, Factur-X and UBL are supported bidirectionally.
Bidirectional
Convert in both directions between all supported formats
Validated
Automatic validation of source and target format against KoSIT schemas
PDF Included
ZUGFeRD conversion automatically generates a PDF/A-3
Conversion Matrix
| From | To |
|---|---|
| XRechnung 3.0 | ZUGFeRD 2.1Factur-X 1.0UBL 2.1 |
| XRechnung 2.3 | XRechnung 3.0ZUGFeRD 2.1ZUGFeRD 2.0 |
| ZUGFeRD 2.1 | XRechnung 3.0Factur-X 1.0UBL 2.1 |
| ZUGFeRD 2.0 | ZUGFeRD 2.1XRechnung 3.0 |
| Factur-X 1.0 | ZUGFeRD 2.1XRechnung 3.0UBL 2.1 |
| UBL 2.1 | XRechnung 3.0ZUGFeRD 2.1Factur-X 1.0 |
Example
1# Geplante API2curl -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-3.0",8 "targetFormat": "zugferd-2.1"9 }'Alternative: Multipart File Upload
1# Geplante API2curl -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=@rechnung.xml" \6 -F "targetFormat=zugferd-2.1"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
xrechnung-3.0XRechnung 3.0.2
xrechnung-2.3XRechnung 2.3
zugferd-2.1ZUGFeRD 2.1.1
zugferd-2.0ZUGFeRD 2.0.1
factur-x-1.0Factur-X 1.0
ubl-2.1UBL 2.1 (OASIS)
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 (Coming Soon).
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.