Utility API

Formats API

Retrieve all supported countries and e-invoice formats. Ideal for dynamic UI components like dropdown menus or for validating user inputs.

GET/api/v1/invoice/formats
GET/api/v1/invoice/{countryCode}/formats
API key required

The call only works with a valid bearer key. It is not metered against your quota, but it is refused with 429 once the quota is exhausted. Cache the response if you need it often.

Endpoints

GET/api/v1/invoice/formats

Returns all supported countries with their available e-invoice formats. Ideal for discovery and dynamic UI components.

Use Cases: Dropdown menus for country selection, format picker, generate documentation

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

Returns the available e-invoice formats for a specific country. Use this endpoint when you already know the country.

Path Parameters

countryCode
required

ISO 3166-1 alpha-2 country code (e.g. DE, AT, FR)

Germany

/api/v1/invoice/de/formats

Austria

/api/v1/invoice/at/formats

France

/api/v1/invoice/fr/formats

Code Examples

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}

Truncated to two countries — the real response contains all 37 countries.

/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

Returned when an invalid country code is specified.

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

Response Schema

Country Object

FieldTypeDescription
countriesarrayList of all supported countries (only for /formats)
codestringISO 3166-1 alpha-2 country code
namestringCountry name in English, e.g. "Germany"
labelstringThe service’s display label, e.g. "Germany (DE)"
formatsstring[]The country’s format ids, PDF first (e.g. "pdf", "xrechnung")
formatDetailsarrayThe same formats with display label and kind

Format Object

FieldTypeDescription
codestringFormat id for the endpoint path (e.g. xrechnung)
labelstringDisplay label of the format, e.g. "XRechnung 3.0/3.0.2"
kind"pdf" | "einvoice""pdf" for PDF output, "einvoice" for an e-invoice format

Supported Countries & Formats

DEGermany
PDFZUGFeRD 2.3/2.4/2.5XRechnung 3.0/3.0.2
ATAustria
PDFebInterfaceUBL (Peppol BIS 3.0)
CHSwitzerland
PDFZUGFeRD (CH)QR-Bill
FRFrance
PDFFactur-X 1.0/1.08/1.09UBL (Peppol BIS 3.0)
ITItaly
PDFFatturaPA 1.2.3
ESSpain
PDFFacturaeUBL (Peppol BIS 3.0)
NLNetherlands
PDFUBL (Peppol BIS 3.0 / NL-CIUS)
BEBelgium
PDFUBL (Peppol BIS 3.0)Factur-X
PLPoland
PDFKSeF FA(3) (national UBL slot)UBL (Peppol BIS 3.0)
PTPortugal
PDFCIUS-PT (national UBL)UBL (Peppol BIS 3.0)
AEUnited Arab Emirates
PDFUBL (PINT-AE)
AUAustralia
PDFUBL (PINT AU-NZ)
BGBulgaria
PDFUBL (Peppol BIS 3.0)
CYCyprus
PDFUBL (Peppol BIS 3.0)
CZCzech Republic
PDFISDOCUBL (Peppol BIS 3.0)
DKDenmark
PDFUBL (Peppol BIS 3.0)
EEEstonia
PDFUBL (Peppol BIS 3.0)
FIFinland
PDFUBL (Peppol BIS 3.0)
GBUnited Kingdom
PDFUBL (Peppol BIS 3.0 / UK)
GRGreece
PDFmyDATA
HRCroatia
PDFUBL (Peppol BIS 3.0)
HUHungary
PDFNAV
IEIreland
PDFUBL (Peppol BIS 3.0)
ISIceland
PDFUBL (Peppol BIS 3.0)
JPJapan
PDFUBL (PINT-JP)
LILiechtenstein
PDFQR-BillUBL (Peppol BIS 3.0)
LTLithuania
PDFUBL (Peppol BIS 3.0)
LULuxembourg
PDFUBL (Peppol BIS 3.0)
LVLatvia
PDFUBL (Peppol BIS 3.0)
MTMalta
PDFUBL (Peppol BIS 3.0)
NONorway
PDFUBL (Peppol BIS 3.0)
NZNew Zealand
PDFUBL (PINT AU-NZ)
OMOman
PDFUBL (PINT-OM)
RORomania
PDFeFactura (CIUS-RO)UBL (Peppol BIS 3.0)
SESweden
PDFUBL (Peppol BIS 3.0)
SISlovenia
PDFUBL (Peppol BIS 3.0)
SKSlovakia
PDFUBL (Peppol BIS 3.0)

= Available

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 code from the response (e.g. xrechnung, zugferd) is used as the formatparameter in the other APIs, e.g. /api/v1/invoice/de/xrechnung/generate.