Employees
Manage employee records for your tenant. Employees are assigned to locations and use 6-digit access codes to identify themselves on devices.
Note: The SSN is hashed server-side and never stored in plain text. The accessCode is only shown in the POST response and cannot be retrieved again.
/api/tenant/employeesList all employees for your tenant. Optionally filter by location.
Headers
| Name | Type | Required | Description |
|---|---|---|---|
| Authorization | string | Required | Bearer <access_token> — requires employees:read scope |
AuthorizationstringRequiredBearer <access_token> — requires employees:read scope
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| locationId | string | Optional | Filter employees assigned to a specific location |
locationIdstringOptionalFilter employees assigned to a specific location
Response
{
"data": [
{
"id": "emp_abc123",
"name": "Jón Jónsson",
"phoneNumber": "7771234",
"locationIds": ["loc_xyz"],
"createdAt": "2024-01-15T10:00:00.000Z"
}
]
}/api/tenant/employees/:idRetrieve a single employee by ID.
Headers
| Name | Type | Required | Description |
|---|---|---|---|
| Authorization | string | Required | Bearer <access_token> — requires employees:read scope |
AuthorizationstringRequiredBearer <access_token> — requires employees:read scope
Response
{
"data": {
"id": "emp_abc123",
"name": "Jón Jónsson",
"phoneNumber": "7771234",
"locationIds": ["loc_xyz"],
"createdAt": "2024-01-15T10:00:00.000Z"
}
}/api/tenant/employeesCreate a new employee. Returns the generated employee ID and access code. The access code is shown only once — store it securely before responding to the customer.
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 | Employee's full name |
| ssn | string | Required | Employee's Icelandic social security number (kennitala). Hashed server-side — never stored in plain text. |
| phoneNumber | string | Required | Employee's phone number |
| accessCode | string | Optional | 6-digit access code. If omitted, one is generated automatically. |
| locationIds | string[] | Optional | List of location IDs to assign the employee to |
namestringRequiredEmployee's full name
ssnstringRequiredEmployee's Icelandic social security number (kennitala). Hashed server-side — never stored in plain text.
phoneNumberstringRequiredEmployee's phone number
accessCodestringOptional6-digit access code. If omitted, one is generated automatically.
locationIdsstring[]OptionalList of location IDs to assign the employee to
Response
{
"employeeId": "emp_abc123",
"accessCode": "483920"
}/api/tenant/employees/:idUpdate an existing employee. All fields are optional. Sending an empty locationIds array clears all location assignments.
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 | Employee's full name |
| phoneNumber | string | Optional | Employee's phone number |
| accessCode | string | Optional | New 6-digit access code |
| locationIds | string[] | Optional | Updated list of location IDs. Empty array clears all assignments. |
namestringOptionalEmployee's full name
phoneNumberstringOptionalEmployee's phone number
accessCodestringOptionalNew 6-digit access code
locationIdsstring[]OptionalUpdated list of location IDs. Empty array clears all assignments.
Response
{
"data": {
"id": "emp_abc123",
"name": "Jón Jónsson",
"phoneNumber": "7771234",
"locationIds": ["loc_xyz"],
"createdAt": "2024-01-15T10:00:00.000Z"
}
}/api/tenant/employees/:idDelete an employee. Also removes all location assignments for that employee.
Headers
| Name | Type | Required | Description |
|---|---|---|---|
| Authorization | string | Required | Bearer <access_token> — requires admin scope |
AuthorizationstringRequiredBearer <access_token> — requires admin scope
Response
{ "success": true }