Skip to Content
DevelopersLocations

Locations

A Selflane location is one restaurant with its own POS, menu, and sales. An API key covers one or more locations, chosen by the owner who created it. A request can read only the locations its key covers.

List your locations

GET /v1/locations returns every location the key covers. It doesn’t need a location parameter. If you pass one, the list narrows to that location, and a location the key doesn’t cover answers 403 location_not_permitted.

curl https://developer.selflane.com/v1/locations \ -H "Authorization: Bearer $SELFLANE_API_KEY"

Each location has an id. Use it as the location parameter on other requests. Every resource the API returns also carries the location it belongs to.

An owner can add or remove locations on a key at any time. Read this list at the start of each sync instead of storing it once.

Name the location

Most endpoints read one location at a time:

  • Key covers one location: location is optional.
  • Key covers several locations: location is required. Without it the API answers 400 location_required.
curl "https://developer.selflane.com/v1/reports?location=64b0c1e2f3a4b5c6d7e8f901&from=2026-11-01&to=2026-11-07" \ -H "Authorization: Bearer $SELFLANE_API_KEY"

The API reference says which endpoints read one location.

When a location is refused

StatuscodeMeaning
400location_requiredThe key covers several locations and the request named none.
403location_not_permittedThe key doesn’t cover that location. It may have been removed from the key.
403plan_requiredThe location isn’t live, or isn’t on the POS plan or above. The key is kept and works again once the location qualifies.
404location_missingThe location no longer exists.
Last updated on