Set exceptional opening hours
This topic demonstrates the implementation of the syncStore API for specifying exceptional opening hours.
Overview
You can schedule exceptional opening hours for holidays, special events, or other exceptional circumstances, for example, the National Day holiday or New Year's Day.
Use case
To set exceptional opening hours for an existing store, pass a new serviceSchedules array, which will overwrite the data in the previous array. Make sure to include existing schedules and pass the new schedule in the last index of the serviceSchedules array.
See the following example:
- The regular opening hours of the store are 08:00-21:00.
- Specify a schedule for the National Day holiday in the last index of the serviceSchedules array. So the regular opening hours are still valid for the store until September 30, 2022. During the National Day holiday (from
2022-10-01T00:00:01+08:00
to2022-10-07T23:59:59+08:00
), the store is open from 07:00 to 22:00. - After the holiday, the store is back to normal business hours (08:00-21:00).
copy
{
"requestId": "12222211****",
"appId": "21020101154****",
"store": {
"storeId": "20221003delivery_storeid01",
"serviceSchedules": [
{
"scheduleType": "DAILY",
"schedules": {
"FIXED": [
{
"startTime": "08:00+08:00",
"endTime": "21:00+08:00"
}
]
}
},
{
"scheduleType": "DAILY",
"startTime": "2022-10-01T00:00:01+08:00",
"endTime": "2022-10-07T23:59:59+08:00",
"schedules": {
"FIXED": [
{
"startTime": "07:00+08:00",
"endTime": "22:00+08:00"
}
]
}
}
]
}
}