Référence API
Exemple Réponse 200
Exemple Réponse 201
Exemple Réponse 200
Exemple Réponse 200
Exemple
Exemple
QR-Codes
6 endpoints
Les descriptions des endpoints proviennent directement de l'API et sont en allemand.
QR-Codes auflisten
get/v1/codes
Statische QR-Codes mit URL und Anzahl Scans.
Réponse 200CodeList
| Nom | Type | Description |
|---|---|---|
objectobligatoire | "list" | |
dataobligatoire | Code[] | |
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/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).
Paramètres
| Nom | Emplacement | Type |
|---|---|---|
idempotency-keyfacultatifWiederholbare Anfragen ohne doppelte Wirkung (24 Stunden) | En-tête | string |
Requête
| Nom | Type | Description |
|---|---|---|
targetobligatoire | "connector" | "location" | |
connector_idfacultatif | string | |
location_idfacultatif | string | |
labelfacultatif | string |
Réponse 201Code
| Nom | Type | Description |
|---|---|---|
idobligatoire | string | ID mit Präfix «qr_» |
objectobligatoire | "code" | |
codeobligatoire | string | Kurzcode auf dem Schild |
targetobligatoire | "connector" | "location" | |
connector_idobligatoire | string | null | |
location_idobligatoire | string | null | |
labelobligatoire | string | null | |
urlobligatoire | string | |
display_urlobligatoire | string | |
scansobligatoire | integer | |
disabledobligatoire | 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/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.
Paramètres
| Nom | Emplacement | Type |
|---|---|---|
idobligatoire | Chemin | string |
Réponse 200Code
| Nom | Type | Description |
|---|---|---|
idobligatoire | string | ID mit Präfix «qr_» |
objectobligatoire | "code" | |
codeobligatoire | string | Kurzcode auf dem Schild |
targetobligatoire | "connector" | "location" | |
connector_idobligatoire | string | null | |
location_idobligatoire | string | null | |
labelobligatoire | string | null | |
urlobligatoire | string | |
display_urlobligatoire | string | |
scansobligatoire | integer | |
disabledobligatoire | 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/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.
Paramètres
| Nom | Emplacement | Type |
|---|---|---|
idobligatoire | Chemin | string |
Requête
| Nom | Type | Description |
|---|---|---|
labelfacultatif | string | |
disabledfacultatif | boolean |
Réponse 200Code
| Nom | Type | Description |
|---|---|---|
idobligatoire | string | ID mit Präfix «qr_» |
objectobligatoire | "code" | |
codeobligatoire | string | Kurzcode auf dem Schild |
targetobligatoire | "connector" | "location" | |
connector_idobligatoire | string | null | |
location_idobligatoire | string | null | |
labelobligatoire | string | null | |
urlobligatoire | string | |
display_urlobligatoire | string | |
scansobligatoire | integer | |
disabledobligatoire | 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/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.
Paramètres
| Nom | Emplacement | Type |
|---|---|---|
idobligatoire | Chemin | 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/codes/{id}/qr.svg \n -H "Authorization: Bearer lh_test_…"QR-Code als PNG
get/v1/codes/{id}/qr.png
1024 × 1024 Pixel.
Paramètres
| Nom | Emplacement | Type |
|---|---|---|
idobligatoire | Chemin | 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/codes/{id}/qr.png \n -H "Authorization: Bearer lh_test_…"