Utility API

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
API-Key erforderlich

Der Abruf läuft nur mit gültigem Bearer-Key. Er zählt nicht auf dein Kontingent hoch, wird aber bei aufgebrauchtem Kontingent mit 429 abgewiesen. Cache die Antwort, wenn du sie häufig brauchst.

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://service.invoice-api.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": "Germany",
6 "label": "Germany (DE)",
7 "formats": [
8 "pdf",
9 "xrechnung",
10 "zugferd"
11 ],
12 "formatDetails": [
13 {
14 "code": "pdf",
15 "label": "PDF",
16 "kind": "pdf"
17 },
18 {
19 "code": "zugferd",
20 "label": "ZUGFeRD 2.3/2.4/2.5",
21 "kind": "einvoice"
22 },
23 {
24 "code": "xrechnung",
25 "label": "XRechnung 3.0/3.0.2",
26 "kind": "einvoice"
27 }
28 ]
29 },
30 {
31 "code": "AT",
32 "name": "Austria",
33 "label": "Austria (AT)",
34 "formats": [
35 "pdf",
36 "ebinterface",
37 "ubl"
38 ],
39 "formatDetails": [
40 {
41 "code": "pdf",
42 "label": "PDF",
43 "kind": "pdf"
44 },
45 {
46 "code": "ebinterface",
47 "label": "ebInterface",
48 "kind": "einvoice"
49 },
50 {
51 "code": "ubl",
52 "label": "UBL (Peppol BIS 3.0)",
53 "kind": "einvoice"
54 }
55 ]
56 }
57 ]
58}

Gekürzt auf zwei Länder — die echte Antwort enthält alle 37 Länder.

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

200 OK
json
1{
2 "code": "DE",
3 "name": "Germany",
4 "label": "Germany (DE)",
5 "formats": [
6 "pdf",
7 "xrechnung",
8 "zugferd"
9 ],
10 "formatDetails": [
11 {
12 "code": "pdf",
13 "label": "PDF",
14 "kind": "pdf"
15 },
16 {
17 "code": "zugferd",
18 "label": "ZUGFeRD 2.3/2.4/2.5",
19 "kind": "einvoice"
20 },
21 {
22 "code": "xrechnung",
23 "label": "XRechnung 3.0/3.0.2",
24 "kind": "einvoice"
25 }
26 ]
27}

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
namestringLändername auf Englisch, z. B. "Germany"
labelstringAnzeige-Label des Dienstes, z. B. "Germany (DE)"
formatsstring[]Format-Ids des Landes, PDF zuerst (z. B. "pdf", "xrechnung")
formatDetailsarrayDieselben Formate mit Anzeigename und Art

Format-Objekt

FeldTypBeschreibung
codestringFormat-Id für den Endpoint-Pfad (z. B. xrechnung)
labelstringAnzeigename des Formats, z. B. "XRechnung 3.0/3.0.2"
kind"pdf" | "einvoice""pdf" für eine PDF-Ausgabe, "einvoice" für ein E-Rechnungsformat

Unterstützte Länder & Formate

DEDeutschland
PDFZUGFeRD 2.3/2.4/2.5XRechnung 3.0/3.0.2
ATÖsterreich
PDFebInterfaceUBL (Peppol BIS 3.0)
CHSchweiz
PDFZUGFeRD (CH)QR-Bill
FRFrankreich
PDFFactur-X 1.0/1.08/1.09UBL (Peppol BIS 3.0)
ITItalien
PDFFatturaPA 1.2.3
ESSpanien
PDFFacturaeUBL (Peppol BIS 3.0)
NLNiederlande
PDFUBL (Peppol BIS 3.0 / NL-CIUS)
BEBelgien
PDFUBL (Peppol BIS 3.0)Factur-X
PLPolen
PDFKSeF FA(3) (national UBL slot)UBL (Peppol BIS 3.0)
PTPortugal
PDFCIUS-PT (national UBL)UBL (Peppol BIS 3.0)
AEVereinigte Arabische Emirate
PDFUBL (PINT-AE)
AUAustralien
PDFUBL (PINT AU-NZ)
BGBulgarien
PDFUBL (Peppol BIS 3.0)
CYZypern
PDFUBL (Peppol BIS 3.0)
CZTschechien
PDFISDOCUBL (Peppol BIS 3.0)
DKDänemark
PDFUBL (Peppol BIS 3.0)
EEEstland
PDFUBL (Peppol BIS 3.0)
FIFinnland
PDFUBL (Peppol BIS 3.0)
GBGroßbritannien
PDFUBL (Peppol BIS 3.0 / UK)
GRGriechenland
PDFmyDATA
HRKroatien
PDFUBL (Peppol BIS 3.0)
HUUngarn
PDFNAV
IEIrland
PDFUBL (Peppol BIS 3.0)
ISIsland
PDFUBL (Peppol BIS 3.0)
JPJapan
PDFUBL (PINT-JP)
LILiechtenstein
PDFQR-BillUBL (Peppol BIS 3.0)
LTLitauen
PDFUBL (Peppol BIS 3.0)
LULuxemburg
PDFUBL (Peppol BIS 3.0)
LVLettland
PDFUBL (Peppol BIS 3.0)
MTMalta
PDFUBL (Peppol BIS 3.0)
NONorwegen
PDFUBL (Peppol BIS 3.0)
NZNeuseeland
PDFUBL (PINT AU-NZ)
OMOman
PDFUBL (PINT-OM)
RORumänien
PDFeFactura (CIUS-RO)UBL (Peppol BIS 3.0)
SESchweden
PDFUBL (Peppol BIS 3.0)
SISlowenien
PDFUBL (Peppol BIS 3.0)
SKSlowakei
PDFUBL (Peppol BIS 3.0)

= Verfügbar

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 code aus der Response (z.B. xrechnung, zugferd) wird als format-Parameter in den anderen APIs verwendet, z.B. /api/v1/invoice/de/xrechnung/generate.