Riferimento API
Esempio Risposta 200
Esempio Risposta 201
Esempio Risposta 200
Esempio Risposta 200
Esempio Risposta 200
Esempio Risposta 200
Sitzungen
6 endpoint
Le descrizioni degli endpoint provengono direttamente dall'API e sono in tedesco.
Sitzungen auflisten
get/v1/sessions
Ladungen, neueste zuerst. Filter: state (kommagetrennt), device_id, location_id, access_grant_id, from, to.
Parametri
| Nome | Posizione | Tipo |
|---|---|---|
limitfacoltativo | Query | integer |
starting_afterfacoltativo | Query | string |
statefacoltativo | Query | string |
device_idfacoltativo | Query | string |
location_idfacoltativo | Query | string |
access_grant_idfacoltativo | Query | string |
fromfacoltativo | Query | string (date-time) |
tofacoltativo | Query | string (date-time) |
Risposta 200SessionList
| Nome | Tipo | Descrizione |
|---|---|---|
objectobbligatorio | "list" | |
dataobbligatorio | Session[] | |
has_moreobbligatorio | boolean |
Errori possibili
- 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.
Parametri
| Nome | Posizione | Tipo |
|---|---|---|
idempotency-keyfacoltativoWiederholbare Anfragen ohne doppelte Wirkung (24 Stunden) | Intestazione | string |
Richiesta
| Nome | Tipo | Descrizione |
|---|---|---|
device_idobbligatorio | string | |
access_grant_idfacoltativo | string | |
metadatafacoltativo | object |
Risposta 201Session
| Nome | Tipo | Descrizione |
|---|---|---|
idobbligatorio | string | ID mit Präfix «ses_» |
objectobbligatorio | "session" | |
livemodeobbligatorio | boolean | |
stateobbligatorio | string | Zustand gemäss Zustandsautomat (created … settled) |
modeobbligatorio | "reservation" | "prepaid" | "access" | |
channelobbligatorio | "qr" | "terminal" | "api" | "rfid" | "access_link" | |
location_idobbligatorio | string | |
device_idobbligatorio | string | |
connector_idobbligatorio | string | |
currencyobbligatorio | string | |
authorized_amountobbligatorio | integer | Reservierter beziehungsweise bezahlter Betrag in Rappen |
amountobbligatorio | integer | Hochgerechneter Betrag (laufend) oder Endbetrag in Rappen |
captured_amountobbligatorio | integer | Belasteter Betrag in Rappen |
refunded_amountobbligatorio | integer | Zurückerstatteter Betrag in Rappen |
vat_amountobbligatorio | integer | MWST-Anteil in Rappen |
energy_whobbligatorio | integer | Geladene Energie in Wh |
idle_minutesobbligatorio | integer | |
stop_reasonobbligatorio | string | null | |
receipt_numberobbligatorio | string | null | |
started_atobbligatorio | string | null | Zeitpunkt (ISO 8601, UTC) |
ended_atobbligatorio | string | null | Zeitpunkt (ISO 8601, UTC) |
settled_atobbligatorio | string | null | Zeitpunkt (ISO 8601, UTC) |
created_atobbligatorio | string |
Errori possibili
- 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.
Parametri
| Nome | Posizione | Tipo |
|---|---|---|
idobbligatorio | Percorso | string |
Risposta 200Session
| Nome | Tipo | Descrizione |
|---|---|---|
idobbligatorio | string | ID mit Präfix «ses_» |
objectobbligatorio | "session" | |
livemodeobbligatorio | boolean | |
stateobbligatorio | string | Zustand gemäss Zustandsautomat (created … settled) |
modeobbligatorio | "reservation" | "prepaid" | "access" | |
channelobbligatorio | "qr" | "terminal" | "api" | "rfid" | "access_link" | |
location_idobbligatorio | string | |
device_idobbligatorio | string | |
connector_idobbligatorio | string | |
currencyobbligatorio | string | |
authorized_amountobbligatorio | integer | Reservierter beziehungsweise bezahlter Betrag in Rappen |
amountobbligatorio | integer | Hochgerechneter Betrag (laufend) oder Endbetrag in Rappen |
captured_amountobbligatorio | integer | Belasteter Betrag in Rappen |
refunded_amountobbligatorio | integer | Zurückerstatteter Betrag in Rappen |
vat_amountobbligatorio | integer | MWST-Anteil in Rappen |
energy_whobbligatorio | integer | Geladene Energie in Wh |
idle_minutesobbligatorio | integer | |
stop_reasonobbligatorio | string | null | |
receipt_numberobbligatorio | string | null | |
started_atobbligatorio | string | null | Zeitpunkt (ISO 8601, UTC) |
ended_atobbligatorio | string | null | Zeitpunkt (ISO 8601, UTC) |
settled_atobbligatorio | string | null | Zeitpunkt (ISO 8601, UTC) |
created_atobbligatorio | string |
Errori possibili
- 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.
Parametri
| Nome | Posizione | Tipo |
|---|---|---|
idobbligatorio | Percorso | string |
idempotency-keyfacoltativoWiederholbare Anfragen ohne doppelte Wirkung (24 Stunden) | Intestazione | string |
Risposta 200Session
| Nome | Tipo | Descrizione |
|---|---|---|
idobbligatorio | string | ID mit Präfix «ses_» |
objectobbligatorio | "session" | |
livemodeobbligatorio | boolean | |
stateobbligatorio | string | Zustand gemäss Zustandsautomat (created … settled) |
modeobbligatorio | "reservation" | "prepaid" | "access" | |
channelobbligatorio | "qr" | "terminal" | "api" | "rfid" | "access_link" | |
location_idobbligatorio | string | |
device_idobbligatorio | string | |
connector_idobbligatorio | string | |
currencyobbligatorio | string | |
authorized_amountobbligatorio | integer | Reservierter beziehungsweise bezahlter Betrag in Rappen |
amountobbligatorio | integer | Hochgerechneter Betrag (laufend) oder Endbetrag in Rappen |
captured_amountobbligatorio | integer | Belasteter Betrag in Rappen |
refunded_amountobbligatorio | integer | Zurückerstatteter Betrag in Rappen |
vat_amountobbligatorio | integer | MWST-Anteil in Rappen |
energy_whobbligatorio | integer | Geladene Energie in Wh |
idle_minutesobbligatorio | integer | |
stop_reasonobbligatorio | string | null | |
receipt_numberobbligatorio | string | null | |
started_atobbligatorio | string | null | Zeitpunkt (ISO 8601, UTC) |
ended_atobbligatorio | string | null | Zeitpunkt (ISO 8601, UTC) |
settled_atobbligatorio | string | null | Zeitpunkt (ISO 8601, UTC) |
created_atobbligatorio | string |
Errori possibili
- 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).
Parametri
| Nome | Posizione | Tipo |
|---|---|---|
idobbligatorio | Percorso | string |
Risposta 200Object
Errori possibili
- 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).
Parametri
| Nome | Posizione | Tipo |
|---|---|---|
idobbligatorio | Percorso | string |
idempotency-keyfacoltativoWiederholbare Anfragen ohne doppelte Wirkung (24 Stunden) | Intestazione | string |
Richiesta
| Nome | Tipo | Descrizione |
|---|---|---|
amountfacoltativo | integer | |
reasonfacoltativo | string |
Risposta 200Session
| Nome | Tipo | Descrizione |
|---|---|---|
idobbligatorio | string | ID mit Präfix «ses_» |
objectobbligatorio | "session" | |
livemodeobbligatorio | boolean | |
stateobbligatorio | string | Zustand gemäss Zustandsautomat (created … settled) |
modeobbligatorio | "reservation" | "prepaid" | "access" | |
channelobbligatorio | "qr" | "terminal" | "api" | "rfid" | "access_link" | |
location_idobbligatorio | string | |
device_idobbligatorio | string | |
connector_idobbligatorio | string | |
currencyobbligatorio | string | |
authorized_amountobbligatorio | integer | Reservierter beziehungsweise bezahlter Betrag in Rappen |
amountobbligatorio | integer | Hochgerechneter Betrag (laufend) oder Endbetrag in Rappen |
captured_amountobbligatorio | integer | Belasteter Betrag in Rappen |
refunded_amountobbligatorio | integer | Zurückerstatteter Betrag in Rappen |
vat_amountobbligatorio | integer | MWST-Anteil in Rappen |
energy_whobbligatorio | integer | Geladene Energie in Wh |
idle_minutesobbligatorio | integer | |
stop_reasonobbligatorio | string | null | |
receipt_numberobbligatorio | string | null | |
started_atobbligatorio | string | null | Zeitpunkt (ISO 8601, UTC) |
ended_atobbligatorio | string | null | Zeitpunkt (ISO 8601, UTC) |
settled_atobbligatorio | string | null | Zeitpunkt (ISO 8601, UTC) |
created_atobbligatorio | string |
Errori possibili
- 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"
}