POST

Assign Custom Schedule


Deprecated

This method has been replaced with Assign Working Hours Schedule, and will be removed on December 31, 2024.

Assigns a custom working hours schedule to the staff member

The working hours schedule is a schedule that defines the working hours of a staff member, and dictate when the staff member is available for bookings.

By default staff members use the shared business working hours schedule. By assigning a custom working hours schedule to a staff member, you can define specific working hours for that staff member.

To create and manage schedules and working hours sessions, use Events API.

Authentication

You can only call this method when authenticated as a Wix app or Wix user identity.

Permissions
Manage Bookings - all permissions
Manage Bookings
Learn more about app permissions.
Endpoint
POST
https://www.wixapis.com/bookings/v1/staff-members/{staffMemberId}/assign-custom-schedule

Path Params
staffMemberIdstringRequired

ID of the staff member to assign the schedule to.

Body Params
scheduleIdstringRequiredformat GUID

ID of a schedule to assign to the staff's working hours schedule.


fieldsArray <string>maxItems 3

Conditional fields to return.

Response Object
staffMemberStaffMember

The updated staff member.

Assign a custom working hours schedule to a staff member.

Using fields enables to return the resulting resource details, after it has been linked to the customs schedule.

Request
cURL
curl -X POST \ 'https://www.wixapis.com/bookings/v1/staff-members/0954bbb2-88cd-445c-9827-44253eb8b039/assign-custom-schedule' \ -H 'Authorization: <AUTH>' \ -d '{ "staffMemberId": "0954bbb2-88cd-445c-9827-44253eb8b039", "scheduleId": "136d9d9a-97ab-49fa-a0cf-ec24f500bd98", "fields": ["RESOURCE_DETAILS"] }'
Response
JSON
{ "staffMember": { "id": "0954bbb2-88cd-445c-9827-44253eb8b039", "email": "some@email.com", "name": "Some other name", "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": "136d9d9a-97ab-49fa-a0cf-ec24f500bd98", "shared": false } ], "events_schedule": { "id": "7c147d9e-89a8-4e2e-a723-b095db0610c1" }, "uses_default_working_hours": false } } }
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Event TriggersThis method triggers the following events:
Did this help?