Empleados
Base path: /api/staff
info
Note: the full path is /api/staff/staff for the staff list, due to the route structure.
GET /staff/staff
Get all staff members.
Auth: Logged in
Response:
[
{ "id": 1, "name": "Admin", "email": "admin@salon.nl", "role": "admin" },
{ "id": 2, "name": "Lisa", "email": "lisa@salon.nl", "role": "staff" }
]
POST /staff/staff
Create a new staff member.
Auth: Admin
| Field | Type | Required | Default |
|---|---|---|---|
name | string | Yes | — |
email | string | Yes | — |
password | string (min 8) | Yes | — |
role | string | No | staff |
Errors: 409 — Email already in use
PUT /staff/staff/:id
Update a staff member.
Auth: Admin
DELETE /staff/staff/:id
Delete a staff member.
Auth: Admin
Shifts (Schedule)
GET /staff/shifts
Get the shift records for all staff members.
POST /staff/shifts
Create a new shift entry.
PUT /staff/shifts/:id
Update a shift entry.
DELETE /staff/shifts/:id
Delete a shift entry.
GET /staff/default-shifts
Get the default (template) shifts per staff member.
POST /staff/default-shifts/save-week
Save a full week of shifts as defaults for a staff member.
POST /staff/default-shifts/apply
Apply saved default shifts to a specific date range.
DELETE /staff/default-shifts/:staffId
Remove all default shifts for a staff member.
Time Off
GET /staff/time-off
Get time-off entries.
POST /staff/time-off
Create a time-off entry.
| Field | Type | Required |
|---|---|---|
staff_id | integer | Yes |
start_date | date | Yes |
end_date | date | Yes |
reason | string | No |
DELETE /staff/time-off/:id
Delete a time-off entry.