Serving Times
Serving Times define on which days or dates, as well as at which time, a resource is available. Serving Times can be applied to Venues, in order to define the location's opening hours, or Subcategories, in order to define when certain items are available (e.g. breakfast items only in the morning).
A resource can have multiple Serving Times, but Serving Times cannot overlap.
MENU supports two different types of Serving Times:
| Type ID | Name | Description |
|---|---|---|
| 1 | Special Days | Defines irregular times for a specific date or date range |
| 2 | Week Days | Defines regular times for certain days of the week (Mo - Su) |
Serving Time Attributes
| Attribute | Type | Example Value | Description |
|---|---|---|---|
id |
string | "219f26ca-2ccc-4433-b099-dcb4147cc512" |
UUID of Serving Time |
type_id |
int | 2 |
Type of Serving Time - either 1 Special Days or 2 Week Days |
reference_type |
string | "WeekDays" |
Human-readable type identifier - always rely on type_id for programmatic processing |
time_from |
string or null | "06:30" |
Starting time of Serving Time |
time_to |
string or null | "23:00" |
Ending time of Serving Time |
Special Days
{
"id": "60931918-f682-4e4a-a9db-65ae8d3d9d1f",
"type_id": 1,
"reference_type": "SpecialDays",
"time_from": null,
"time_to": null,
"date": "2023-08-31",
"date_to": "2023-08-31",
"working": false
},
{
"id": "4adfb91d-19a0-4313-8b42-86c96b3a737e",
"type_id": 1,
"reference_type": "SpecialDays",
"time_from": "08:00",
"time_to": "13:00",
"date": "2023-09-01",
"date_to": "2023-09-05",
"working": true
}
- The Serving Time with the UUID
60931918-f682-4e4a-a9db-65ae8d3d9d1fdefines that on the 31st of August 2023, the resource will not be available - The Serving Time with the UUID
4adfb91d-19a0-4313-8b42-86c96b3a737edefines that from the 1st of September 2023 to the 5th of September 2023, the resource will be available from 08:00 - 13:00
| Attribute | Type | Example Value | Description |
|---|---|---|---|
date |
string | "2023-08-31" |
Starting date of Serving Time (for 1 Special Days) |
date_to |
int | "2023-08-31" |
Ending date of Serving Time (for 1 Special Days) - can be same date, in which case special serving times are only valid for that specific date |
working |
bool | true |
Whether the resource is available that date / date range or not (for 1 Special Days). In case of false, time_from and time_to of the Serving Time will always be null |
Week Days
{
"id": "219f26ca-2ccc-4433-b099-dcb4147cc512",
"type_id": 2,
"reference_type": "WeekDays",
"time_from": "06:30",
"time_to": "23:00",
"days": [
1,
2,
3,
4,
5
]
}
- The Serving Time with the UUID
219f26ca-2ccc-4433-b099-dcb4147cc512defines that from Monday to Friday, the resource will be available from 06:30 - 23:00
| Attribute | Type | Example Value | Description |
|---|---|---|---|
days |
array[int] | [1,2] |
Array of Day of the Week IDs that this Serving Time applies to (for 2 Week Days) |
Days of the Week
| ID | Name |
|---|---|
0 |
Sunday |
1 |
Monday |
2 |
Tuesday |
3 |
Wednesday |
4 |
Thursday |
5 |
Friday |
6 |
Saturday |