API-Referenz
Beispiel Antwort 200
Beispiel Antwort 201
Beispiel Antwort 200
Beispiel Antwort 200
Beispiel
Beispiel
QR-Codes
6 Endpunkte
QR-Codes auflisten
get/v1/codes
Statische QR-Codes mit URL und Anzahl Scans.
Antwort 200CodeList
| Name | Typ | Beschreibung |
|---|---|---|
objectPflicht | "list" | |
dataPflicht | Code[] | |
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/codes \n -H "Authorization: Bearer lh_test_…"{
"object": "list",
"data": [
{
"id": "qr_3c9a1e7b0d2f4a6c",
"object": "code",
"code": "k7m2p9x",
"target": "connector",
"connector_id": "string",
"location_id": "string",
"label": "string",
"url": "https://hof-meier.ladehase.com/k7m2p9x",
"display_url": "string",
"scans": 0,
"disabled": true,
"created_at": "string"
}
],
"has_more": true
}QR-Code anlegen
post/v1/codes
Für einen Ladepunkt oder einen ganzen Standort (Auswahl auf der Bezahlseite).
Parameter
| Name | Ort | Typ |
|---|---|---|
idempotency-keyoptionalWiederholbare Anfragen ohne doppelte Wirkung (24 Stunden) | Kopfzeile | string |
Anfrage
| Name | Typ | Beschreibung |
|---|---|---|
targetPflicht | "connector" | "location" | |
connector_idoptional | string | |
location_idoptional | string | |
labeloptional | string |
Antwort 201Code
| Name | Typ | Beschreibung |
|---|---|---|
idPflicht | string | ID mit Präfix «qr_» |
objectPflicht | "code" | |
codePflicht | string | Kurzcode auf dem Schild |
targetPflicht | "connector" | "location" | |
connector_idPflicht | string | null | |
location_idPflicht | string | null | |
labelPflicht | string | null | |
urlPflicht | string | |
display_urlPflicht | string | |
scansPflicht | integer | |
disabledPflicht | 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/codes \n -H "Authorization: Bearer lh_test_…" \n -H "Content-Type: application/json" \n -d '{"target":"connector","connector_id":"string","location_id":"string","label":"string"}'{
"id": "qr_3c9a1e7b0d2f4a6c",
"object": "code",
"code": "k7m2p9x",
"target": "connector",
"connector_id": "string",
"location_id": "string",
"label": "string",
"url": "https://hof-meier.ladehase.com/k7m2p9x",
"display_url": "string",
"scans": 0,
"disabled": true,
"created_at": "string"
}QR-Code abrufen
get/v1/codes/{id}
Ein QR-Code.
Parameter
| Name | Ort | Typ |
|---|---|---|
idPflicht | Pfad | string |
Antwort 200Code
| Name | Typ | Beschreibung |
|---|---|---|
idPflicht | string | ID mit Präfix «qr_» |
objectPflicht | "code" | |
codePflicht | string | Kurzcode auf dem Schild |
targetPflicht | "connector" | "location" | |
connector_idPflicht | string | null | |
location_idPflicht | string | null | |
labelPflicht | string | null | |
urlPflicht | string | |
display_urlPflicht | string | |
scansPflicht | integer | |
disabledPflicht | 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/codes/{id} \n -H "Authorization: Bearer lh_test_…"{
"id": "qr_3c9a1e7b0d2f4a6c",
"object": "code",
"code": "k7m2p9x",
"target": "connector",
"connector_id": "string",
"location_id": "string",
"label": "string",
"url": "https://hof-meier.ladehase.com/k7m2p9x",
"display_url": "string",
"scans": 0,
"disabled": true,
"created_at": "string"
}QR-Code ändern
patch/v1/codes/{id}
Bezeichnung ändern oder deaktivieren.
Parameter
| Name | Ort | Typ |
|---|---|---|
idPflicht | Pfad | string |
Anfrage
| Name | Typ | Beschreibung |
|---|---|---|
labeloptional | string | |
disabledoptional | boolean |
Antwort 200Code
| Name | Typ | Beschreibung |
|---|---|---|
idPflicht | string | ID mit Präfix «qr_» |
objectPflicht | "code" | |
codePflicht | string | Kurzcode auf dem Schild |
targetPflicht | "connector" | "location" | |
connector_idPflicht | string | null | |
location_idPflicht | string | null | |
labelPflicht | string | null | |
urlPflicht | string | |
display_urlPflicht | string | |
scansPflicht | integer | |
disabledPflicht | 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/codes/{id} \n -H "Authorization: Bearer lh_test_…" \n -H "Content-Type: application/json" \n -d '{"label":"string","disabled":true}'{
"id": "qr_3c9a1e7b0d2f4a6c",
"object": "code",
"code": "k7m2p9x",
"target": "connector",
"connector_id": "string",
"location_id": "string",
"label": "string",
"url": "https://hof-meier.ladehase.com/k7m2p9x",
"display_url": "string",
"scans": 0,
"disabled": true,
"created_at": "string"
}QR-Code als SVG
get/v1/codes/{id}/qr.svg
Mit Bildmarke in der Mitte.
Parameter
| Name | Ort | Typ |
|---|---|---|
idPflicht | Pfad | 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/codes/{id}/qr.svg \n -H "Authorization: Bearer lh_test_…"QR-Code als PNG
get/v1/codes/{id}/qr.png
1024 × 1024 Pixel.
Parameter
| Name | Ort | Typ |
|---|---|---|
idPflicht | Pfad | 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/codes/{id}/qr.png \n -H "Authorization: Bearer lh_test_…"