API Quick Reference

All output formats at a glance

The XInvoice API supports four core output variants for e-invoicing. This page collects working examples for each format plus the polling flow for asynchronous requests.

Need to check a single invoice?

Use the web validator for quick browser-based checks with XML or ZUGFeRD PDF files.

Open validator

Need to automate e-invoicing?

Use the API for recurring validation, generation, and retrieval inside your software.

Open developer page

Format overview

The output format is controlled through `document_format` in the JSON body. `document_profile` is optional and only relevant for ZUGFeRD.

  • xrechnung_ubl - XRechnung 3.x as UBL 2.1 XML
  • xrechnung_cii - XRechnung 3.x as CII D16B XML
  • zugferd + EN16931 - ZUGFeRD 2.x EN16931 hybrid PDF
  • zugferd + XRECHNUNG - ZUGFeRD 2.x hybrid PDF with XRECHNUNG profile

1. Generate XRechnung UBL

The standard XML-only option. Useful for authority-facing and many B2B scenarios.

curl -X POST https://api.xinvoice.net/v1/invoices/generate \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "document_format": "xrechnung_ubl", "invoice_number": "INV-2026-001", "...": "..." }'
POST /v1/invoices/generate - XRechnung UBL

2. Generate XRechnung CII

Same payload structure, different syntax. Switch only `document_format` to `xrechnung_cii`.

curl -X POST https://api.xinvoice.net/v1/invoices/generate \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "document_format": "xrechnung_cii", "invoice_number": "INV-2026-002", "...": "..." }'
POST /v1/invoices/generate - XRechnung CII

3. Generate ZUGFeRD EN16931

Hybrid PDF with embedded CII XML, recommended for many B2B use cases.

curl -X POST https://api.xinvoice.net/v1/invoices/generate \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "document_format": "zugferd", "document_profile": "EN16931", "invoice_number": "INV-2026-003", "...": "..." }'
POST /v1/invoices/generate - ZUGFeRD EN16931

4. Generate ZUGFeRD XRECHNUNG

Hybrid PDF with XRECHNUNG profile when a PDF carrier plus German public profile is required.

curl -X POST https://api.xinvoice.net/v1/invoices/generate \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "document_format": "zugferd", "document_profile": "XRECHNUNG", "invoice_number": "INV-2026-004", "...": "..." }'
POST /v1/invoices/generate - ZUGFeRD XRECHNUNG

5. Poll for the result

Asynchronous requests return an `invoice_id`. Use it to retrieve the generated artifact or status.

curl https://api.xinvoice.net/v1/invoices/{INVOICE_ID} \
  -H "Authorization: Bearer YOUR_API_KEY"

# For ZUGFeRD PDFs you can also download the final PDF:
curl https://api.xinvoice.net/v1/invoices/{INVOICE_ID}/download-pdf \
  -H "Authorization: Bearer YOUR_API_KEY" \
  --output invoice.pdf
Polling and artifact download

6. Validate XML or PDF

The validation endpoint accepts raw XML, raw PDF, or a JSON invoice payload.

curl -X POST https://api.xinvoice.net/v1/invoices/validate \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/xml" \
  --data-binary @invoice.xml
POST /v1/invoices/validate