OpenAPI Specification
Our complete API is available as an OpenAPI 3.1 specification. Use it for code generation, API clients, or interactive documentation.
Download
API Endpoints
The most important endpoints of the Invoice-api.xhub API (Version 1.0.0):
/api/v1/invoice/{countryCode}/{format}/generate/api/v1/invoice/parse/api/v1/invoice/{countryCode}/validate/api/v1/invoice/{countryCode}/formats/api/v1/invoice/formatsAuthentication
Bearer Token
Authenticate with your API key in the Authorization header:
1Authorization: Bearer sk_live_xxxxxxxxxxxxx2 3# Testmodus4Authorization: Bearer sk_test_xxxxxxxxxxxxxLive Keys (sk_live_*) are for production data. Test Keys (sk_test_*) are for development and testing.
Supported Countries
The API supports e-invoice formats for the following countries:
Germany
Austria
Switzerland
France
Italy
Spain
Netherlands
Belgium
Portugal
Poland
Czech Republic
Hungary
Romania
Bulgaria
Preview
Excerpt from the OpenAPI specification:
1openapi: 3.1.02info:3 title: Invoice-api.xhub API4 version: 1.0.05 description: E-Rechnung API für XRechnung, ZUGFeRD und Peppol6 7servers:8 - url: https://service.invoice-api.xhub.io/v19 description: Production10 - url: https://sandbox.service.invoice-api.xhub.io/v111 description: Sandbox12 13paths:14 /api/v1/invoice/{countryCode}/{format}/generate:15 post:16 summary: Generate E-Invoice17 description: Erstellt eine E-Rechnung im gewählten Format18 parameters:19 - name: countryCode20 in: path21 required: true22 schema:23 type: string24 enum: [DE, AT, CH, FR, IT, ES, NL, BE, PT, PL, CZ, HU, RO, BG]25 - name: format26 in: path27 required: true28 schema:29 type: string30 security:31 - bearerAuth: []32 # ...33 34 /api/v1/invoice/{countryCode}/validate:35 post:36 summary: Validate E-Invoice37 description: Validiert eine E-Rechnung (kostenlos)38 # ...39 40components:41 securitySchemes:42 bearerAuth:43 type: http44 scheme: bearer45 description: "API Key (sk_live_* oder sk_test_*)"46 # ...Import into API Clients
Postman
1# Via URL importieren21. Öffne Postman32. Klicke auf "Import" (oben links)43. Wähle "Link" Tab54. Füge ein: https://service.invoice-api.xhub.io/docs65. Klicke "Continue" → "Import"7 8# Alternativ: Collection herunterladen9curl -O https://service.invoice-api.xhub.io/postman-collection.jsonInsomnia
1# Via URL importieren21. Öffne Insomnia32. Application → Preferences → Data43. "Import Data" → "From URL"54. URL: https://service.invoice-api.xhub.io/openapi.json65. "Fetch and Import"Code Generation
Generate type-safe API clients from the OpenAPI specification:
1# TypeScript/JavaScript mit openapi-typescript2npx openapi-typescript https://service.invoice-api.xhub.io/openapi.json -o ./types/api.d.ts3 4# Python mit openapi-python-client5pip install openapi-python-client6openapi-python-client generate --url https://service.invoice-api.xhub.io/openapi.json7 8# Go mit oapi-codegen9go install github.com/deepmap/oapi-codegen/cmd/oapi-codegen@latest10oapi-codegen -package api https://service.invoice-api.xhub.io/openapi.json > api/api.gen.goVersioning
The OpenAPI specification is updated with API changes. Use the version number in the spec to ensure compatibility. Breaking changes are announced in the Changelog.