API-Referenz
Beispiel Antwort 200
Beispiel Antwort 201
Beispiel Antwort 200
Beispiel Antwort 200
Beispiel Antwort 200
Beispiel Antwort 200
Beispiel Antwort 200
Beispiel Antwort 200
Beispiel Antwort 200
Zugänge
9 Endpunkte
Zugänge auflisten
get/v1/access_grants
Personen und Ladekarten, die gratis oder zum Sondertarif laden.
Antwort 200AccessGrantList
| Name | Typ | Beschreibung |
|---|---|---|
objectPflicht | "list" | |
dataPflicht | AccessGrant[] | |
has_morePflicht | boolean |
Mögliche Fehler
- 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/access_grants \n -H "Authorization: Bearer lh_test_…"{
"object": "list",
"data": [
{
"id": "acc_0e9d8c7b6a5f4e3d",
"object": "access_grant",
"name": "string",
"email": "string",
"rfid_uid": "string",
"link_url": "string",
"free": true,
"tariff_id": "string",
"monthly_limit_wh": 0,
"revoked": true,
"created_at": "string"
}
],
"has_more": true
}Zugang anlegen
post/v1/access_grants
Ohne `tariff_id` gratis, mit `tariff_id` Sondertarif und Monatsabrechnung. Erzeugt einen persönlichen Link.
Parameter
| Name | Ort | Typ |
|---|---|---|
idempotency-keyoptionalWiederholbare Anfragen ohne doppelte Wirkung (24 Stunden) | Kopfzeile | string |
Anfrage
| Name | Typ | Beschreibung |
|---|---|---|
namePflicht | string | |
emailoptional | string | null | |
rfid_uidoptional | string | null | |
create_linkoptional | boolean | |
valid_fromoptional | string | null | |
valid_untiloptional | string | null | |
device_idsoptional | string[] | |
tariff_idoptional | string | null | |
monthly_limit_whoptional | integer | null | |
billing_integration_idoptional | string | null | |
noteoptional | string | null |
Antwort 201AccessGrant
| Name | Typ | Beschreibung |
|---|---|---|
idPflicht | string | ID mit Präfix «acc_» |
objectPflicht | "access_grant" | |
namePflicht | string | |
emailPflicht | string | null | |
rfid_uidPflicht | string | null | |
link_urlPflicht | string | null | Persönlicher Link zum Laden ohne Zahlung |
freePflicht | boolean | |
tariff_idPflicht | string | null | |
monthly_limit_whPflicht | integer | null | |
revokedPflicht | boolean | |
created_atPflicht | string |
Mögliche Fehler
- 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/access_grants \n -H "Authorization: Bearer lh_test_…" \n -H "Content-Type: application/json" \n -d '{"name":"string","email":"person@example.ch","rfid_uid":"string","create_link":true,"valid_from":"2026-10-25T08:30:00.000Z","valid_until":"2026-10-25T08:30:00.000Z","device_ids":[],"tariff_id":"string","monthly_limit_wh":0,"billing_integration_id":"string","note":"string"}'{
"id": "acc_0e9d8c7b6a5f4e3d",
"object": "access_grant",
"name": "string",
"email": "string",
"rfid_uid": "string",
"link_url": "string",
"free": true,
"tariff_id": "string",
"monthly_limit_wh": 0,
"revoked": true,
"created_at": "string"
}Zugang abrufen
get/v1/access_grants/{id}
Ein Zugang.
Parameter
| Name | Ort | Typ |
|---|---|---|
idPflicht | Pfad | string |
Antwort 200AccessGrant
| Name | Typ | Beschreibung |
|---|---|---|
idPflicht | string | ID mit Präfix «acc_» |
objectPflicht | "access_grant" | |
namePflicht | string | |
emailPflicht | string | null | |
rfid_uidPflicht | string | null | |
link_urlPflicht | string | null | Persönlicher Link zum Laden ohne Zahlung |
freePflicht | boolean | |
tariff_idPflicht | string | null | |
monthly_limit_whPflicht | integer | null | |
revokedPflicht | boolean | |
created_atPflicht | string |
Mögliche Fehler
- 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/access_grants/{id} \n -H "Authorization: Bearer lh_test_…"{
"id": "acc_0e9d8c7b6a5f4e3d",
"object": "access_grant",
"name": "string",
"email": "string",
"rfid_uid": "string",
"link_url": "string",
"free": true,
"tariff_id": "string",
"monthly_limit_wh": 0,
"revoked": true,
"created_at": "string"
}Zugang ändern
patch/v1/access_grants/{id}
Auch `revoked` und `regenerate_link`.
Parameter
| Name | Ort | Typ |
|---|---|---|
idPflicht | Pfad | string |
Anfrage
| Name | Typ | Beschreibung |
|---|---|---|
nameoptional | string | |
emailoptional | string | null | |
rfid_uidoptional | string | null | |
create_linkoptional | boolean | |
valid_fromoptional | string | null | |
valid_untiloptional | string | null | |
device_idsoptional | string[] | |
tariff_idoptional | string | null | |
monthly_limit_whoptional | integer | null | |
billing_integration_idoptional | string | null | |
noteoptional | string | null | |
revokedoptional | boolean | |
regenerate_linkoptional | boolean |
Antwort 200AccessGrant
| Name | Typ | Beschreibung |
|---|---|---|
idPflicht | string | ID mit Präfix «acc_» |
objectPflicht | "access_grant" | |
namePflicht | string | |
emailPflicht | string | null | |
rfid_uidPflicht | string | null | |
link_urlPflicht | string | null | Persönlicher Link zum Laden ohne Zahlung |
freePflicht | boolean | |
tariff_idPflicht | string | null | |
monthly_limit_whPflicht | integer | null | |
revokedPflicht | boolean | |
created_atPflicht | string |
Mögliche Fehler
- 400 Anfrage ungültig
- 401 Nicht angemeldet
- 403 Berechtigung fehlt
- 404 Nicht gefunden
- 409 Zustand passt nicht
- 429 Zu viele Anfragen
curl -X PATCH https://api.ladehase.com/v1/access_grants/{id} \n -H "Authorization: Bearer lh_test_…" \n -H "Content-Type: application/json" \n -d '{"name":"string","email":"person@example.ch","rfid_uid":"string","create_link":true,"valid_from":"2026-10-25T08:30:00.000Z","valid_until":"2026-10-25T08:30:00.000Z","device_ids":[],"tariff_id":"string","monthly_limit_wh":0,"billing_integration_id":"string","note":"string","revoked":true,"regenerate_link":true}'{
"id": "acc_0e9d8c7b6a5f4e3d",
"object": "access_grant",
"name": "string",
"email": "string",
"rfid_uid": "string",
"link_url": "string",
"free": true,
"tariff_id": "string",
"monthly_limit_wh": 0,
"revoked": true,
"created_at": "string"
}Zugang widerrufen
delete/v1/access_grants/{id}
Link und Berechtigung werden ungültig.
Parameter
| Name | Ort | Typ |
|---|---|---|
idPflicht | Pfad | string |
Antwort 200Deleted
| Name | Typ | Beschreibung |
|---|---|---|
idPflicht | string | |
objectPflicht | string | |
deletedPflicht | true |
Mögliche Fehler
- 400 Anfrage ungültig
- 401 Nicht angemeldet
- 403 Berechtigung fehlt
- 404 Nicht gefunden
- 409 Zustand passt nicht
- 429 Zu viele Anfragen
curl -X DELETE https://api.ladehase.com/v1/access_grants/{id} \n -H "Authorization: Bearer lh_test_…"{
"id": "string",
"object": "string",
"deleted": true
}Monatsabrechnungen
get/v1/billing_statements
Abrechnungen für Zugänge mit Sondertarif.
Parameter
| Name | Ort | Typ |
|---|---|---|
periodoptional | Abfrage | string |
Antwort 200Object
Mögliche Fehler
- 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/billing_statements \n -H "Authorization: Bearer lh_test_…"{}Abrechnungen erstellen
post/v1/billing_statements/generate
Für einen Monat (`period` = JJJJ-MM).
Parameter
| Name | Ort | Typ |
|---|---|---|
idempotency-keyoptionalWiederholbare Anfragen ohne doppelte Wirkung (24 Stunden) | Kopfzeile | string |
Anfrage
| Name | Typ | Beschreibung |
|---|---|---|
periodPflicht | string |
Antwort 200Object
Mögliche Fehler
- 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/billing_statements/generate \n -H "Authorization: Bearer lh_test_…" \n -H "Content-Type: application/json" \n -d '{"period":"string"}'{}Abrechnung senden
post/v1/billing_statements/{id}/send
E-Mail mit Zahlungslink über zahls.ch oder Freika.
Parameter
| Name | Ort | Typ |
|---|---|---|
idPflicht | Pfad | string |
idempotency-keyoptionalWiederholbare Anfragen ohne doppelte Wirkung (24 Stunden) | Kopfzeile | string |
Antwort 200Object
Mögliche Fehler
- 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/billing_statements/{id}/send \n -H "Authorization: Bearer lh_test_…"{}Als bezahlt markieren
post/v1/billing_statements/{id}/paid
Zum Beispiel bei Barzahlung.
Parameter
| Name | Ort | Typ |
|---|---|---|
idPflicht | Pfad | string |
idempotency-keyoptionalWiederholbare Anfragen ohne doppelte Wirkung (24 Stunden) | Kopfzeile | string |
Antwort 200Object
Mögliche Fehler
- 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/billing_statements/{id}/paid \n -H "Authorization: Bearer lh_test_…"{}