Locations
Manage physical locations (stores, branches, points of sale) for your tenant. Devices and employees are assigned to locations for reporting and access control.
/api/tenant/locationsList all locations for your tenant.
Headers
| Name | Type | Required | Description |
|---|---|---|---|
| Authorization | string | Required | Bearer <access_token> — requires locations:read scope |
AuthorizationstringRequiredBearer <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"
}
]
}/api/tenant/locations/:idRetrieve a single location by ID.
Headers
| Name | Type | Required | Description |
|---|---|---|---|
| Authorization | string | Required | Bearer <access_token> — requires locations:read scope |
AuthorizationstringRequiredBearer <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"
}
}/api/tenant/locationsCreate a new location. Returns the generated location ID.
Headers
| Name | Type | Required | Description |
|---|---|---|---|
| Authorization | string | Required | Bearer <access_token> — requires admin scope |
| Content-Type | string | Required | application/json |
AuthorizationstringRequiredBearer <access_token> — requires admin scope
Content-TypestringRequiredapplication/json
Request Body
| Name | Type | Required | Description |
|---|---|---|---|
| name | string | Required | Display name for the location |
| address | string | Required | Street address |
| address2 | string | Optional | Second address line (floor, unit, etc.) |
| city | string | Required | City |
| postcode | string | Required | Postal code |
namestringRequiredDisplay name for the location
addressstringRequiredStreet address
address2stringOptionalSecond address line (floor, unit, etc.)
citystringRequiredCity
postcodestringRequiredPostal code
Response
{
"data": {
"id": "loc_abc123",
"name": "Flagship Store",
"address": "Laugavegur 1",
"city": "Reykjavík",
"postcode": "101",
"createdAt": "2024-01-15T10:00:00.000Z"
}
}/api/tenant/locations/:idUpdate an existing location. All fields are optional.
Headers
| Name | Type | Required | Description |
|---|---|---|---|
| Authorization | string | Required | Bearer <access_token> — requires admin scope |
| Content-Type | string | Required | application/json |
AuthorizationstringRequiredBearer <access_token> — requires admin scope
Content-TypestringRequiredapplication/json
Request Body
| Name | Type | Required | Description |
|---|---|---|---|
| name | string | Optional | Display name for the location |
| address | string | Optional | Street address |
| address2 | string | Optional | Second address line |
| city | string | Optional | City |
| postcode | string | Optional | Postal code |
namestringOptionalDisplay name for the location
addressstringOptionalStreet address
address2stringOptionalSecond address line
citystringOptionalCity
postcodestringOptionalPostal 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"
}
}/api/tenant/locations/:idDelete a location. Also unassigns all devices associated with that location.
Headers
| Name | Type | Required | Description |
|---|---|---|---|
| Authorization | string | Required | Bearer <access_token> — requires admin scope |
AuthorizationstringRequiredBearer <access_token> — requires admin scope
Response
{ "success": true }