API reference
Example Response 200
Example Response 201
Example Response 200
Example Response 200
Example Response 200
Example Response 200
Example Response 200
Example Response 200
Example Response 200
Zugänge
9 endpoints
The endpoint descriptions come directly from the API and are in German.
Zugänge auflisten
get/v1/access_grants
Personen und Ladekarten, die gratis oder zum Sondertarif laden.
Response 200AccessGrantList
| Name | Type | Description |
|---|---|---|
objectrequired | "list" | |
datarequired | AccessGrant[] | |
has_morerequired | boolean |
Possible errors
- 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.
Parameters
| Name | In | Type |
|---|---|---|
idempotency-keyoptionalWiederholbare Anfragen ohne doppelte Wirkung (24 Stunden) | Header | string |
Request
| Name | Type | Description |
|---|---|---|
namerequired | 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 |
Response 201AccessGrant
| Name | Type | Description |
|---|---|---|
idrequired | string | ID mit Präfix «acc_» |
objectrequired | "access_grant" | |
namerequired | string | |
emailrequired | string | null | |
rfid_uidrequired | string | null | |
link_urlrequired | string | null | Persönlicher Link zum Laden ohne Zahlung |
freerequired | boolean | |
tariff_idrequired | string | null | |
monthly_limit_whrequired | integer | null | |
revokedrequired | boolean | |
created_atrequired | string |
Possible errors
- 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.
Parameters
| Name | In | Type |
|---|---|---|
idrequired | Path | string |
Response 200AccessGrant
| Name | Type | Description |
|---|---|---|
idrequired | string | ID mit Präfix «acc_» |
objectrequired | "access_grant" | |
namerequired | string | |
emailrequired | string | null | |
rfid_uidrequired | string | null | |
link_urlrequired | string | null | Persönlicher Link zum Laden ohne Zahlung |
freerequired | boolean | |
tariff_idrequired | string | null | |
monthly_limit_whrequired | integer | null | |
revokedrequired | boolean | |
created_atrequired | string |
Possible errors
- 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`.
Parameters
| Name | In | Type |
|---|---|---|
idrequired | Path | string |
Request
| Name | Type | Description |
|---|---|---|
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 |
Response 200AccessGrant
| Name | Type | Description |
|---|---|---|
idrequired | string | ID mit Präfix «acc_» |
objectrequired | "access_grant" | |
namerequired | string | |
emailrequired | string | null | |
rfid_uidrequired | string | null | |
link_urlrequired | string | null | Persönlicher Link zum Laden ohne Zahlung |
freerequired | boolean | |
tariff_idrequired | string | null | |
monthly_limit_whrequired | integer | null | |
revokedrequired | boolean | |
created_atrequired | string |
Possible errors
- 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.
Parameters
| Name | In | Type |
|---|---|---|
idrequired | Path | string |
Response 200Deleted
| Name | Type | Description |
|---|---|---|
idrequired | string | |
objectrequired | string | |
deletedrequired | true |
Possible errors
- 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.
Parameters
| Name | In | Type |
|---|---|---|
periodoptional | Query | string |
Response 200Object
Possible errors
- 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).
Parameters
| Name | In | Type |
|---|---|---|
idempotency-keyoptionalWiederholbare Anfragen ohne doppelte Wirkung (24 Stunden) | Header | string |
Request
| Name | Type | Description |
|---|---|---|
periodrequired | string |
Response 200Object
Possible errors
- 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.
Parameters
| Name | In | Type |
|---|---|---|
idrequired | Path | string |
idempotency-keyoptionalWiederholbare Anfragen ohne doppelte Wirkung (24 Stunden) | Header | string |
Response 200Object
Possible errors
- 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.
Parameters
| Name | In | Type |
|---|---|---|
idrequired | Path | string |
idempotency-keyoptionalWiederholbare Anfragen ohne doppelte Wirkung (24 Stunden) | Header | string |
Response 200Object
Possible errors
- 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_…"{}