Update Staff Availability
Set a staff member's usual week, their answers for specific dates, or both in one call. Hours set
here count as set by you, so set_by reads owner afterwards.
Endpointโ
PUT /v1/staff/{staffId}/availability
Authenticationโ
Requires an API key with the staff:write scope.
Path Parametersโ
| Parameter | Type | Description |
|---|---|---|
staffId | integer | Staff member ID |
Request Bodyโ
Send week, dates, or both. At least one is required.
| Parameter | Type | Required | Description |
|---|---|---|---|
week | object | No | Keyed by day name, monday to sunday. Days you leave out keep their current hours. |
week.{day}.on | boolean | No | false switches the day off. Sending only start or end switches it on. |
week.{day}.start | string | No | Start time, HH:MM, 24-hour |
week.{day}.end | string | No | End time, HH:MM, 24-hour. Must be after start. |
dates | object or array | No | Keyed by date (YYYY-MM-DD), or a list of rows that each carry a date. |
dates.*.on | boolean | No | false means they can't work that date. can_work is accepted as another name for it. |
dates.*.start | string | No | Start time, HH:MM. A date sent without times takes the hours of their usual week for that weekday. |
dates.*.end | string | No | End time, HH:MM. Must be after start. |
How saving worksโ
- The week in force ends yesterday and the new week starts today, so the staff member's page in the portal keeps the old hours under Show past hours.
- A date answer replaces any earlier answer for the same date.
- If any day or date is refused, nothing is saved.
Example bodyโ
{
"week": {
"monday": { "on": true, "start": "09:00", "end": "17:00" },
"saturday": { "on": true, "start": "07:00", "end": "12:00" },
"sunday": { "on": false }
},
"dates": {
"2026-10-05": { "on": false },
"2026-10-06": { "on": true, "start": "12:00", "end": "18:00" }
}
}
Responseโ
Success (200 OK)โ
Returns the updated availability object.
{
"data": {
"week": {
"monday": { "on": true, "start": "09:00", "end": "17:00" },
"tuesday": { "on": false, "start": "09:00", "end": "17:00" },
"wednesday": { "on": false, "start": "09:00", "end": "17:00" },
"thursday": { "on": false, "start": "09:00", "end": "17:00" },
"friday": { "on": false, "start": "09:00", "end": "17:00" },
"saturday": { "on": true, "start": "07:00", "end": "12:00" },
"sunday": { "on": false, "start": "09:00", "end": "17:00" }
},
"set_by": "owner",
"dates": [
{ "date": "2026-10-05", "can_work": false, "start": null, "end": null },
{ "date": "2026-10-06", "can_work": true, "start": "12:00", "end": "18:00" }
]
},
"meta": {
"request_id": "req_abc123",
"timestamp": "2026-09-28T09:00:00+00:00"
}
}
Errorsโ
| Status | Code | Description |
|---|---|---|
| 401 | authentication_required | No API key provided |
| 401 | invalid_api_key | Invalid API key |
| 403 | insufficient_scope | API key lacks the staff:write scope |
| 404 | resource_not_found | No staff member with that ID in your account |
| 422 | validation_error | week or dates is not an object |
| 422 | availability_not_saved | The hours could not be saved. message says why, for example "On Monday, the end time has to be after the start time." or "Send the weekly hours, some dates, or both." |
Example Requestโ
curl -X PUT "https://app.equipdash.com/api/v1/staff/123/availability" \
-H "Authorization: Bearer eqd_live_abc123xyz789..." \
-H "Content-Type: application/json" \
-d '{
"week": { "saturday": { "on": true, "start": "07:00", "end": "12:00" } },
"dates": { "2026-10-05": { "on": false } }
}'