Locations
Manage the physical locations (stores, points of sale) in your tenant. Devices and employees are assigned to locations. A verification made on a device records the device's locationId, when it has one (see the device object on the Devices page).
The location object
id,createdAt(ISO 8601),updatedAt(epoch ms)name,address, and, each left out when not set,address2,city,postcode,externalId
externalId is your own ID for the location (for example your POS location ID). It is unique among your tenant's locations, so you can push locations idempotently: look one up with ?externalId= before creating it. Deleting a location frees its externalId. Pagination, sorting and field formats follow the shared conventions.
Devices: the reads below accept device (DPoP) tokens, but a device's default scopes don't include locations:read, so most devices get 403. A device can always read its own locations from GET /api/v1/devices/{id}.
/api/v1/locationsList the locations in your tenant. Callers: service client (Bearer) and device (DPoP). Sorted by createdAt descending unless you pass sortBy. Without limit, every location is returned in one response; with limit, the response is a page with nextCursor and hasMore (nextCursor is null on the last page).
Headers
| Name | Type | Required | Description |
|---|---|---|---|
| Authorization | string | Required | Bearer <access_token> (service client) or DPoP <access_token> (device). Requires locations:read. |
| DPoP | string | Optional | Device callers only: the DPoP proof for this request, including ath. |
AuthorizationstringRequiredBearer <access_token> (service client) or DPoP <access_token> (device). Requires locations:read.
DPoPstringOptionalDevice callers only: the DPoP proof for this request, including ath.
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| name | string | Optional | Case-insensitive substring match on the name |
| externalId | string | Optional | Exact match on externalId |
| sortBy | string | Optional | "name" | "createdAt" | "updatedAt". Default "createdAt" |
| sortOrder | string | Optional | "asc" | "desc". Default "desc" |
| limit | integer | Optional | Page size, a positive integer |
| cursor | string | Optional | nextCursor from the previous page |
namestringOptionalCase-insensitive substring match on the name
externalIdstringOptionalExact match on externalId
sortBystringOptional"name" | "createdAt" | "updatedAt". Default "createdAt"
sortOrderstringOptional"asc" | "desc". Default "desc"
limitintegerOptionalPage size, a positive integer
cursorstringOptionalnextCursor from the previous page
Examples
cURL
curl "https://abyrgverslun.is/api/v1/locations?sortBy=name&sortOrder=asc" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"Response
{
"data": [
{
"id": "jh7bq3r8t2w6y9u1i4o5p7a3s6d8f2gk",
"createdAt": "2026-04-11T13:02:45.906Z",
"name": "Kringlan",
"address": "Kringlan 4-12",
"address2": "2. hæð",
"city": "Reykjavík",
"postcode": "103",
"updatedAt": 1775912565906
},
{
"id": "jh72m4q9x1c8n3v5b6z0k2d7f4g9t1ra",
"createdAt": "2026-03-02T09:14:27.512Z",
"name": "Laugavegur",
"address": "Laugavegur 26",
"city": "Reykjavík",
"postcode": "101",
"updatedAt": 1772442867512
}
]
}Errors
401Missing, invalid or expired token, or a device token sent as Bearer.403The token lacks locations:read.422A query parameter failed validation (limit, sortBy or sortOrder).
Response format: Errors.
/api/v1/locationsCreate a location. Callers: service client (Bearer) only; a device (DPoP) call gets 403. Returns 201 with the new location.
Headers
| Name | Type | Required | Description |
|---|---|---|---|
| Authorization | string | Required | Bearer <access_token> (service client). Requires locations:write. |
| Content-Type | string | Required | application/json |
AuthorizationstringRequiredBearer <access_token> (service client). Requires locations:write.
Content-TypestringRequiredapplication/json
Request Body
| Name | Type | Required | Description |
|---|---|---|---|
| name | string | Required | 1-100 characters |
| address | string | Required | Street address, 1-200 characters |
| address2 | string | Optional | Second address line (floor, unit), up to 200 characters |
| city | string | Optional | 1-100 characters. Optional: address may hold the whole free-text address |
| postcode | string | Optional | 1-20 characters |
| externalId | string | Optional | Your own ID for the location, 1-100 characters, unique in your tenant |
namestringRequired1-100 characters
addressstringRequiredStreet address, 1-200 characters
address2stringOptionalSecond address line (floor, unit), up to 200 characters
citystringOptional1-100 characters. Optional: address may hold the whole free-text address
postcodestringOptional1-20 characters
externalIdstringOptionalYour own ID for the location, 1-100 characters, unique in your tenant
Examples
cURL
curl -X POST https://abyrgverslun.is/api/v1/locations \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Kringlan",
"address": "Kringlan 4-12",
"address2": "2. hæð",
"city": "Reykjavík",
"postcode": "103",
"externalId": "store-12"
}'Response
// 201 Created
{
"data": {
"id": "jh7bq3r8t2w6y9u1i4o5p7a3s6d8f2gk",
"createdAt": "2026-04-11T13:02:45.906Z",
"name": "Kringlan",
"address": "Kringlan 4-12",
"address2": "2. hæð",
"city": "Reykjavík",
"postcode": "103",
"externalId": "store-12",
"updatedAt": 1775912565906
}
}Errors
400Body is not valid JSON.401Missing, invalid or expired token.403The token lacks locations:write, or the caller is a device.409Another location in your tenant has this externalId.422The body failed validation.
Response format: Errors.
/api/v1/locations/{id}Read one location. Callers: service client (Bearer) and device (DPoP).
Headers
| Name | Type | Required | Description |
|---|---|---|---|
| Authorization | string | Required | Bearer <access_token> (service client) or DPoP <access_token> (device). Requires locations:read. |
| DPoP | string | Optional | Device callers only: the DPoP proof for this request, including ath. |
AuthorizationstringRequiredBearer <access_token> (service client) or DPoP <access_token> (device). Requires locations:read.
DPoPstringOptionalDevice callers only: the DPoP proof for this request, including ath.
Response
{
"data": {
"id": "jh7bq3r8t2w6y9u1i4o5p7a3s6d8f2gk",
"createdAt": "2026-04-11T13:02:45.906Z",
"name": "Kringlan",
"address": "Kringlan 4-12",
"address2": "2. hæð",
"city": "Reykjavík",
"postcode": "103",
"updatedAt": 1775912565906
}
}Errors
401Missing, invalid or expired token, or a device token sent as Bearer.403The token lacks locations:read.404No location with this ID in your tenant: unknown, malformed, deleted, or another tenant's.
Response format: Errors.
/api/v1/locations/{id}Update a location. Callers: service client (Bearer) only; a device (DPoP) call gets 403. Send only the fields you want to change; fields you leave out keep their values. Returns the updated location.
Headers
| Name | Type | Required | Description |
|---|---|---|---|
| Authorization | string | Required | Bearer <access_token> (service client). Requires locations:write. |
| Content-Type | string | Required | application/json |
AuthorizationstringRequiredBearer <access_token> (service client). Requires locations:write.
Content-TypestringRequiredapplication/json
Request Body
| Name | Type | Required | Description |
|---|---|---|---|
| name | string | Optional | 1-100 characters |
| address | string | Optional | 1-200 characters |
| address2 | string | Optional | Up to 200 characters |
| city | string | Optional | 1-100 characters |
| postcode | string | Optional | 1-20 characters |
| externalId | string | Optional | Your own ID for the location, 1-100 characters, unique in your tenant |
namestringOptional1-100 characters
addressstringOptional1-200 characters
address2stringOptionalUp to 200 characters
citystringOptional1-100 characters
postcodestringOptional1-20 characters
externalIdstringOptionalYour own ID for the location, 1-100 characters, unique in your tenant
Examples
cURL
curl -X PATCH https://abyrgverslun.is/api/v1/locations/jh7bq3r8t2w6y9u1i4o5p7a3s6d8f2gk \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{ "name": "Kringlan 2. hæð" }'Response
{
"data": {
"id": "jh7bq3r8t2w6y9u1i4o5p7a3s6d8f2gk",
"createdAt": "2026-04-11T13:02:45.906Z",
"name": "Kringlan 2. hæð",
"address": "Kringlan 4-12",
"address2": "2. hæð",
"city": "Reykjavík",
"postcode": "103",
"updatedAt": 1778063472301
}
}Errors
400Body is not valid JSON.401Missing, invalid or expired token.403The token lacks locations:write, the caller is a device, or the ID belongs to another tenant.404Unknown, malformed or deleted location ID.409Another location in your tenant has this externalId.422The body failed validation.
Response format: Errors.
/api/v1/locations/{id}Delete a location. Callers: service client (Bearer) only; a device (DPoP) call gets 403. This is a soft delete: the location disappears from lists and reads, and from the locationIds and locations of the devices and employees assigned to it, but their assignments are not removed. A device whose locationId is this location keeps it, so that device's new transactions still carry this location's ID. Past transactions are unchanged. Deleting the same location again returns 404.
Headers
| Name | Type | Required | Description |
|---|---|---|---|
| Authorization | string | Required | Bearer <access_token> (service client). Requires locations:delete or locations:write. |
AuthorizationstringRequiredBearer <access_token> (service client). Requires locations:delete or locations:write.
Response
{ "deleted": true }Errors
401Missing, invalid or expired token.403The token lacks both locations:delete and locations:write, the caller is a device, or the ID belongs to another tenant.404Unknown, malformed or already deleted location ID.
Response format: Errors.