Updates a resource's schedule.
The updateSchedule()
function returns a Promise that resolves when a resource's schedule has been updated. Use this function to update the bookings resource's schedule. To update other resource details use updateResource()
.
Notes:
"INDIVIDUAL"
, "GROUP"
, and "COURSE"
.This function requires elevated permissions and runs only on the backend and on dashboard pages.
function updateSchedule(
resourceId: string,
schedule: Schedule,
options: UpdateScheduleOptions,
): Promise<UpdateScheduleResponse>;
Resource ID to update.
Schedule to update.
import { resources } from "wix-bookings.v1";
async function updateSchedule(resourceId, schedule, options) {
try {
const result = await resources.updateSchedule(
resourceId,
schedule,
options,
);
return result;
} catch (error) {
console.error(error);
// Handle the error
}
}
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.