Each business has a main schedule that defines its operating hours and availability.
The business schedule always uses the externalId value 4e0579a5-491e-4e70-a872-d097eed6e520.
By default, each business has 5 recurring WORKING_HOURS events, 1 for each weekday (Monday through Friday) from 10 AM to 6 PM.
These MASTER events set the recurrence pattern that Wix Calendars uses to automatically calculate INSTANCE events.
Learn more about recurring events.
To identify the IDs of the 5 MASTER events, retrieve at least 1 of their corresponding INSTANCE events.
Call Query Events, specifying a date range that covers at least a full week and a query filter like this:
For each weekday's INSTANCE working hour event that's returned, save its id, recurringEventId, and scheduleId.
The recurringEventId is the id of the corresponding MASTER event, which defines the recurrence pattern.
All 5 weekday INSTANCE events share a scheduleId, which is the business schedule's id.
To modify working hours:
"type": "WORKING_HOURS", "recurrenceType": "MASTER", and the relevant recurrenceRule.
Specify the business schedule id as the event's scheduleId.
For example, add Saturday hours or an evening shift.INSTANCE event, or Update Event to shorten its hours.scheduleId and start and end dates spanning the entire period.
For example, 2 weeks of summer vacation.
Don't specify recurrenceType, the system creates a one-off blocking event by default.scheduleId, "recurrenceType": "MASTER", and the relevant recurrenceRule. The system creates a DEFAULT type event whose instances block availability.