API-Referenz
Beispiel Antwort 200
Beispiel Antwort 201
Beispiel Antwort 200
Beispiel Antwort 200
Beispiel Antwort 200
Standorte
5 Endpunkte
Standorte auflisten
get/v1/locations
Alle Standorte der Organisation.
Antwort 200LocationList
| Name | Typ | Beschreibung |
|---|---|---|
objectPflicht | "list" | |
dataPflicht | Location[] | |
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/locations \n -H "Authorization: Bearer lh_test_…"{
"object": "list",
"data": [
{
"id": "loc_2b8e1c0d9f7a6b5c",
"object": "location",
"name": "Hofladen",
"street": "string",
"postal_code": "string",
"city": "string",
"country": "string",
"latitude": 0,
"longitude": 0,
"time_zone": "string",
"opening_hours": "string",
"payment_integration_id": "string",
"is_public": true,
"created_at": "string"
}
],
"has_more": true
}Standort anlegen
post/v1/locations
Neuer Standort mit Adresse und Zahlungskonto für QR-Zahlungen.
Parameter
| Name | Ort | Typ |
|---|---|---|
idempotency-keyoptionalWiederholbare Anfragen ohne doppelte Wirkung (24 Stunden) | Kopfzeile | string |
Anfrage
| Name | Typ | Beschreibung |
|---|---|---|
namePflicht | string | |
streetoptional | string | null | |
postal_codeoptional | string | null | |
cityoptional | string | null | |
countryoptional | string | |
latitudeoptional | number | null | |
longitudeoptional | number | null | |
time_zoneoptional | string | |
opening_hoursoptional | string | null | |
payment_integration_idoptional | string | null | |
is_publicoptional | boolean |
Antwort 201Location
| Name | Typ | Beschreibung |
|---|---|---|
idPflicht | string | ID mit Präfix «loc_» |
objectPflicht | "location" | |
namePflicht | string | |
streetPflicht | string | null | |
postal_codePflicht | string | null | |
cityPflicht | string | null | |
countryPflicht | string | |
latitudePflicht | number | null | |
longitudePflicht | number | null | |
time_zonePflicht | string | |
opening_hoursPflicht | string | null | |
payment_integration_idPflicht | string | null | Zahlungskonto für QR-Zahlungen an diesem Standort |
is_publicPflicht | 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/locations \n -H "Authorization: Bearer lh_test_…" \n -H "Content-Type: application/json" \n -d '{"name":"string","street":"string","postal_code":"string","city":"string","country":"CH","latitude":-90,"longitude":-180,"time_zone":"Europe/Zurich","opening_hours":"string","payment_integration_id":"string","is_public":true}'{
"id": "loc_2b8e1c0d9f7a6b5c",
"object": "location",
"name": "Hofladen",
"street": "string",
"postal_code": "string",
"city": "string",
"country": "string",
"latitude": 0,
"longitude": 0,
"time_zone": "string",
"opening_hours": "string",
"payment_integration_id": "string",
"is_public": true,
"created_at": "string"
}Standort abrufen
get/v1/locations/{id}
Ein Standort.
Parameter
| Name | Ort | Typ |
|---|---|---|
idPflicht | Pfad | string |
Antwort 200Location
| Name | Typ | Beschreibung |
|---|---|---|
idPflicht | string | ID mit Präfix «loc_» |
objectPflicht | "location" | |
namePflicht | string | |
streetPflicht | string | null | |
postal_codePflicht | string | null | |
cityPflicht | string | null | |
countryPflicht | string | |
latitudePflicht | number | null | |
longitudePflicht | number | null | |
time_zonePflicht | string | |
opening_hoursPflicht | string | null | |
payment_integration_idPflicht | string | null | Zahlungskonto für QR-Zahlungen an diesem Standort |
is_publicPflicht | 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/locations/{id} \n -H "Authorization: Bearer lh_test_…"{
"id": "loc_2b8e1c0d9f7a6b5c",
"object": "location",
"name": "Hofladen",
"street": "string",
"postal_code": "string",
"city": "string",
"country": "string",
"latitude": 0,
"longitude": 0,
"time_zone": "string",
"opening_hours": "string",
"payment_integration_id": "string",
"is_public": true,
"created_at": "string"
}Standort ändern
patch/v1/locations/{id}
Ändert Name, Adresse, Öffnungszeiten oder das Zahlungskonto.
Parameter
| Name | Ort | Typ |
|---|---|---|
idPflicht | Pfad | string |
Anfrage
| Name | Typ | Beschreibung |
|---|---|---|
nameoptional | string | |
streetoptional | string | null | |
postal_codeoptional | string | null | |
cityoptional | string | null | |
countryoptional | string | |
latitudeoptional | number | null | |
longitudeoptional | number | null | |
time_zoneoptional | string | |
opening_hoursoptional | string | null | |
payment_integration_idoptional | string | null | |
is_publicoptional | boolean |
Antwort 200Location
| Name | Typ | Beschreibung |
|---|---|---|
idPflicht | string | ID mit Präfix «loc_» |
objectPflicht | "location" | |
namePflicht | string | |
streetPflicht | string | null | |
postal_codePflicht | string | null | |
cityPflicht | string | null | |
countryPflicht | string | |
latitudePflicht | number | null | |
longitudePflicht | number | null | |
time_zonePflicht | string | |
opening_hoursPflicht | string | null | |
payment_integration_idPflicht | string | null | Zahlungskonto für QR-Zahlungen an diesem Standort |
is_publicPflicht | 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/locations/{id} \n -H "Authorization: Bearer lh_test_…" \n -H "Content-Type: application/json" \n -d '{"name":"string","street":"string","postal_code":"string","city":"string","country":"CH","latitude":-90,"longitude":-180,"time_zone":"Europe/Zurich","opening_hours":"string","payment_integration_id":"string","is_public":true}'{
"id": "loc_2b8e1c0d9f7a6b5c",
"object": "location",
"name": "Hofladen",
"street": "string",
"postal_code": "string",
"city": "string",
"country": "string",
"latitude": 0,
"longitude": 0,
"time_zone": "string",
"opening_hours": "string",
"payment_integration_id": "string",
"is_public": true,
"created_at": "string"
}Standort löschen
delete/v1/locations/{id}
Nur Standorte ohne Geräte.
Parameter
| Name | Ort | Typ |
|---|---|---|
idPflicht | Pfad | string |
Antwort 200Deleted
| Name | Typ | Beschreibung |
|---|---|---|
idPflicht | string | |
objectPflicht | string | |
deletedPflicht | true |
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 DELETE https://api.ladehase.com/v1/locations/{id} \n -H "Authorization: Bearer lh_test_…"{
"id": "string",
"object": "string",
"deleted": true
}