API reference
Example Response 200
Example Response 201
Example Response 200
Example Response 200
Example
Example
QR-Codes
6 endpoints
The endpoint descriptions come directly from the API and are in German.
QR-Codes auflisten
get/v1/codes
Statische QR-Codes mit URL und Anzahl Scans.
Response 200CodeList
| Name | Type | Description |
|---|---|---|
objectrequired | "list" | |
datarequired | Code[] | |
has_morerequired | boolean |
Possible errors
- 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).
Parameters
| Name | In | Type |
|---|---|---|
idempotency-keyoptionalWiederholbare Anfragen ohne doppelte Wirkung (24 Stunden) | Header | string |
Request
| Name | Type | Description |
|---|---|---|
targetrequired | "connector" | "location" | |
connector_idoptional | string | |
location_idoptional | string | |
labeloptional | string |
Response 201Code
| Name | Type | Description |
|---|---|---|
idrequired | string | ID mit Präfix «qr_» |
objectrequired | "code" | |
coderequired | string | Kurzcode auf dem Schild |
targetrequired | "connector" | "location" | |
connector_idrequired | string | null | |
location_idrequired | string | null | |
labelrequired | string | null | |
urlrequired | string | |
display_urlrequired | string | |
scansrequired | integer | |
disabledrequired | boolean | |
created_atrequired | string |
Possible errors
- 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.
Parameters
| Name | In | Type |
|---|---|---|
idrequired | Path | string |
Response 200Code
| Name | Type | Description |
|---|---|---|
idrequired | string | ID mit Präfix «qr_» |
objectrequired | "code" | |
coderequired | string | Kurzcode auf dem Schild |
targetrequired | "connector" | "location" | |
connector_idrequired | string | null | |
location_idrequired | string | null | |
labelrequired | string | null | |
urlrequired | string | |
display_urlrequired | string | |
scansrequired | integer | |
disabledrequired | boolean | |
created_atrequired | string |
Possible errors
- 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.
Parameters
| Name | In | Type |
|---|---|---|
idrequired | Path | string |
Request
| Name | Type | Description |
|---|---|---|
labeloptional | string | |
disabledoptional | boolean |
Response 200Code
| Name | Type | Description |
|---|---|---|
idrequired | string | ID mit Präfix «qr_» |
objectrequired | "code" | |
coderequired | string | Kurzcode auf dem Schild |
targetrequired | "connector" | "location" | |
connector_idrequired | string | null | |
location_idrequired | string | null | |
labelrequired | string | null | |
urlrequired | string | |
display_urlrequired | string | |
scansrequired | integer | |
disabledrequired | boolean | |
created_atrequired | string |
Possible errors
- 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.
Parameters
| Name | In | Type |
|---|---|---|
idrequired | Path | string |
Possible errors
- 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.
Parameters
| Name | In | Type |
|---|---|---|
idrequired | Path | string |
Possible errors
- 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_…"