menu_lists
The menu_lists
API retrieves a list of menus
for an account. Each menu
contains many menu_sections
, and each menu_section
contains many menu_items
.
Note however, that each menu_item
may only be in a single menu_section
Parameters
- api_key (string) Required - The API key for the account
- last_updated_at (datetime) Optional - If this parameter is supplied, only the items whose last edited date is after the supplied date and time will be returned. The parameter should be formatted as "YYYY-MM-DD HH:MM:SS" and will be interpreted as a UTC date and time value.
Response
The menu_lists
API returns a JSON array of menu objects. Each member of the array includes these attributes:
- id (integer) - Unique identifier.
- updated_at (string) - The date that this menu was last edited.
- created_at (string) - The initial date that this menu was created.
- type (integer) - The code for the menu type. This can be one of:
0
for dinner menus,1
for lunch menus. - start_time (maybe string) - possibly null attribute that represents a 24-hour datetime string as to when a menu should start. Must be a 4-character string in the range "0000" to "2400" to be valid.
- end_time (maybe string) - same format as start_time. Must compare strictly greater-than to start_time.
- title (string) - The name of the menu
- subtitle (string) - Second line of menu name
- status - (integer) The current status of the menu. A value of
0
indicates an active menu. A value of1
indicates a deleted menu. - sections (array) - an array of
menu_section
s. - items (array) - an array of
menu_item
s.
Each menu_section is an object with the following attributes:
- id (integer) - Unique identifier.
- updated_at (string) - The date that this menu_section was last edited.
- created_at (string) - The initial date that this menu_section was created.
- title (string) - The name of this section to be displayed to diners.
- subtitle (maybe string) - A short description (50 characters) that will be displayed to diners below the title.
- ordinal (integer) - The sort order of this section within the menu.
- status (integer) - The current status of the section. A value of
0
indicates an active meal. A value of1
indicates a deleted section.
Each menu_item is an object with the following attributes:
- id (integer) - Unique identifier.
- updated_at (string) - The date that this menu_item was last edited.
- created_at (string) - The initial date that this menu_item was created.
- section_id (integer) - The unique identifier of the menu_section that this menu_item belongs to. This can be set to
null
to indicate that an item is not in a section. If an item is in multiple sections, this will return the first section. - section_ids (integer) - Array of unique identifiers of the menu_sections that this menu_item belongs to. This can be set to an empty array to indicate that an item is not in a section.
- ordinal (integer) - The sort order of a menu within it's section.
- name (string) - The name of the menu item to be displayed to diners.
- summary (string) - The short description of the menu item.
- description (string) - The description of the menu_item.
- price (string) - The retail price of the menu_item.
- status (integer) - Item status. A value of
0
indicates an active menu_item. A value of1
indicates an inactive (deleted) menu_item that may or may not be displayed to users. - is_recommended (boolean) - Set to
true
if this menu_item should be displayed with a "recommended" indicator andfalse
otherwise.
Notes
Sample Request
https://dashboard.onpremisewine.com/menu_list.json?api_key=ABCDEF123456
Sample Response
{
"menus": [
"id": 1234,
"updated_at": "2012-06-14T21:33:07-07:00",
"created_at": "2011-10-11T07:26:28-07:00",
"type": 1,
"title": "Dinner Menu",
"subtitle": nil,
"status": 0,
"sections": [
{
"id": 2345,
"updated_at": "2012-02-14T22:39:05-07:00",
"created_at": "2011-10-12T07:25:08-07:00",
"title": "Pies and Pastries",
"subtitle": "Who doesn't like pastry?",
"ordinal": 1,
"status": 0
},
{
"id": 2346,
"updated_at": "2012-03-16T15:23:17-07:00",
"created_at": "2012-01-45T07:26:19-07:00",
"title": "Someday we'll put something here",
"subtitle": null,
"ordinal": 2,
"status": 0
}
],
"items": [
{
"id": 3456,
"updated_at": "2012-06-14T25:59:20-07:00",
"created_at": "2011-10-13T07:33:12-07:00",
"section_id": 2345,
"section_ids": [
2345
],
"ordinal": 2,
"name": "Tuna Pie",
"summary": "Made from tuna",
"description": "Something even the fish haters would like!",
"price": "4.0",
"status": 0,
"is_recommended": true
},
{
"id": 3457,
"updated_at": "2012-04-12T25:31:08-07:00",
"created_at": "2011-10-13T07:26:53-07:00",
"section_id": 2345,
"section_ids": [
2345,
2346
],
"ordinal": 1,
"name": "Chicken Pie",
"summary": "Made from chicken",
"description": "In case fish hater threatens staff with shotgun",
"price": "3.5",
"status": 0,
"is_recommended": true
}
]
]
}