PATCH

Update Schedule


Deprecated

This method has been replaced with Update Schedule, and will be removed on June 30, 2025.

Updates a resource's schedule

To update a resource's schedule to remove business hours and add custom hours:

  • Update the resource's schedule to remove the business's scheduleId from the availability.linkedSchedules array.
  • Create a set of recurring sessions of type "WORKING_HOURS" to define the resource's new hours.

To update a resource's schedule to add default business hours, and keep or remove custom hours:

  • Update the resource's schedule to add the business resource's scheduleId to the availability.linkedSchedules array.
  • If you want to remove the custom sessions, delete the resource's sessions of type "WORKING_HOURS". You do not have to delete exiting custom sessions. Custom session that are not deleted will continue to be included in availability calculations and can still be booked.

Notes:

  • A resource can have one schedule only.
  • A resource can have both default business hours and custom hours in its schedule.
  • When updating a resource's schedule you cannot change the system tags used by the Wix Bookings app. Tags used by the app have the values "INDIVIDUAL""GROUP", and "COURSE”.
  • The businessLocation.businessSchedule object in the schedule.location object is not supported.

Permissions: This endpoint requires the Manage Bookings permission scope.

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
PATCH
https://www.wixapis.com/bookings/v1/resources/{resourceId}/updateSchedule

Path Params
resourceIdstringRequired

Resource ID to update.

Body Params
scheduleSchedule

Schedule to update.

Response Object
scheduleSchedule

Updated schedule.

Update Resource

Update a resource schedule, adding a linked schedule.

Request
cURL
curl -X PATCH \ 'https://www.wixapis.com/bookings/v1/resources/26a20115-6b1c-42d8-88cf-897e8fbaadb5/updateSchedule' \ -H "Content-Type: application/json" \ -H 'Authorization: <AUTH>' \ --data '{ "schedule": { "id": "ac23ffec-83ee-4c84-8d67-c6bba9d9fabf", "availability": { "linkedSchedules": [{ "scheduleId": "48ed1477-443b-40f4-bd71-7a04e863cafd", "transparency": "BUSY", "scheduleOwnerId": "e6b6108c-92bc-462b-937c-dab386909fd2" }] } } }'
Response
JSON
{ "schedule": { "id": "ac23ffec-83ee-4c84-8d67-c6bba9d9fabf", "scheduleOwnerId": "26a20115-6b1c-42d8-88cf-897e8fbaadb5", "firstSessionStart": "2021-05-26T13:00:00Z", "timeZone": "America/New_York", "intervals": [ { "id": "90e6035f-2064-47bd-9782-acf300d5dd5c", "start": "2021-07-05T04:00:00Z", "interval": { "daysOfWeek": "MON", "hourOfDay": 10, "minuteOfHour": 0, "duration": 360 }, "frequency": { "repetition": 1 }, "affectedSchedules": [], "intervalType": "AVAILABILITY" }, { "id": "0afc9519-9284-416e-b952-cf064868b80c", "start": "2021-07-05T04:00:00Z", "interval": { "daysOfWeek": "MON", "hourOfDay": 13, "minuteOfHour": 0, "duration": 60 }, "frequency": { "repetition": 1 }, "affectedSchedules": [], "intervalType": "AVAILABILITY" }, { "id": "be271e06-2bb0-4126-91c4-98587938c1c6", "start": "2021-07-05T04:00:00Z", "interval": { "daysOfWeek": "WED", "hourOfDay": 10, "minuteOfHour": 0, "duration": 360 }, "frequency": { "repetition": 1 }, "affectedSchedules": [], "intervalType": "AVAILABILITY" }, { "id": "abf06a51-d46a-43d5-826b-b2a5be0ffab8", "start": "2021-07-05T04:00:00Z", "interval": { "daysOfWeek": "WED", "hourOfDay": 13, "minuteOfHour": 0, "duration": 60 }, "frequency": { "repetition": 1 }, "affectedSchedules": [], "intervalType": "AVAILABILITY" }, { "id": "152d932e-7c08-4527-87b8-bd948aeadf61", "start": "2021-07-05T04:00:00Z", "interval": { "daysOfWeek": "WED", "hourOfDay": 10, "minuteOfHour": 0, "duration": 60 }, "frequency": { "repetition": 1 }, "affectedSchedules": [], "intervalType": "AVAILABILITY" }, { "id": "f6959ffb-7b83-4682-a4ea-c20ea633c869", "start": "2021-07-05T04:00:00Z", "interval": { "daysOfWeek": "FRI", "hourOfDay": 10, "minuteOfHour": 0, "duration": 360 }, "frequency": { "repetition": 1 }, "affectedSchedules": [], "intervalType": "AVAILABILITY" } ], "tags": [], "availability": { "start": "2021-08-06T12:00:00Z", "linkedSchedules": [ { "scheduleId": "48ed1477-443b-40f4-bd71-7a04e863cafd", "transparency": "BUSY", "scheduleOwnerId": "e6b6108c-92bc-462b-937c-dab386909fd2" } ], "locations": [], "useDefaultLocation": true }, "totalNumberOfParticipants": 0, "participants": [], "status": "CREATED", "created": "2021-05-20T16:35:22.669Z", "updated": "2021-07-26T09:44:20.133Z", "version": 24, "inheritedFields": [], "scheduleOwnerName": "Sakura Tanaka" } }
Errors
404Not Found

There are 2 errors with this status code.

This method may also return standard errors. Learn more about standard Wix errors.

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