Utility APIKostenlos

Formats API

Ermittle alle unterstützten Länder und E-Rechnungsformate. Ideal für dynamische UI-Komponenten wie Dropdown-Menüs oder zur Validierung von Benutzereingaben.

GET/api/v1/invoice/formats
GET/api/v1/invoice/{countryCode}/formats
Formats API ist kostenlos!

Diese API verbraucht keine Billing-Quota. Du kannst die Formate beliebig oft abfragen.

Endpoints

GET/api/v1/invoice/formats

Gibt alle unterstützten Länder mit ihren verfügbaren E-Rechnungsformaten zurück. Ideal für Discovery und dynamische UI-Komponenten.

Use Cases: Dropdown-Menüs für Länderauswahl, Format-Picker, Dokumentation generieren

GET/api/v1/invoice/{countryCode}/formats

Gibt die verfügbaren E-Rechnungsformate für ein bestimmtes Land zurück. Nutze diesen Endpoint, wenn du bereits das Land kennst.

Path-Parameter

countryCode
required

ISO 3166-1 Alpha-2 Ländercode (z.B. DE, AT, FR)

Deutschland

/api/v1/invoice/DE/formats

Österreich

/api/v1/invoice/AT/formats

Frankreich

/api/v1/invoice/FR/formats

Code-Beispiele

bash
1curl -X GET 'https://api.invoice.xhub.io/api/v1/invoice/formats' \
2 -H 'Authorization: Bearer sk_test_xxx'

Response

/api/v1/invoice/formats

200 OK
json
1{
2 "countries": [
3 {
4 "code": "DE",
5 "name": "Deutschland",
6 "formats": [
7 {
8 "id": "PDF",
9 "name": "PDF",
10 "mimeType": "application/pdf",
11 "description": "Standard PDF Rechnung"
12 },
13 {
14 "id": "ZUGFERD",
15 "name": "ZUGFeRD 2.3",
16 "mimeType": "application/pdf",
17 "description": "PDF mit eingebettetem XML (EN16931)"
18 },
19 {
20 "id": "XRECHNUNG",
21 "name": "XRechnung 3.0",
22 "mimeType": "application/xml",
23 "description": "XML nach EN16931 (UBL/CII)"
24 }
25 ]
26 },
27 {
28 "code": "AT",
29 "name": "Österreich",
30 "formats": [
31 {
32 "id": "PDF",
33 "name": "PDF",
34 "mimeType": "application/pdf"
35 },
36 {
37 "id": "EBINTERFACE",
38 "name": "ebInterface",
39 "mimeType": "application/xml",
40 "description": "Österreichisches E-Rechnungsformat"
41 }
42 ]
43 }
44 ]
45}

/api/v1/invoice/{countryCode}/formats

200 OK
json
1{
2 "code": "DE",
3 "name": "Deutschland",
4 "formats": [
5 {
6 "id": "PDF",
7 "name": "PDF",
8 "mimeType": "application/pdf",
9 "description": "Standard PDF Rechnung"
10 },
11 {
12 "id": "ZUGFERD",
13 "name": "ZUGFeRD 2.3",
14 "mimeType": "application/pdf",
15 "description": "PDF mit eingebettetem XML (EN16931)"
16 },
17 {
18 "id": "XRECHNUNG",
19 "name": "XRechnung 3.0",
20 "mimeType": "application/xml",
21 "description": "XML nach EN16931 (UBL/CII)"
22 }
23 ]
24}

Error Response

404 Not Found

Wird zurückgegeben, wenn ein ungültiger Ländercode angegeben wird.

json
1{
2 "error": "NOT_FOUND",
3 "message": "Country 'XX' is not supported"
4}

Response-Schema

Country-Objekt

FeldTypBeschreibung
countriesarrayListe aller unterstützten Länder (nur bei /formats)
codestringISO 3166-1 alpha-2 Ländercode
namestringLokalisierter Ländername
formatsarrayListe der unterstützten Formate für das Land

Format-Objekt

FeldTypBeschreibung
idstringFormat-Identifier für API-Aufrufe (z.B. XRECHNUNG, ZUGFERD)
namestringAnzeigename des Formats (z.B. 'XRechnung 3.0')
mimeTypestringMIME-Type des Ausgabeformats (application/xml oder application/pdf)
descriptionstringOptionale Beschreibung des Formats

Unterstützte Länder & Formate

DEDeutschland
PDFZUGFeRD 2.3XRechnung 3.0
ATÖsterreich
PDFebInterface
CHSchweiz
PDFQR-Bill
FRFrankreich
PDFFactur-X
ITItalien
PDFFatturaPA
ESSpanien
PDFFacturae
NLNiederlande
PDFUBL
BEBelgien
PDFUBL
PTPortugalQ2.2026
PDF
PLPolenQ2.2026
PDF
CZTschechienQ2.2026
PDFISDOC
HUUngarnQ2.2026
PDFNAV
RORumänienQ2.2026
PDF
BGBulgarienQ2.2026
PDF

= Verfügbar | Q2.2026 = Geplant

Anwendungsfälle

Dynamische UI

Nutze die API, um Dropdown-Menüs für Länder- und Formatauswahl dynamisch zu befüllen. So bleiben deine UI-Komponenten immer aktuell.

Validierung

Validiere Benutzereingaben, bevor du die Creator- oder Converter-API aufrufst. Verhindere ungültige Land-Format-Kombinationen.

Dokumentation

Generiere automatisch Dokumentation für deine Anwendung mit den aktuell unterstützten Formaten und Ländern.

Format-ID verwenden

Die id aus der Response (z.B. XRECHNUNG, ZUGFERD) wird als format-Parameter in den anderen APIs verwendet, z.B. /api/v1/invoice/DE/XRECHNUNG/generate.