Skip to main content
An override replaces one schedule’s weekly hours on every date from startsOn to endsOn, both included. On each date in the range, the override’s slots are the open hours, and a date with no slots is closed. Dates and times are read in the schedule’s timezone, so overrides don’t take a timezone of their own.
For TypeScript, the GraphQL SDK gives you a fully typed client for these operations.
These operations require the following permissions:
  • businessHours:read
  • businessHours:create
  • businessHours:edit
  • businessHours:delete
Dates use YYYY-MM-DD and times use HH:MM. Overlapping and adjacent slots on the same date are merged when you save.

List overrides on a schedule

overrides on BusinessHoursSchedule returns the schedule’s overrides, sorted by start date. Filter by startsOn and endsOn with a DateFilter, where after is on or after the date and before is before it. To list current and upcoming overrides, pass endsOn: { after: today }, with today’s date in the schedule’s timezone. This field supports Pagination.
Query
Variables
To fetch one override, use businessHoursOverride(businessHoursOverrideId:). It returns null when no override has the ID.

Create an override

Pass the schedule, a name, the date range, and the open slots. Leave slots out to close every date in the range. The example below opens 24 December for the morning and closes 25 and 26 December.
  • startsOn can’t be before today in the schedule’s timezone. Today can be given new hours at any time of day
  • An override covers at most 92 days
  • Every slot’s date must fall inside the range, and closesAt must be after opensAt
  • An override can’t overlap another override on the same schedule
Mutation
Variables

Update an override

Pass only the fields you want to change.
  • name is a StringInput: pass { "value": ... } to rename
  • startsOn and endsOn move the range. startsOn can’t move to before today. Dates added to the range are closed, and slots on dates removed from it are dropped
  • slots replaces every slot on the override. Leave it out to keep the current hours
Mutation
Variables

Delete an override

The schedule’s weekly hours apply to the override’s dates again.
Mutation
Variables

Errors

Besides the common error codes, these mutations return: