Purpose
Set opening hours for a given location and/or apply unique opening hours per channel(s) within a location.
Format
Multiple time non-overlapping time ranges can be applied to a single week day and unique opening hours can be applied at both location and channel level.
Request Body
| Field | Description | Type |
|---|---|---|
locations | Locations whose opening hours you want to update. | array |
locations[].id | The location ID. | string |
locations[].triggerUpdate | Set to true to republish existing menus and communicate the updated opening hours to ordering platforms. Set to false to update opening hours without publishing menus. | boolean |
locations[].openingHours | Opening hours that apply to the location. Each entry contains dayOfWeek, startTime, and endTime. | array |
locations[].openingHours[].dayOfWeek | Day of the week, from 1 (Monday) through 7 (Sunday). | integer |
locations[].openingHours[].startTime | Opening time in the location’s local time, in 24-hour HH:MM format. | string |
locations[].openingHours[].endTime | Closing time in the location’s local time, in 24-hour HH:MM format. | string |
locations[].channels | Channels within the location that have their own opening hours. | array |
locations[].channels[].id | The channel ID. | string |
locations[].channels[].openingHours | Opening hours that apply to the channel. Each entry contains dayOfWeek, startTime, and endTime. | array |
locations[].channels[].openingHours[].dayOfWeek | Day of the week, from 1 (Monday) through 7 (Sunday). | integer |
locations[].channels[].openingHours[].startTime | Opening time in the location’s local time, in 24-hour HH:MM format. | string |
locations[].channels[].openingHours[].endTime | Closing time in the location’s local time, in 24-hour HH:MM format. | string |
Publish Opening Hours
When opening hours are updated to Deliverect, these will be communicated to ordering platforms within the next menu publish event. additional attribute triggerUpdate where equal to true will trigger a re-publishing of all existing menus. This will in turn update the opening times on each associated merchant store. If updating the opening hours where no action to publish updates is intended, triggerUpdate should be set as false
Opening times past midnight
When submitting opening hours for a location, any time range entered can only be within the same day. Adding opening hours for a location which extend beyond midnight can be seen in the example below. Below is an example of opening times which extend beyond midnight. In this case, the store opens 10am until 2am. Note that two time ranges per day need applied to support this, where the "startTime": "00:00" > "endTime": "02:00" is accounting for opening times from the previous day running past midnight.
"openingHours": [
{
"dayOfWeek": 1,
"startTime": "00:00",
"endTime": "02:00"
},
{
"dayOfWeek": 1,
"startTime": "10:00",
"endTime": "23:59"
},
{
"dayOfWeek": 2,
"startTime": "00:00",
"endTime": "02:00"
},
{
"dayOfWeek": 2,
"startTime": "10:00",
"endTime": "23:59"
},
{
"dayOfWeek": 3,
"startTime": "00:00",
"endTime": "02:00"
},
{
"dayOfWeek": 3,
"startTime": "10:00",
"endTime": "23:59"
},
{
"dayOfWeek": 4,
"startTime": "00:00",
"endTime": "02:00"
},
{
"dayOfWeek": 4,
"startTime": "10:00",
"endTime": "23:59"
},
{
"dayOfWeek": 5,
"startTime": "00:00",
"endTime": "02:00"
},
{
"dayOfWeek": 5,
"startTime": "10:00",
"endTime": "23:59"
},
{
"dayOfWeek": 6,
"startTime": "00:00",
"endTime": "02:00"
},
{
"dayOfWeek": 6,
"startTime": "10:00",
"endTime": "23:59"
},
{
"dayOfWeek": 7,
"startTime": "00:00",
"endTime": "02:00"
}
{
"dayOfWeek": 7,
"startTime": "10:00",
"endTime": "23:59"
},
],{
"locations": [
{
"id": "61e9****4d2b",
"triggerUpdate": false,
"channels": [
{
"id": "6200****fd1f",
"openingHours": [
{
"dayOfWeek": 1,
"startTime": "08:00",
"endTime": "20:00"
}
]
}
]
}
]
}{
"locations": [
{
"id": "61e9****4d2b",
"triggerUpdate": false,
"openingHours": [
{
"dayOfWeek": 1,
"startTime": "10:00",
"endTime": "17:00"
}
],
"channels": [
{
"id": "6200****fd1f",
"openingHours": [
{
"dayOfWeek": 1,
"startTime": "08:00",
"endTime": "20:00"
}
]
}
]
}
]
}