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: 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": "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.4",
16 "mimeType": "application/pdf",
17 "description": "PDF mit eingebettetem XML (EN16931)"
18 },
19 {
20 "id": "XRECHNUNG",
21 "name": "XRechnung 3.0.2",
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.4",
14 "mimeType": "application/pdf",
15 "description": "PDF mit eingebettetem XML (EN16931)"
16 },
17 {
18 "id": "XRECHNUNG",
19 "name": "XRechnung 3.0.2",
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.2')
mimeTypestringMIME-Type des Ausgabeformats (application/xml oder application/pdf)
descriptionstringOptionale Beschreibung des Formats

Unterstützte Länder & Formate

DEDeutschland
PDFZUGFeRD 2.4XRechnung 3.0.2
ATÖsterreich
PDFebInterface
CHSchweiz
PDFQR-Bill
FRFrankreich
PDFFactur-X
ITItalien
PDFFatturaPA
ESSpanien
PDFFacturae
NLNiederlande
PDFUBL
BEBelgien
PDFUBL
PTPortugal
PDFSAF-TPeppol UBL
PLPolen
PDFKSeFPeppol UBL
CZTschechien
PDFISDOC
HUUngarn
PDFNAV
RORumänien
PDFeFacturaPeppol UBL
BGBulgarien
PDFUBL
SESchweden
PDFPeppol UBL
NONorwegen
PDFPeppol UBL
DKDänemark
PDFPeppol UBL
FIFinnland
PDFPeppol UBL
IEIrland
PDFPeppol UBL
GBGroßbritannien
PDFPeppol UBL
LULuxemburg
PDFPeppol UBL
MTMalta
PDFPeppol UBL
CYZypern
PDFPeppol UBL
SISlowenien
PDFPeppol UBL
EEEstland
PDFPeppol UBL
LVLettland
PDFPeppol UBL
LTLitauen
PDFPeppol UBL
GRGriechenland
PDFPeppol UBLmyDATA

= 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 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.