Skip to content
API reference

Standorte

5 endpoints

The endpoint descriptions come directly from the API and are in German.

Standorte auflisten

get/v1/locations

Alle Standorte der Organisation.

Response 200LocationList

NameTypeDescription
objectrequired"list"
datarequiredLocation[]
has_morerequiredboolean

Possible errors

  • 400 Anfrage ungültig
  • 401 Nicht angemeldet
  • 403 Berechtigung fehlt
  • 404 Nicht gefunden
  • 409 Zustand passt nicht
  • 429 Zu viele Anfragen
Example
curl -X GET https://api.ladehase.com/v1/locations \n  -H "Authorization: Bearer lh_test_…"
Response 200
{
  "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.

Parameters

NameInType
idempotency-keyoptionalWiederholbare Anfragen ohne doppelte Wirkung (24 Stunden)Headerstring

Request

NameTypeDescription
namerequiredstring
streetoptionalstring | null
postal_codeoptionalstring | null
cityoptionalstring | null
countryoptionalstring
latitudeoptionalnumber | null
longitudeoptionalnumber | null
time_zoneoptionalstring
opening_hoursoptionalstring | null
payment_integration_idoptionalstring | null
is_publicoptionalboolean

Response 201Location

NameTypeDescription
idrequiredstringID mit Präfix «loc_»
objectrequired"location"
namerequiredstring
streetrequiredstring | null
postal_coderequiredstring | null
cityrequiredstring | null
countryrequiredstring
latituderequirednumber | null
longituderequirednumber | null
time_zonerequiredstring
opening_hoursrequiredstring | null
payment_integration_idrequiredstring | nullZahlungskonto für QR-Zahlungen an diesem Standort
is_publicrequiredboolean
created_atrequiredstring

Possible errors

  • 400 Anfrage ungültig
  • 401 Nicht angemeldet
  • 403 Berechtigung fehlt
  • 404 Nicht gefunden
  • 409 Zustand passt nicht
  • 429 Zu viele Anfragen
Example
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}'
Response 201
{
  "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.

Parameters

NameInType
idrequiredPathstring

Response 200Location

NameTypeDescription
idrequiredstringID mit Präfix «loc_»
objectrequired"location"
namerequiredstring
streetrequiredstring | null
postal_coderequiredstring | null
cityrequiredstring | null
countryrequiredstring
latituderequirednumber | null
longituderequirednumber | null
time_zonerequiredstring
opening_hoursrequiredstring | null
payment_integration_idrequiredstring | nullZahlungskonto für QR-Zahlungen an diesem Standort
is_publicrequiredboolean
created_atrequiredstring

Possible errors

  • 400 Anfrage ungültig
  • 401 Nicht angemeldet
  • 403 Berechtigung fehlt
  • 404 Nicht gefunden
  • 409 Zustand passt nicht
  • 429 Zu viele Anfragen
Example
curl -X GET https://api.ladehase.com/v1/locations/{id} \n  -H "Authorization: Bearer lh_test_…"
Response 200
{
  "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.

Parameters

NameInType
idrequiredPathstring

Request

NameTypeDescription
nameoptionalstring
streetoptionalstring | null
postal_codeoptionalstring | null
cityoptionalstring | null
countryoptionalstring
latitudeoptionalnumber | null
longitudeoptionalnumber | null
time_zoneoptionalstring
opening_hoursoptionalstring | null
payment_integration_idoptionalstring | null
is_publicoptionalboolean

Response 200Location

NameTypeDescription
idrequiredstringID mit Präfix «loc_»
objectrequired"location"
namerequiredstring
streetrequiredstring | null
postal_coderequiredstring | null
cityrequiredstring | null
countryrequiredstring
latituderequirednumber | null
longituderequirednumber | null
time_zonerequiredstring
opening_hoursrequiredstring | null
payment_integration_idrequiredstring | nullZahlungskonto für QR-Zahlungen an diesem Standort
is_publicrequiredboolean
created_atrequiredstring

Possible errors

  • 400 Anfrage ungültig
  • 401 Nicht angemeldet
  • 403 Berechtigung fehlt
  • 404 Nicht gefunden
  • 409 Zustand passt nicht
  • 429 Zu viele Anfragen
Example
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}'
Response 200
{
  "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.

Parameters

NameInType
idrequiredPathstring

Response 200Deleted

NameTypeDescription
idrequiredstring
objectrequiredstring
deletedrequiredtrue

Possible errors

  • 400 Anfrage ungültig
  • 401 Nicht angemeldet
  • 403 Berechtigung fehlt
  • 404 Nicht gefunden
  • 409 Zustand passt nicht
  • 429 Zu viele Anfragen
Example
curl -X DELETE https://api.ladehase.com/v1/locations/{id} \n  -H "Authorization: Bearer lh_test_…"
Response 200
{
  "id": "string",
  "object": "string",
  "deleted": true
}