Riferimento API
Esempio Risposta 200
Esempio Risposta 201
Esempio Risposta 200
Esempio Risposta 200
Esempio Risposta 200
Standorte
5 endpoint
Le descrizioni degli endpoint provengono direttamente dall'API e sono in tedesco.
Standorte auflisten
get/v1/locations
Alle Standorte der Organisation.
Risposta 200LocationList
| Nome | Tipo | Descrizione |
|---|---|---|
objectobbligatorio | "list" | |
dataobbligatorio | Location[] | |
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/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.
Parametri
| Nome | Posizione | Tipo |
|---|---|---|
idempotency-keyfacoltativoWiederholbare Anfragen ohne doppelte Wirkung (24 Stunden) | Intestazione | string |
Richiesta
| Nome | Tipo | Descrizione |
|---|---|---|
nameobbligatorio | string | |
streetfacoltativo | string | null | |
postal_codefacoltativo | string | null | |
cityfacoltativo | string | null | |
countryfacoltativo | string | |
latitudefacoltativo | number | null | |
longitudefacoltativo | number | null | |
time_zonefacoltativo | string | |
opening_hoursfacoltativo | string | null | |
payment_integration_idfacoltativo | string | null | |
is_publicfacoltativo | boolean |
Risposta 201Location
| Nome | Tipo | Descrizione |
|---|---|---|
idobbligatorio | string | ID mit Präfix «loc_» |
objectobbligatorio | "location" | |
nameobbligatorio | string | |
streetobbligatorio | string | null | |
postal_codeobbligatorio | string | null | |
cityobbligatorio | string | null | |
countryobbligatorio | string | |
latitudeobbligatorio | number | null | |
longitudeobbligatorio | number | null | |
time_zoneobbligatorio | string | |
opening_hoursobbligatorio | string | null | |
payment_integration_idobbligatorio | string | null | Zahlungskonto für QR-Zahlungen an diesem Standort |
is_publicobbligatorio | 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/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.
Parametri
| Nome | Posizione | Tipo |
|---|---|---|
idobbligatorio | Percorso | string |
Risposta 200Location
| Nome | Tipo | Descrizione |
|---|---|---|
idobbligatorio | string | ID mit Präfix «loc_» |
objectobbligatorio | "location" | |
nameobbligatorio | string | |
streetobbligatorio | string | null | |
postal_codeobbligatorio | string | null | |
cityobbligatorio | string | null | |
countryobbligatorio | string | |
latitudeobbligatorio | number | null | |
longitudeobbligatorio | number | null | |
time_zoneobbligatorio | string | |
opening_hoursobbligatorio | string | null | |
payment_integration_idobbligatorio | string | null | Zahlungskonto für QR-Zahlungen an diesem Standort |
is_publicobbligatorio | 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/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.
Parametri
| Nome | Posizione | Tipo |
|---|---|---|
idobbligatorio | Percorso | string |
Richiesta
| Nome | Tipo | Descrizione |
|---|---|---|
namefacoltativo | string | |
streetfacoltativo | string | null | |
postal_codefacoltativo | string | null | |
cityfacoltativo | string | null | |
countryfacoltativo | string | |
latitudefacoltativo | number | null | |
longitudefacoltativo | number | null | |
time_zonefacoltativo | string | |
opening_hoursfacoltativo | string | null | |
payment_integration_idfacoltativo | string | null | |
is_publicfacoltativo | boolean |
Risposta 200Location
| Nome | Tipo | Descrizione |
|---|---|---|
idobbligatorio | string | ID mit Präfix «loc_» |
objectobbligatorio | "location" | |
nameobbligatorio | string | |
streetobbligatorio | string | null | |
postal_codeobbligatorio | string | null | |
cityobbligatorio | string | null | |
countryobbligatorio | string | |
latitudeobbligatorio | number | null | |
longitudeobbligatorio | number | null | |
time_zoneobbligatorio | string | |
opening_hoursobbligatorio | string | null | |
payment_integration_idobbligatorio | string | null | Zahlungskonto für QR-Zahlungen an diesem Standort |
is_publicobbligatorio | 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/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.
Parametri
| Nome | Posizione | Tipo |
|---|---|---|
idobbligatorio | Percorso | string |
Risposta 200Deleted
| Nome | Tipo | Descrizione |
|---|---|---|
idobbligatorio | string | |
objectobbligatorio | string | |
deletedobbligatorio | true |
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 DELETE https://api.ladehase.com/v1/locations/{id} \n -H "Authorization: Bearer lh_test_…"{
"id": "string",
"object": "string",
"deleted": true
}