Référence API
Exemple Réponse 200
Exemple Réponse 201
Exemple Réponse 200
Exemple Réponse 200
Exemple Réponse 200
Exemple Réponse 200
Sitzungen
6 endpoints
Les descriptions des endpoints proviennent directement de l'API et sont en allemand.
Sitzungen auflisten
get/v1/sessions
Ladungen, neueste zuerst. Filter: state (kommagetrennt), device_id, location_id, access_grant_id, from, to.
Paramètres
| Nom | Emplacement | Type |
|---|---|---|
limitfacultatif | Requête | integer |
starting_afterfacultatif | Requête | string |
statefacultatif | Requête | string |
device_idfacultatif | Requête | string |
location_idfacultatif | Requête | string |
access_grant_idfacultatif | Requête | string |
fromfacultatif | Requête | string (date-time) |
tofacultatif | Requête | string (date-time) |
Réponse 200SessionList
| Nom | Type | Description |
|---|---|---|
objectobligatoire | "list" | |
dataobligatoire | Session[] | |
has_moreobligatoire | boolean |
Erreurs possibles
- 400 Anfrage ungültig
- 401 Nicht angemeldet
- 403 Berechtigung fehlt
- 404 Nicht gefunden
- 409 Zustand passt nicht
- 429 Zu viele Anfragen
curl -X GET https://api.ladehase.com/v1/sessions \n -H "Authorization: Bearer lh_test_…"{
"object": "list",
"data": [
{
"id": "ses_1a2b3c4d5e6f7a8b9c0d",
"object": "session",
"livemode": true,
"state": "string",
"mode": "reservation",
"channel": "qr",
"location_id": "string",
"device_id": "string",
"connector_id": "string",
"currency": "string",
"authorized_amount": 1235,
"amount": 1235,
"captured_amount": 1235,
"refunded_amount": 1235,
"vat_amount": 1235,
"energy_wh": 0,
"idle_minutes": 0,
"stop_reason": "string",
"receipt_number": "string",
"started_at": "2026-10-25T08:30:00.000Z",
"ended_at": "2026-10-25T08:30:00.000Z",
"settled_at": "2026-10-25T08:30:00.000Z",
"created_at": "string"
}
],
"has_more": true
}Sitzung starten
post/v1/sessions
Startet eine Ladung ohne Zahlung über die API (z. B. für eigene Apps oder Weiterverrechnung). Mit `access_grant_id` gilt der Sondertarif des Zugangs.
Paramètres
| Nom | Emplacement | Type |
|---|---|---|
idempotency-keyfacultatifWiederholbare Anfragen ohne doppelte Wirkung (24 Stunden) | En-tête | string |
Requête
| Nom | Type | Description |
|---|---|---|
device_idobligatoire | string | |
access_grant_idfacultatif | string | |
metadatafacultatif | object |
Réponse 201Session
| Nom | Type | Description |
|---|---|---|
idobligatoire | string | ID mit Präfix «ses_» |
objectobligatoire | "session" | |
livemodeobligatoire | boolean | |
stateobligatoire | string | Zustand gemäss Zustandsautomat (created … settled) |
modeobligatoire | "reservation" | "prepaid" | "access" | |
channelobligatoire | "qr" | "terminal" | "api" | "rfid" | "access_link" | |
location_idobligatoire | string | |
device_idobligatoire | string | |
connector_idobligatoire | string | |
currencyobligatoire | string | |
authorized_amountobligatoire | integer | Reservierter beziehungsweise bezahlter Betrag in Rappen |
amountobligatoire | integer | Hochgerechneter Betrag (laufend) oder Endbetrag in Rappen |
captured_amountobligatoire | integer | Belasteter Betrag in Rappen |
refunded_amountobligatoire | integer | Zurückerstatteter Betrag in Rappen |
vat_amountobligatoire | integer | MWST-Anteil in Rappen |
energy_whobligatoire | integer | Geladene Energie in Wh |
idle_minutesobligatoire | integer | |
stop_reasonobligatoire | string | null | |
receipt_numberobligatoire | string | null | |
started_atobligatoire | string | null | Zeitpunkt (ISO 8601, UTC) |
ended_atobligatoire | string | null | Zeitpunkt (ISO 8601, UTC) |
settled_atobligatoire | string | null | Zeitpunkt (ISO 8601, UTC) |
created_atobligatoire | string |
Erreurs possibles
- 400 Anfrage ungültig
- 401 Nicht angemeldet
- 403 Berechtigung fehlt
- 404 Nicht gefunden
- 409 Zustand passt nicht
- 429 Zu viele Anfragen
curl -X POST https://api.ladehase.com/v1/sessions \n -H "Authorization: Bearer lh_test_…" \n -H "Content-Type: application/json" \n -d '{"device_id":"string","access_grant_id":"string","metadata":{}}'{
"id": "ses_1a2b3c4d5e6f7a8b9c0d",
"object": "session",
"livemode": true,
"state": "string",
"mode": "reservation",
"channel": "qr",
"location_id": "string",
"device_id": "string",
"connector_id": "string",
"currency": "string",
"authorized_amount": 1235,
"amount": 1235,
"captured_amount": 1235,
"refunded_amount": 1235,
"vat_amount": 1235,
"energy_wh": 0,
"idle_minutes": 0,
"stop_reason": "string",
"receipt_number": "string",
"started_at": "2026-10-25T08:30:00.000Z",
"ended_at": "2026-10-25T08:30:00.000Z",
"settled_at": "2026-10-25T08:30:00.000Z",
"created_at": "string"
}Sitzung abrufen
get/v1/sessions/{id}
Eine Ladung mit Beträgen, Energie und Preisaufstellung.
Paramètres
| Nom | Emplacement | Type |
|---|---|---|
idobligatoire | Chemin | string |
Réponse 200Session
| Nom | Type | Description |
|---|---|---|
idobligatoire | string | ID mit Präfix «ses_» |
objectobligatoire | "session" | |
livemodeobligatoire | boolean | |
stateobligatoire | string | Zustand gemäss Zustandsautomat (created … settled) |
modeobligatoire | "reservation" | "prepaid" | "access" | |
channelobligatoire | "qr" | "terminal" | "api" | "rfid" | "access_link" | |
location_idobligatoire | string | |
device_idobligatoire | string | |
connector_idobligatoire | string | |
currencyobligatoire | string | |
authorized_amountobligatoire | integer | Reservierter beziehungsweise bezahlter Betrag in Rappen |
amountobligatoire | integer | Hochgerechneter Betrag (laufend) oder Endbetrag in Rappen |
captured_amountobligatoire | integer | Belasteter Betrag in Rappen |
refunded_amountobligatoire | integer | Zurückerstatteter Betrag in Rappen |
vat_amountobligatoire | integer | MWST-Anteil in Rappen |
energy_whobligatoire | integer | Geladene Energie in Wh |
idle_minutesobligatoire | integer | |
stop_reasonobligatoire | string | null | |
receipt_numberobligatoire | string | null | |
started_atobligatoire | string | null | Zeitpunkt (ISO 8601, UTC) |
ended_atobligatoire | string | null | Zeitpunkt (ISO 8601, UTC) |
settled_atobligatoire | string | null | Zeitpunkt (ISO 8601, UTC) |
created_atobligatoire | string |
Erreurs possibles
- 400 Anfrage ungültig
- 401 Nicht angemeldet
- 403 Berechtigung fehlt
- 404 Nicht gefunden
- 409 Zustand passt nicht
- 429 Zu viele Anfragen
curl -X GET https://api.ladehase.com/v1/sessions/{id} \n -H "Authorization: Bearer lh_test_…"{
"id": "ses_1a2b3c4d5e6f7a8b9c0d",
"object": "session",
"livemode": true,
"state": "string",
"mode": "reservation",
"channel": "qr",
"location_id": "string",
"device_id": "string",
"connector_id": "string",
"currency": "string",
"authorized_amount": 1235,
"amount": 1235,
"captured_amount": 1235,
"refunded_amount": 1235,
"vat_amount": 1235,
"energy_wh": 0,
"idle_minutes": 0,
"stop_reason": "string",
"receipt_number": "string",
"started_at": "2026-10-25T08:30:00.000Z",
"ended_at": "2026-10-25T08:30:00.000Z",
"settled_at": "2026-10-25T08:30:00.000Z",
"created_at": "string"
}Sitzung stoppen
post/v1/sessions/{id}/stop
Stoppt die Ladung. Abgerechnet wird automatisch.
Paramètres
| Nom | Emplacement | Type |
|---|---|---|
idobligatoire | Chemin | string |
idempotency-keyfacultatifWiederholbare Anfragen ohne doppelte Wirkung (24 Stunden) | En-tête | string |
Réponse 200Session
| Nom | Type | Description |
|---|---|---|
idobligatoire | string | ID mit Präfix «ses_» |
objectobligatoire | "session" | |
livemodeobligatoire | boolean | |
stateobligatoire | string | Zustand gemäss Zustandsautomat (created … settled) |
modeobligatoire | "reservation" | "prepaid" | "access" | |
channelobligatoire | "qr" | "terminal" | "api" | "rfid" | "access_link" | |
location_idobligatoire | string | |
device_idobligatoire | string | |
connector_idobligatoire | string | |
currencyobligatoire | string | |
authorized_amountobligatoire | integer | Reservierter beziehungsweise bezahlter Betrag in Rappen |
amountobligatoire | integer | Hochgerechneter Betrag (laufend) oder Endbetrag in Rappen |
captured_amountobligatoire | integer | Belasteter Betrag in Rappen |
refunded_amountobligatoire | integer | Zurückerstatteter Betrag in Rappen |
vat_amountobligatoire | integer | MWST-Anteil in Rappen |
energy_whobligatoire | integer | Geladene Energie in Wh |
idle_minutesobligatoire | integer | |
stop_reasonobligatoire | string | null | |
receipt_numberobligatoire | string | null | |
started_atobligatoire | string | null | Zeitpunkt (ISO 8601, UTC) |
ended_atobligatoire | string | null | Zeitpunkt (ISO 8601, UTC) |
settled_atobligatoire | string | null | Zeitpunkt (ISO 8601, UTC) |
created_atobligatoire | string |
Erreurs possibles
- 400 Anfrage ungültig
- 401 Nicht angemeldet
- 403 Berechtigung fehlt
- 404 Nicht gefunden
- 409 Zustand passt nicht
- 429 Zu viele Anfragen
curl -X POST https://api.ladehase.com/v1/sessions/{id}/stop \n -H "Authorization: Bearer lh_test_…"{
"id": "ses_1a2b3c4d5e6f7a8b9c0d",
"object": "session",
"livemode": true,
"state": "string",
"mode": "reservation",
"channel": "qr",
"location_id": "string",
"device_id": "string",
"connector_id": "string",
"currency": "string",
"authorized_amount": 1235,
"amount": 1235,
"captured_amount": 1235,
"refunded_amount": 1235,
"vat_amount": 1235,
"energy_wh": 0,
"idle_minutes": 0,
"stop_reason": "string",
"receipt_number": "string",
"started_at": "2026-10-25T08:30:00.000Z",
"ended_at": "2026-10-25T08:30:00.000Z",
"settled_at": "2026-10-25T08:30:00.000Z",
"created_at": "string"
}Zeitleiste einer Sitzung
get/v1/sessions/{id}/events
Alle Zustandswechsel und Messwerte (Ladekurve).
Paramètres
| Nom | Emplacement | Type |
|---|---|---|
idobligatoire | Chemin | string |
Réponse 200Object
Erreurs possibles
- 400 Anfrage ungültig
- 401 Nicht angemeldet
- 403 Berechtigung fehlt
- 404 Nicht gefunden
- 409 Zustand passt nicht
- 429 Zu viele Anfragen
curl -X GET https://api.ladehase.com/v1/sessions/{id}/events \n -H "Authorization: Bearer lh_test_…"{}Rückerstatten
post/v1/sessions/{id}/refund
Voll oder teilweise (`amount` in Rappen).
Paramètres
| Nom | Emplacement | Type |
|---|---|---|
idobligatoire | Chemin | string |
idempotency-keyfacultatifWiederholbare Anfragen ohne doppelte Wirkung (24 Stunden) | En-tête | string |
Requête
| Nom | Type | Description |
|---|---|---|
amountfacultatif | integer | |
reasonfacultatif | string |
Réponse 200Session
| Nom | Type | Description |
|---|---|---|
idobligatoire | string | ID mit Präfix «ses_» |
objectobligatoire | "session" | |
livemodeobligatoire | boolean | |
stateobligatoire | string | Zustand gemäss Zustandsautomat (created … settled) |
modeobligatoire | "reservation" | "prepaid" | "access" | |
channelobligatoire | "qr" | "terminal" | "api" | "rfid" | "access_link" | |
location_idobligatoire | string | |
device_idobligatoire | string | |
connector_idobligatoire | string | |
currencyobligatoire | string | |
authorized_amountobligatoire | integer | Reservierter beziehungsweise bezahlter Betrag in Rappen |
amountobligatoire | integer | Hochgerechneter Betrag (laufend) oder Endbetrag in Rappen |
captured_amountobligatoire | integer | Belasteter Betrag in Rappen |
refunded_amountobligatoire | integer | Zurückerstatteter Betrag in Rappen |
vat_amountobligatoire | integer | MWST-Anteil in Rappen |
energy_whobligatoire | integer | Geladene Energie in Wh |
idle_minutesobligatoire | integer | |
stop_reasonobligatoire | string | null | |
receipt_numberobligatoire | string | null | |
started_atobligatoire | string | null | Zeitpunkt (ISO 8601, UTC) |
ended_atobligatoire | string | null | Zeitpunkt (ISO 8601, UTC) |
settled_atobligatoire | string | null | Zeitpunkt (ISO 8601, UTC) |
created_atobligatoire | string |
Erreurs possibles
- 400 Anfrage ungültig
- 401 Nicht angemeldet
- 403 Berechtigung fehlt
- 404 Nicht gefunden
- 409 Zustand passt nicht
- 429 Zu viele Anfragen
curl -X POST https://api.ladehase.com/v1/sessions/{id}/refund \n -H "Authorization: Bearer lh_test_…" \n -H "Content-Type: application/json" \n -d '{"amount":0,"reason":"string"}'{
"id": "ses_1a2b3c4d5e6f7a8b9c0d",
"object": "session",
"livemode": true,
"state": "string",
"mode": "reservation",
"channel": "qr",
"location_id": "string",
"device_id": "string",
"connector_id": "string",
"currency": "string",
"authorized_amount": 1235,
"amount": 1235,
"captured_amount": 1235,
"refunded_amount": 1235,
"vat_amount": 1235,
"energy_wh": 0,
"idle_minutes": 0,
"stop_reason": "string",
"receipt_number": "string",
"started_at": "2026-10-25T08:30:00.000Z",
"ended_at": "2026-10-25T08:30:00.000Z",
"settled_at": "2026-10-25T08:30:00.000Z",
"created_at": "string"
}