menus
The menus
API retrieves a list of menus
for an account.
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 menus
API returns a JSON array of menu objects. Each member of the array includes these attributes:
- id (integer) - Unique identifier.
- updated_at (datetime) - The date that this menu was last edited.
- created_at (datetime) - The initial date that this menu was created.
- priority (int) - A number assigned to a menu to help clients determine which menu to show when using an automatic menu rotation algorithm on a billboard button. 1 is the highest priority.
- title (string) - The name of the menu
- subtitle (string) - Second line of menu name
- weekday_start_time (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.
- weekday_end_time (string) - Same format as weekday_start_time. Must compare strictly greater-than to weekday_start_time.
- weekend_start_time (string) - Same format and semantics as weekday_start_time
- weekend_end_time (string) - Same format and semantics as weekday_end_time
- status (integer) - The current status of the menu. A value of
0
indicates an active menu. A value of1
indicates a deleted menu.
Notes for Start and End time support
Start and End times are only supported on clients on v90 of the Tastevin iOS app or higher. The weekday_start_time, weekday_end_time, weekend_start_time, and weekend_end_time attributes will not be parsed by clients on a lower version.
Sample Request
https://dashboard.onpremisewine.com/menus.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",
"priority": 1,
"weekday_start_time": "1800",
"weekday_end_time": "2200",
"weekend_start_time": "1700",
"weekend_end_time": "2400",
"title": "Dinner Menu",
"subtitle": nil,
"status": 0
},
{
"id": 1235,
"updated_at": "2012-06-14T21:33:07-07:00",
"created_at": "2011-10-11T07:26:28-07:00",
"priority": 2,
"weekday_start_time": "1900",
"weekday_end_time": "2200",
"weekend_start_time": "1800",
"weekend_end_time": "2400",
"title": "Dessert Menu",
"subtitle": nil,
"status": 0
}
]
}