Riferimento API
Esempio Risposta 200
Esempio Risposta 201
Esempio Risposta 200
Esempio Risposta 200
Esempio
Esempio
QR-Codes
6 endpoint
Le descrizioni degli endpoint provengono direttamente dall'API e sono in tedesco.
QR-Codes auflisten
get/v1/codes
Statische QR-Codes mit URL und Anzahl Scans.
Risposta 200CodeList
| Nome | Tipo | Descrizione |
|---|---|---|
objectobbligatorio | "list" | |
dataobbligatorio | Code[] | |
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/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).
Parametri
| Nome | Posizione | Tipo |
|---|---|---|
idempotency-keyfacoltativoWiederholbare Anfragen ohne doppelte Wirkung (24 Stunden) | Intestazione | string |
Richiesta
| Nome | Tipo | Descrizione |
|---|---|---|
targetobbligatorio | "connector" | "location" | |
connector_idfacoltativo | string | |
location_idfacoltativo | string | |
labelfacoltativo | string |
Risposta 201Code
| Nome | Tipo | Descrizione |
|---|---|---|
idobbligatorio | string | ID mit Präfix «qr_» |
objectobbligatorio | "code" | |
codeobbligatorio | string | Kurzcode auf dem Schild |
targetobbligatorio | "connector" | "location" | |
connector_idobbligatorio | string | null | |
location_idobbligatorio | string | null | |
labelobbligatorio | string | null | |
urlobbligatorio | string | |
display_urlobbligatorio | string | |
scansobbligatorio | integer | |
disabledobbligatorio | 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/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.
Parametri
| Nome | Posizione | Tipo |
|---|---|---|
idobbligatorio | Percorso | string |
Risposta 200Code
| Nome | Tipo | Descrizione |
|---|---|---|
idobbligatorio | string | ID mit Präfix «qr_» |
objectobbligatorio | "code" | |
codeobbligatorio | string | Kurzcode auf dem Schild |
targetobbligatorio | "connector" | "location" | |
connector_idobbligatorio | string | null | |
location_idobbligatorio | string | null | |
labelobbligatorio | string | null | |
urlobbligatorio | string | |
display_urlobbligatorio | string | |
scansobbligatorio | integer | |
disabledobbligatorio | 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/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.
Parametri
| Nome | Posizione | Tipo |
|---|---|---|
idobbligatorio | Percorso | string |
Richiesta
| Nome | Tipo | Descrizione |
|---|---|---|
labelfacoltativo | string | |
disabledfacoltativo | boolean |
Risposta 200Code
| Nome | Tipo | Descrizione |
|---|---|---|
idobbligatorio | string | ID mit Präfix «qr_» |
objectobbligatorio | "code" | |
codeobbligatorio | string | Kurzcode auf dem Schild |
targetobbligatorio | "connector" | "location" | |
connector_idobbligatorio | string | null | |
location_idobbligatorio | string | null | |
labelobbligatorio | string | null | |
urlobbligatorio | string | |
display_urlobbligatorio | string | |
scansobbligatorio | integer | |
disabledobbligatorio | 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/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.
Parametri
| Nome | Posizione | Tipo |
|---|---|---|
idobbligatorio | Percorso | 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/codes/{id}/qr.svg \n -H "Authorization: Bearer lh_test_…"QR-Code als PNG
get/v1/codes/{id}/qr.png
1024 × 1024 Pixel.
Parametri
| Nome | Posizione | Tipo |
|---|---|---|
idobbligatorio | Percorso | 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/codes/{id}/qr.png \n -H "Authorization: Bearer lh_test_…"