Serving Times

Serving times say on which days or dates, and at what time, a resource is available. On a store they are its opening hours; on a category or product they say when those items are served (breakfast items only in the morning, for example).

A resource can have multiple Serving Times, but Serving Times cannot overlap.

PAR Ordering 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-65ae8d3d9d1f defines that on August 31, 2023, the resource is not available
  • The Serving Time with the UUID 4adfb91d-19a0-4313-8b42-86c96b3a737e defines that from September 1 through September 5, 2023, the resource is available from 8:00 AM to 1:00 PM
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-dcb4147cc512 defines that from Monday through Friday, the resource is available from 6:30 AM to 11:00 PM
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