Formats API
Retrieve all supported countries and e-invoice formats. Ideal for dynamic UI components like dropdown menus or for validating user inputs.
/api/v1/invoice/formats/api/v1/invoice/{countryCode}/formatsThis API does not consume billing quota. You can query formats as often as you like.
Endpoints
/api/v1/invoice/formatsReturns all supported countries with their available e-invoice formats. Ideal for discovery and dynamic UI components.
Use Cases: Use Cases: Dropdown menus for country selection, format picker, generate documentation
/api/v1/invoice/{countryCode}/formatsReturns the available e-invoice formats for a specific country. Use this endpoint when you already know the country.
Path Parameters
countryCodeISO 3166-1 Alpha-2 Ländercode (z.B. DE, AT, FR)
Germany
/api/v1/invoice/DE/formatsAustria
/api/v1/invoice/AT/formatsFrance
/api/v1/invoice/FR/formatsCode Examples
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 OK1{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 OK1{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 FoundReturned when an invalid country code is specified.
1{2 "error": "NOT_FOUND",3 "message": "Country 'XX' is not supported"4}Response Schema
Country Object
| Field | Type | Description |
|---|---|---|
countries | array | List of all supported countries (only for /formats) |
code | string | ISO 3166-1 alpha-2 country code |
name | string | Localized country name |
formats | array | List of supported formats for the country |
Format Object
| Field | Type | Description |
|---|---|---|
id | string | Format identifier for API calls (e.g. XRECHNUNG, ZUGFERD) |
name | string | Display name of the format (e.g. 'XRechnung 3.0') |
mimeType | string | MIME type of the output format (application/xml or application/pdf) |
description | string | Optional description of the format |
Supported Countries & Formats
DEGermanyATAustriaCHSwitzerlandFRFranceITItalyESSpainNLNetherlandsBEBelgiumPTPortugalQ2.2026PLPolandQ2.2026CZCzech RepublicQ2.2026HUHungaryQ2.2026RORomaniaQ2.2026BGBulgariaQ2.2026= Available | Q2.2026 = Planned
Use Cases
Dynamic UI
Use the API to dynamically populate dropdown menus for country and format selection. This keeps your UI components always up to date.
Validation
Validate user inputs before calling the Creator or Converter API. Prevent invalid country-format combinations.
Documentation
Automatically generate documentation for your application with currently supported formats and countries.
Using Format IDs
The id from the response (e.g. XRECHNUNG, ZUGFERD) is used as the formatparameter in the other APIs, e.g. /api/v1/invoice/DE/XRECHNUNG/generate.