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: service.invoice-api.xhub.io/openapi.json
1openapi: 3.1.02info:3 title: Invoice-api.xhub API4 version: 1.1.05 description: E-Rechnung API für XRechnung, ZUGFeRD und Peppol6 7servers:8 - url: https://service.invoice-api.xhub.io/v19 description: Production10 11paths:12 /api/v1/invoice/{countryCode}/{format}/generate:13 post:14 summary: Generate E-Invoice15 description: Erstellt eine E-Rechnung im gewählten Format16 parameters:17 - name: countryCode18 in: path19 required: true20 schema:21 type: string22 enum: [DE, AT, CH, FR, IT, ES, NL, BE, PT, PL, CZ, HU, RO, BG]23 - name: format24 in: path25 required: true26 schema:27 type: string28 security:29 - bearerAuth: []30 # ...31 32 /api/v1/invoice/{countryCode}/validate:33 post:34 summary: Validate E-Invoice35 description: Validiert eine E-Rechnung (kostenlos)36 # ...37 38components:39 securitySchemes:40 bearerAuth:41 type: http42 scheme: bearer43 description: "API Key (sk_live_* oder sk_test_*)"44 # ...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.