Zugänge
9 endpoints
Les descriptions des endpoints proviennent directement de l'API et sont en allemand.
Zugänge auflisten
get/v1/access_grants
Personen und Ladekarten, die gratis oder zum Sondertarif laden.
Réponse 200AccessGrantList
| Nom | Type | Description |
|---|---|---|
objectobligatoire | "list" | |
dataobligatoire | AccessGrant[] | |
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/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.
Paramètres
| Nom | Emplacement | Type |
|---|---|---|
idempotency-keyfacultatifWiederholbare Anfragen ohne doppelte Wirkung (24 Stunden) | En-tête | string |
Requête
| Nom | Type | Description |
|---|---|---|
nameobligatoire | string | |
emailfacultatif | string | null | |
rfid_uidfacultatif | string | null | |
create_linkfacultatif | boolean | |
valid_fromfacultatif | string | null | |
valid_untilfacultatif | string | null | |
device_idsfacultatif | string[] | |
tariff_idfacultatif | string | null | |
monthly_limit_whfacultatif | integer | null | |
billing_integration_idfacultatif | string | null | |
notefacultatif | string | null |
Réponse 201AccessGrant
| Nom | Type | Description |
|---|---|---|
idobligatoire | string | ID mit Präfix «acc_» |
objectobligatoire | "access_grant" | |
nameobligatoire | string | |
emailobligatoire | string | null | |
rfid_uidobligatoire | string | null | |
link_urlobligatoire | string | null | Persönlicher Link zum Laden ohne Zahlung |
freeobligatoire | boolean | |
tariff_idobligatoire | string | null | |
monthly_limit_whobligatoire | integer | null | |
revokedobligatoire | boolean | |
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/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.
Paramètres
| Nom | Emplacement | Type |
|---|---|---|
idobligatoire | Chemin | string |
Réponse 200AccessGrant
| Nom | Type | Description |
|---|---|---|
idobligatoire | string | ID mit Präfix «acc_» |
objectobligatoire | "access_grant" | |
nameobligatoire | string | |
emailobligatoire | string | null | |
rfid_uidobligatoire | string | null | |
link_urlobligatoire | string | null | Persönlicher Link zum Laden ohne Zahlung |
freeobligatoire | boolean | |
tariff_idobligatoire | string | null | |
monthly_limit_whobligatoire | integer | null | |
revokedobligatoire | boolean | |
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/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`.
Paramètres
| Nom | Emplacement | Type |
|---|---|---|
idobligatoire | Chemin | string |
Requête
| Nom | Type | Description |
|---|---|---|
namefacultatif | string | |
emailfacultatif | string | null | |
rfid_uidfacultatif | string | null | |
create_linkfacultatif | boolean | |
valid_fromfacultatif | string | null | |
valid_untilfacultatif | string | null | |
device_idsfacultatif | string[] | |
tariff_idfacultatif | string | null | |
monthly_limit_whfacultatif | integer | null | |
billing_integration_idfacultatif | string | null | |
notefacultatif | string | null | |
revokedfacultatif | boolean | |
regenerate_linkfacultatif | boolean |
Réponse 200AccessGrant
| Nom | Type | Description |
|---|---|---|
idobligatoire | string | ID mit Präfix «acc_» |
objectobligatoire | "access_grant" | |
nameobligatoire | string | |
emailobligatoire | string | null | |
rfid_uidobligatoire | string | null | |
link_urlobligatoire | string | null | Persönlicher Link zum Laden ohne Zahlung |
freeobligatoire | boolean | |
tariff_idobligatoire | string | null | |
monthly_limit_whobligatoire | integer | null | |
revokedobligatoire | boolean | |
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 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.
Paramètres
| Nom | Emplacement | Type |
|---|---|---|
idobligatoire | Chemin | string |
Réponse 200Deleted
| Nom | Type | Description |
|---|---|---|
idobligatoire | string | |
objectobligatoire | string | |
deletedobligatoire | true |
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 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.
Paramètres
| Nom | Emplacement | Type |
|---|---|---|
periodfacultatif | Requête | 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/billing_statements \n -H "Authorization: Bearer lh_test_…"{}Abrechnungen erstellen
post/v1/billing_statements/generate
Für einen Monat (`period` = JJJJ-MM).
Paramètres
| Nom | Emplacement | Type |
|---|---|---|
idempotency-keyfacultatifWiederholbare Anfragen ohne doppelte Wirkung (24 Stunden) | En-tête | string |
Requête
| Nom | Type | Description |
|---|---|---|
periodobligatoire | 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 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.
Paramètres
| Nom | Emplacement | Type |
|---|---|---|
idobligatoire | Chemin | string |
idempotency-keyfacultatifWiederholbare Anfragen ohne doppelte Wirkung (24 Stunden) | En-tête | 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 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.
Paramètres
| Nom | Emplacement | Type |
|---|---|---|
idobligatoire | Chemin | string |
idempotency-keyfacultatifWiederholbare Anfragen ohne doppelte Wirkung (24 Stunden) | En-tête | 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 POST https://api.ladehase.com/v1/billing_statements/{id}/paid \n -H "Authorization: Bearer lh_test_…"{}