Zugänge
9 endpoint
Le descrizioni degli endpoint provengono direttamente dall'API e sono in tedesco.
Zugänge auflisten
get/v1/access_grants
Personen und Ladekarten, die gratis oder zum Sondertarif laden.
Risposta 200AccessGrantList
| Nome | Tipo | Descrizione |
|---|---|---|
objectobbligatorio | "list" | |
dataobbligatorio | AccessGrant[] | |
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/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.
Parametri
| Nome | Posizione | Tipo |
|---|---|---|
idempotency-keyfacoltativoWiederholbare Anfragen ohne doppelte Wirkung (24 Stunden) | Intestazione | string |
Richiesta
| Nome | Tipo | Descrizione |
|---|---|---|
nameobbligatorio | string | |
emailfacoltativo | string | null | |
rfid_uidfacoltativo | string | null | |
create_linkfacoltativo | boolean | |
valid_fromfacoltativo | string | null | |
valid_untilfacoltativo | string | null | |
device_idsfacoltativo | string[] | |
tariff_idfacoltativo | string | null | |
monthly_limit_whfacoltativo | integer | null | |
billing_integration_idfacoltativo | string | null | |
notefacoltativo | string | null |
Risposta 201AccessGrant
| Nome | Tipo | Descrizione |
|---|---|---|
idobbligatorio | string | ID mit Präfix «acc_» |
objectobbligatorio | "access_grant" | |
nameobbligatorio | string | |
emailobbligatorio | string | null | |
rfid_uidobbligatorio | string | null | |
link_urlobbligatorio | string | null | Persönlicher Link zum Laden ohne Zahlung |
freeobbligatorio | boolean | |
tariff_idobbligatorio | string | null | |
monthly_limit_whobbligatorio | integer | null | |
revokedobbligatorio | boolean | |
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/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.
Parametri
| Nome | Posizione | Tipo |
|---|---|---|
idobbligatorio | Percorso | string |
Risposta 200AccessGrant
| Nome | Tipo | Descrizione |
|---|---|---|
idobbligatorio | string | ID mit Präfix «acc_» |
objectobbligatorio | "access_grant" | |
nameobbligatorio | string | |
emailobbligatorio | string | null | |
rfid_uidobbligatorio | string | null | |
link_urlobbligatorio | string | null | Persönlicher Link zum Laden ohne Zahlung |
freeobbligatorio | boolean | |
tariff_idobbligatorio | string | null | |
monthly_limit_whobbligatorio | integer | null | |
revokedobbligatorio | boolean | |
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/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`.
Parametri
| Nome | Posizione | Tipo |
|---|---|---|
idobbligatorio | Percorso | string |
Richiesta
| Nome | Tipo | Descrizione |
|---|---|---|
namefacoltativo | string | |
emailfacoltativo | string | null | |
rfid_uidfacoltativo | string | null | |
create_linkfacoltativo | boolean | |
valid_fromfacoltativo | string | null | |
valid_untilfacoltativo | string | null | |
device_idsfacoltativo | string[] | |
tariff_idfacoltativo | string | null | |
monthly_limit_whfacoltativo | integer | null | |
billing_integration_idfacoltativo | string | null | |
notefacoltativo | string | null | |
revokedfacoltativo | boolean | |
regenerate_linkfacoltativo | boolean |
Risposta 200AccessGrant
| Nome | Tipo | Descrizione |
|---|---|---|
idobbligatorio | string | ID mit Präfix «acc_» |
objectobbligatorio | "access_grant" | |
nameobbligatorio | string | |
emailobbligatorio | string | null | |
rfid_uidobbligatorio | string | null | |
link_urlobbligatorio | string | null | Persönlicher Link zum Laden ohne Zahlung |
freeobbligatorio | boolean | |
tariff_idobbligatorio | string | null | |
monthly_limit_whobbligatorio | integer | null | |
revokedobbligatorio | boolean | |
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 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.
Parametri
| Nome | Posizione | Tipo |
|---|---|---|
idobbligatorio | Percorso | string |
Risposta 200Deleted
| Nome | Tipo | Descrizione |
|---|---|---|
idobbligatorio | string | |
objectobbligatorio | string | |
deletedobbligatorio | true |
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 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.
Parametri
| Nome | Posizione | Tipo |
|---|---|---|
periodfacoltativo | Query | 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/billing_statements \n -H "Authorization: Bearer lh_test_…"{}Abrechnungen erstellen
post/v1/billing_statements/generate
Für einen Monat (`period` = JJJJ-MM).
Parametri
| Nome | Posizione | Tipo |
|---|---|---|
idempotency-keyfacoltativoWiederholbare Anfragen ohne doppelte Wirkung (24 Stunden) | Intestazione | string |
Richiesta
| Nome | Tipo | Descrizione |
|---|---|---|
periodobbligatorio | 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 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.
Parametri
| Nome | Posizione | Tipo |
|---|---|---|
idobbligatorio | Percorso | string |
idempotency-keyfacoltativoWiederholbare Anfragen ohne doppelte Wirkung (24 Stunden) | Intestazione | 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 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.
Parametri
| Nome | Posizione | Tipo |
|---|---|---|
idobbligatorio | Percorso | string |
idempotency-keyfacoltativoWiederholbare Anfragen ohne doppelte Wirkung (24 Stunden) | Intestazione | 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 POST https://api.ladehase.com/v1/billing_statements/{id}/paid \n -H "Authorization: Bearer lh_test_…"{}