This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Updates a staff member's working hours based on the specified schedule ID (SDK | REST).
By default, staff members work during the opening hours of the business's default location (SDK | REST).
You can specify either the ID of the business's working hour schedule or the staff member's event schedule. The call fails if you specify a different schedule ID.
To customize a staff member's working hours, specify their event schedule ID
as scheduleId
. Refer to this sample flow
(SDK | REST)
for more details.
To reset a staff member’s working hours to the default business hours,
specify the ID of the business working hour schedule as scheduleId
.
You can only call this method when authenticated as a Wix app or Wix user identity.
ID of the staff member to assign the schedule to.
Updated staff member.
curl -X POST \
'https://www.wixapis.com/bookings/v1/staff-members/0954bbb2-88cd-445c-9827-44253eb8b039/assign-working-hours-schedule' \
-H 'Authorization: <AUTH>' \
-d '{
"scheduleId": "7c147d9e-89a8-4e2e-a723-b095db0610c1",
"fields": ["RESOURCE_DETAILS"]
}'
{
"staffMember": {
"id": "0954bbb2-88cd-445c-9827-44253eb8b039",
"email": "MateusAraujoSantos1979@example.com",
"name": "Mateus Araujo Santos",
"resourceId": "136d9d9a-97ab-49fa-a0cf-ec24f500bd98",
"default": false,
"revision": "3",
"createdDate": "2024-08-28T13:22:32.784Z",
"updatedDate": "2024-08-28T14:16:11.948Z",
"resource": {
"id": "e0936563-7fd8-4e08-9db0-a327b2cb653e",
"working_hours_schedules": [
{
"id": "7c147d9e-89a8-4e2e-a723-b095db0610c1",
"shared": false
}
],
"events_schedule": {
"id": "7c147d9e-89a8-4e2e-a723-b095db0610c1"
},
"uses_default_working_hours": false
}
}
}
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.