Locations

Manage physical locations (stores, branches, points of sale) for your tenant. Devices and employees are assigned to locations for reporting and access control.

GET/api/tenant/locations

List all locations for your tenant.

Headers

AuthorizationstringRequired

Bearer <access_token> — requires locations:read scope

Response

{
  "data": [
    {
      "id": "loc_abc123",
      "name": "Flagship Store",
      "address": "Laugavegur 1",
      "address2": null,
      "city": "Reykjavík",
      "postcode": "101",
      "createdAt": "2024-01-15T10:00:00.000Z"
    }
  ]
}
GET/api/tenant/locations/:id

Retrieve a single location by ID.

Headers

AuthorizationstringRequired

Bearer <access_token> — requires locations:read scope

Response

{
  "data": {
    "id": "loc_abc123",
    "name": "Flagship Store",
    "address": "Laugavegur 1",
    "address2": null,
    "city": "Reykjavík",
    "postcode": "101",
    "createdAt": "2024-01-15T10:00:00.000Z"
  }
}
POST/api/tenant/locations

Create a new location. Returns the generated location ID.

Headers

AuthorizationstringRequired

Bearer <access_token> — requires admin scope

Content-TypestringRequired

application/json

Request Body

namestringRequired

Display name for the location

addressstringRequired

Street address

address2stringOptional

Second address line (floor, unit, etc.)

citystringRequired

City

postcodestringRequired

Postal code

Response

{
  "data": {
    "id": "loc_abc123",
    "name": "Flagship Store",
    "address": "Laugavegur 1",
    "city": "Reykjavík",
    "postcode": "101",
    "createdAt": "2024-01-15T10:00:00.000Z"
  }
}
PATCH/api/tenant/locations/:id

Update an existing location. All fields are optional.

Headers

AuthorizationstringRequired

Bearer <access_token> — requires admin scope

Content-TypestringRequired

application/json

Request Body

namestringOptional

Display name for the location

addressstringOptional

Street address

address2stringOptional

Second address line

citystringOptional

City

postcodestringOptional

Postal code

Response

{
  "data": {
    "id": "loc_abc123",
    "name": "Flagship Store",
    "address": "Laugavegur 1",
    "address2": null,
    "city": "Reykjavík",
    "postcode": "101",
    "createdAt": "2024-01-15T10:00:00.000Z"
  }
}
DELETE/api/tenant/locations/:id

Delete a location. Also unassigns all devices associated with that location.

Headers

AuthorizationstringRequired

Bearer <access_token> — requires admin scope

Response

{ "success": true }