Documentation

invoice.xhub API Dokumentation

Alles was du brauchst, um E-Rechnungen zu erstellen, validieren und versenden. Von Quickstart-Guides bis zur vollständigen API-Referenz.

bash
1# 1. API Key setzen
2export XHUB_API_KEY=xhub_live_...
3 
4# 2. Rechnung erstellen
5curl -X POST https://api.xhub.io/v1/invoices \
6 -H "Authorization: Bearer $XHUB_API_KEY" \
7 -H "Content-Type: application/json" \
8 -d '{
9 "type": "xrechnung-3.0",
10 "seller": {
11 "name": "Deine Firma GmbH",
12 "vatId": "DE123456789"
13 },
14 "buyer": {
15 "name": "Kunde AG",
16 "vatId": "DE987654321"
17 },
18 "items": [
19 { "description": "Beratung", "amount": 1500, "vat": 19 }
20 ]
21 }'
22 
23# Response: { "id": "inv_abc123", "status": "valid" }

Code-Beispiele

Keine SDK nötig – nutze einfach HTTP-Requests in deiner bevorzugten Sprache.

curl

Universell nutzbar in jedem Terminal

curl -X POST https://api.xhub.io/v1/invoices \...

Node.js

Mit fetch() oder beliebigem HTTP-Client

const res = await fetch('https://api.xhub.io/v1/invoices', {...

Python

Mit requests oder httpx

response = requests.post(...

PHP

Mit Guzzle oder cURL

$response = $client->post('https://api.xhub.io/v1/invoices', [...

Schnellstart in 3 Schritten

1

API Key erstellen

Registriere dich und erstelle einen API Key im Dashboard.

xhub_live_abc123...
2

Request senden

Sende einen HTTP-Request an unsere REST API.

POST /v1/invoices
3

Rechnung erhalten

Erhalte eine valide XRechnung oder ZUGFeRD zurück.

{ "status": "valid" }

Weitere Ressourcen

OpenAPI Specification

Importiere unsere API in Postman, Insomnia oder deine Tools.

OpenAPI Spec herunterladen

Postman Collection

Fertige Collection mit allen Endpoints und Beispielen.

Collection importieren

Changelog

Alle Updates, neue Features und Breaking Changes.

Changelog ansehen