Référence API
Exemple Réponse 200
Exemple Réponse 201
Exemple Réponse 200
Exemple Réponse 200
Exemple Réponse 200
Standorte
5 endpoints
Les descriptions des endpoints proviennent directement de l'API et sont en allemand.
Standorte auflisten
get/v1/locations
Alle Standorte der Organisation.
Réponse 200LocationList
| Nom | Type | Description |
|---|---|---|
objectobligatoire | "list" | |
dataobligatoire | Location[] | |
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/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.
Paramètres
| Nom | Emplacement | Type |
|---|---|---|
idempotency-keyfacultatifWiederholbare Anfragen ohne doppelte Wirkung (24 Stunden) | En-tête | string |
Requête
| Nom | Type | Description |
|---|---|---|
nameobligatoire | string | |
streetfacultatif | string | null | |
postal_codefacultatif | string | null | |
cityfacultatif | string | null | |
countryfacultatif | string | |
latitudefacultatif | number | null | |
longitudefacultatif | number | null | |
time_zonefacultatif | string | |
opening_hoursfacultatif | string | null | |
payment_integration_idfacultatif | string | null | |
is_publicfacultatif | boolean |
Réponse 201Location
| Nom | Type | Description |
|---|---|---|
idobligatoire | string | ID mit Präfix «loc_» |
objectobligatoire | "location" | |
nameobligatoire | string | |
streetobligatoire | string | null | |
postal_codeobligatoire | string | null | |
cityobligatoire | string | null | |
countryobligatoire | string | |
latitudeobligatoire | number | null | |
longitudeobligatoire | number | null | |
time_zoneobligatoire | string | |
opening_hoursobligatoire | string | null | |
payment_integration_idobligatoire | string | null | Zahlungskonto für QR-Zahlungen an diesem Standort |
is_publicobligatoire | 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/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.
Paramètres
| Nom | Emplacement | Type |
|---|---|---|
idobligatoire | Chemin | string |
Réponse 200Location
| Nom | Type | Description |
|---|---|---|
idobligatoire | string | ID mit Präfix «loc_» |
objectobligatoire | "location" | |
nameobligatoire | string | |
streetobligatoire | string | null | |
postal_codeobligatoire | string | null | |
cityobligatoire | string | null | |
countryobligatoire | string | |
latitudeobligatoire | number | null | |
longitudeobligatoire | number | null | |
time_zoneobligatoire | string | |
opening_hoursobligatoire | string | null | |
payment_integration_idobligatoire | string | null | Zahlungskonto für QR-Zahlungen an diesem Standort |
is_publicobligatoire | 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/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.
Paramètres
| Nom | Emplacement | Type |
|---|---|---|
idobligatoire | Chemin | string |
Requête
| Nom | Type | Description |
|---|---|---|
namefacultatif | string | |
streetfacultatif | string | null | |
postal_codefacultatif | string | null | |
cityfacultatif | string | null | |
countryfacultatif | string | |
latitudefacultatif | number | null | |
longitudefacultatif | number | null | |
time_zonefacultatif | string | |
opening_hoursfacultatif | string | null | |
payment_integration_idfacultatif | string | null | |
is_publicfacultatif | boolean |
Réponse 200Location
| Nom | Type | Description |
|---|---|---|
idobligatoire | string | ID mit Präfix «loc_» |
objectobligatoire | "location" | |
nameobligatoire | string | |
streetobligatoire | string | null | |
postal_codeobligatoire | string | null | |
cityobligatoire | string | null | |
countryobligatoire | string | |
latitudeobligatoire | number | null | |
longitudeobligatoire | number | null | |
time_zoneobligatoire | string | |
opening_hoursobligatoire | string | null | |
payment_integration_idobligatoire | string | null | Zahlungskonto für QR-Zahlungen an diesem Standort |
is_publicobligatoire | 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/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.
Paramètres
| Nom | Emplacement | Type |
|---|---|---|
idobligatoire | Chemin | string |
Réponse 200Deleted
| Nom | Type | Description |
|---|---|---|
idobligatoire | string | |
objectobligatoire | string | |
deletedobligatoire | true |
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 DELETE https://api.ladehase.com/v1/locations/{id} \n -H "Authorization: Bearer lh_test_…"{
"id": "string",
"object": "string",
"deleted": true
}