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:
locationis optional. - Key covers several locations:
locationis required. Without it the API answers400location_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
| Status | code | Meaning |
|---|---|---|
400 | location_required | The key covers several locations and the request named none. |
403 | location_not_permitted | The key doesn’t cover that location. It may have been removed from the key. |
403 | plan_required | The location isn’t live, or isn’t on the POS plan or above. The key is kept and works again once the location qualifies. |
404 | location_missing | The location no longer exists. |