Implement item level hours
Prerequisites
DoorDash has provided new functionality in our Open API Menu to control hourly availability at an Item Level, rather than a menu level. This information will be sent via our Menu API. Store Hours on a menu will remain the default availability if Item Hours are not defined.
Overview
This new enhancements covers two broad use cases across our current Restaurant and Convenience Merchants:
- Some items, such as Alcohol or Breakfast sandwiches, are only available for a portion of the stores total open hours. Today, Merchants are controlling this availability using multiple menus, but this is not the ideal experience when the majority of menu items are available for the total store open hours.
- Some items, such as Holiday Offerings, are available for a limited time only (LTO). Today, Merchants are controlling availability of LTO items by sending two menu updates, one when the item becomes available and one when the item stops being available. This is not ideal because any delay in this process can cause LTO items to be sellable outside of their designated time period.
This enhancement to Open API integration allows Merchants to maintain a single menu containing all items, with some items unavailable outside of their sellable hours and/or days.
Get Started
How?
DoorDash has amended the Menu API contract with 2 new arrays: item_special_hours and item_extra_option_special_hours. These arrays will accept information similar to the open_hours and special_hours arrays, with the exception that the hours will not be applied to the entire menu, but only to the item or option in which they are defined.
Menu Payload Format
Both item_special_hours and item_extra_option_special_hours arrays will contain the same fields. These fields are interchangeable, and including/excluding each will produce a different result. When a field is excluded, we will default to the store level availability for the menu.
day_index:day of the week the hours set is defined for (ex. MON, TUE, WED, etc.)start_time:HH:MM:SS when the item becomes availableend_time:HH:MM:SS when the item becomes unavailablestart_date:YYYY-MM-DD when item becomes availableend_date:YYYY-MM-DD when the item becomes unavailable
Below are a few different ways these fields can be used to limit item availability:
Scenario 1: Item is available from 5AM to 5PM every day of the week
{
"day_index": "MON",
"start_time": "05:00:00",
"end_time": "17:00:00"
},
{
"day_index": "TUE",
"start_time": "05:00:00",
"end_time": "17:00:00"
},
...
{
"day_index": "SUN",
"start_time": "05:00:00",
"end_time": "17:00:00"
},
Scenario 2: Item is only available on Monday during normal store hours.
{
"day_index": "MON",
},
Scenario 3: Item is only available during the month of April (during normal store hours)
{
"start_date": "2021-04-01",
"end_date": "2021-04-30",
},
Scenario 4: Item is available Mondays in April from 5AM to 5PM.
{
"day_index": "MON",
"start_time": "05:00:00",
"end_time": "17:00:00",
"start_date": "2021-04-01",
"end_date": "2021-04-30",
},
Marketplace Menu Experience
If an item with Item Level Hours was added to a customer’s cart prior to it’s sellable cutoff, but the customer is attempting to check out after the sellable hours have passed, the customer will receive a similar error below on checkout.
