MenuItem
An item on a menu.
Operations
Every route this entity exposes. Each route links to its own reference on this page.
| Method | Route | SDK operation | Returns |
|---|---|---|---|
GET |
/v1/stores/{storeId}/menu/item/{itemId} |
load |
OK |
DELETE |
/v1/stores/{storeId}/menu/item/{itemId} |
remove |
No Content |
PUT |
/v1/stores/{storeId}/menu/item/{itemId} |
update |
No Content |
Examples
One example per SDK, generated from the API model. The argument names are the parameters and fields of this entity, and the values are placeholders. The examples are not compiled or executed.
Golang
Construct client as shown in the Golang setup, then call the operations:
menu_item, err := client.MenuItem(nil).Load(map[string]any{"id": "example_id", "store_id": "example"}, nil)
if err != nil {
panic(err)
}
fmt.Println(menu_item)
updated, err := client.MenuItem(nil).Update(map[string]any{"id": "example_id", "store_id": "example", "availability": []any{}}, nil)
if err != nil {
panic(err)
}
fmt.Println(updated)
removed, err := client.MenuItem(nil).Remove(map[string]any{"id": "example_id", "store_id": "example"}, nil)
if err != nil {
panic(err)
}
fmt.Println(removed)
Lua
Construct client as shown in the Lua setup, then call the operations:
local menu_item, err = client:MenuItem():load({ id = "example_id", store_id = "example" })
local updated, err = client:MenuItem():update({ id = "example_id", store_id = "example", availability = {} })
local removed, err = client:MenuItem():remove({ id = "example_id", store_id = "example" })
PHP
Construct client as shown in the PHP setup, then call the operations:
$menu_item = $client->MenuItem()->load(["id" => "example_id", "store_id" => "example"]);
$updated = $client->MenuItem()->update(["id" => "example_id", "store_id" => "example", "availability" => []]);
$client->MenuItem()->remove(["id" => "example_id", "store_id" => "example"]);
Python
Construct client as shown in the Python setup, then call the operations:
menu_item = client.MenuItem().load({"id": "example_id", "store_id": "example"})
updated = client.MenuItem().update({"id": "example_id", "store_id": "example", "availability": []})
client.MenuItem().remove({"id": "example_id", "store_id": "example"})
Ruby
Construct client as shown in the Ruby setup, then call the operations:
menu_item = client.MenuItem.load({ "id" => "example_id", "store_id" => "example" })
updated = client.MenuItem.update({ "id" => "example_id", "store_id" => "example", "availability" => [] })
client.MenuItem.remove({ "id" => "example_id", "store_id" => "example" })
TypeScript
Construct client as shown in the TypeScript setup, then call the operations:
const menu_item = await client.MenuItem().load({ id: "example_id", store_id: "example" })
const updated = await client.MenuItem().update({ id: "example_id", store_id: "example", availability: [] })
await client.MenuItem().remove({ id: "example_id", store_id: "example" })
Fields
| Field | Type | Required | Description |
|---|---|---|---|
availability |
array |
No | Availability |
contains_alcohol |
boolean |
No | This is to specify if the item contains alcohol content or not |
contains_tobacco |
boolean |
No | This is to specify if the item contains tobacco content or not |
description |
string |
No | Item Description |
dietary_labels |
array |
No | Dietary Labels |
fulfillment_modes |
array |
No | Fulfillment Modes |
id |
string |
No | Item ID (controlled by partners) |
image |
string |
No | Image that should be displayed along side this item. |
inherit_sections |
boolean |
No | If true, the item will inherit kitchen sections from its parent, but only if kitchen_sections is not set |
is_tax_included |
boolean |
No | Setting to true assumes tax is included in the price. |
kitchen_sections |
array |
No | A list of unique kitchen section identifiers assigned to this item. |
max_permitted |
integer |
No | Maximum number of items that must be selected (inclusive) |
min_permitted |
integer |
No | Minimum number of items that must be selected (inclusive) |
modifier_groups |
array |
No | Modifier Groups |
name |
string |
No | Item Name |
name_localized |
string |
No | Second Language Name |
number_of_servings |
number |
No | Describes the Number of servings for a item |
nutrition_info |
object |
No | Defines nutritional details for an item, and modifier. |
offer |
string |
No | Offer Type |
price |
integer |
No | Menu item price value, represented in the lowest currency unit, such as pence, paise, cents, yen, etc. |
restriction_tag |
string |
No | Restriction tag of an item |
schedule |
object |
Yes | Schedule |
sequence |
integer |
No | The sequence field orders items for display or application. |
show_online |
boolean |
No | Enable or Disable whether this category shown on Foodhub platform. |
tax_percentage |
number |
No | This will only work when tax included is false. |
tax_percentage_1e4 |
integer |
No | The tax rate value expressed as an integer. |
load
GET /v1/stores/{storeId}/menu/item/{itemId}
Operation ID: GET/v1/stores/{storeId}/menu/item/{itemId}.
Authentication: oauth2 (AccessToken).
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
itemId |
path |
string |
Yes | |
storeId |
path |
string |
Yes | Store Identifier |
Responses
200: OK
application/json
| Property | Type | Required | Description |
|---|---|---|---|
data |
object and object |
No |
400: Bad Request
application/json
| Property | Type | Required | Description |
|---|---|---|---|
error |
string |
Yes | 400 Bad Request is the status code that indicates the server cannot or will not process the request due to something that is perceived to be a client error |
401: Unauthorized
application/json
| Property | Type | Required | Description |
|---|---|---|---|
error |
string |
Yes | 401 Unauthorized is the status code to return when the client provides no credentials or invalid credentials. |
403: Forbidden
application/json
| Property | Type | Required | Description |
|---|---|---|---|
error |
string |
Yes | 403 Forbidden is the status code to return when a client has valid credentials but not enough privileges to perform an action on a resource. |
404: Not Found
application/json
| Property | Type | Required | Description |
|---|---|---|---|
error |
string |
Yes | 404 Not Found is the status code that indicates a server could not find a client-requested webpage |
429: Too Many Requests
application/json
| Property | Type | Required | Description |
|---|---|---|---|
error |
string |
Yes | 429 Too Many Requests is the status code that indicates the client application has surpassed its rate limit, or number of requests they can send in a given period of time |
remove
DELETE /v1/stores/{storeId}/menu/item/{itemId}
Operation ID: DELETE/v1/stores/{storeId}/menu/item/{itemId}.
Authentication: oauth2 (AccessToken).
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
itemId |
path |
string |
Yes | |
storeId |
path |
string |
Yes | Store Identifier |
Responses
204: No Content
400: Bad Request
application/json
| Property | Type | Required | Description |
|---|---|---|---|
error |
string |
Yes | 400 Bad Request is the status code that indicates the server cannot or will not process the request due to something that is perceived to be a client error |
401: Unauthorized
application/json
| Property | Type | Required | Description |
|---|---|---|---|
error |
string |
Yes | 401 Unauthorized is the status code to return when the client provides no credentials or invalid credentials. |
403: Forbidden
application/json
| Property | Type | Required | Description |
|---|---|---|---|
error |
string |
Yes | 403 Forbidden is the status code to return when a client has valid credentials but not enough privileges to perform an action on a resource. |
404: Not Found
application/json
| Property | Type | Required | Description |
|---|---|---|---|
error |
string |
Yes | 404 Not Found is the status code that indicates a server could not find a client-requested webpage |
429: Too Many Requests
application/json
| Property | Type | Required | Description |
|---|---|---|---|
error |
string |
Yes | 429 Too Many Requests is the status code that indicates the client application has surpassed its rate limit, or number of requests they can send in a given period of time |
update
PUT /v1/stores/{storeId}/menu/item/{itemId}
Operation ID: PUT/v1/stores/{storeId}/menu/item/{itemId}.
Authentication: oauth2 (AccessToken).
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
itemId |
path |
string |
Yes | |
storeId |
path |
string |
Yes | Store Identifier |
Request body
application/json
| Property | Type | Required | Description |
|---|---|---|---|
availability |
array of enum: MO, TU, WE, TH, FR, SA, ... |
No | |
contains_alcohol |
boolean |
No | This is to specify if the item contains alcohol content or not |
contains_tobacco |
boolean |
No | This is to specify if the item contains tobacco content or not |
description |
string |
No | Item Description |
dietary_labels |
array of enum: VEGAN, VEGETARIAN, GLUTEN_FREE, NON-VEGETARIAN |
No | |
fulfillment_modes |
array of enum: DELIVERY, COLLECTION |
No | |
image |
string |
No | Image that should be displayed along side this item. |
inherit_sections |
boolean |
No | If true, the item will inherit kitchen sections from its parent, but only if kitchen_sections is not set |
is_tax_included |
boolean |
No | Setting to true assumes tax is included in the price. Otherwise you will be able to set tax_percentage. |
kitchen_sections |
array of string |
No | A list of unique kitchen section identifiers assigned to this item. This field takes precedence over inheritance, if provided, it will override any parent section mapping. |
max_permitted |
integer |
No | Maximum number of items that must be selected (inclusive) |
min_permitted |
integer |
No | Minimum number of items that must be selected (inclusive) |
modifier_groups |
array of string |
No | |
name |
string |
No | Item Name |
name_localized |
string |
No | Second Language Name |
number_of_servings |
number |
No | Describes the Number of servings for a item |
nutrition_info |
object |
No | Defines nutritional details for an item, and modifier. Allows updates only as a complete object. |
nutrition_info.additive |
array of enum: UNSPECIFIED, COLORANT_UNSPECIFIED, COLORANT_ADVERSE_EFFECT, PRESERVATIVES_UNSPECIFIED, PRESERVATIVES_NITRITE_CURING_SALT, PRESERVATIVES_NITRATE, ... |
No | List of additive in the product. Allow multiple values |
nutrition_info.allergens |
array of enum: NO ALLERGENS, GLUTEN, CEREAL_UNSPECIFIED, CEREAL_WHEAT, CEREAL_RYE, CEREAL_BARLEY, ... |
No | List of allergens in the product. Allow multiple values |
nutrition_info.calories |
object |
No | |
nutrition_info.calories.lower_range |
number |
Yes | The lower range of the energy content. |
nutrition_info.calories.upper_range |
number |
Yes | The upper range of the energy content. |
nutrition_info.carbohydrates |
object |
No | |
nutrition_info.carbohydrates.lower_range |
number |
Yes | The lower range of the energy content. |
nutrition_info.carbohydrates.upper_range |
number |
Yes | The upper range of the energy content. |
nutrition_info.dietary_restriction |
enum: VEGETARIAN, VEGAN, GLUTEN_FREE, NON-VEGETARIAN |
No | List of dietary restriction in the product. Allow single value. |
nutrition_info.kilojoules |
object |
No | |
nutrition_info.kilojoules.lower_range |
number |
Yes | The lower range of the energy content. |
nutrition_info.kilojoules.upper_range |
number |
Yes | The upper range of the energy content. |
nutrition_info.protein |
object |
No | |
nutrition_info.protein.lower_range |
number |
Yes | The lower range of the energy content. |
nutrition_info.protein.upper_range |
number |
Yes | The upper range of the energy content. |
nutrition_info.salt |
object |
No | |
nutrition_info.salt.lower_range |
number |
Yes | The lower range of the energy content. |
nutrition_info.salt.upper_range |
number |
Yes | The upper range of the energy content. |
nutrition_info.saturated_fat |
object |
No | |
nutrition_info.saturated_fat.lower_range |
number |
Yes | The lower range of the energy content. |
nutrition_info.saturated_fat.upper_range |
number |
Yes | The upper range of the energy content. |
nutrition_info.spiciness |
enum: UNKNOWN, MILD, MEDIUM, HOT, VERY_HOT |
No | List of spiciness in the product.Allow single value. |
nutrition_info.sugar |
object |
No | |
nutrition_info.sugar.lower_range |
number |
Yes | The lower range of the energy content. |
nutrition_info.sugar.upper_range |
number |
Yes | The upper range of the energy content. |
offer |
enum: BOGOF, BOGOH |
No | Offer Type |
price |
integer |
No | Menu item price value, represented in the lowest currency unit, such as pence, paise, cents, yen, etc. |
restriction_tag |
string |
No | Restriction tag of an item |
schedule |
object |
No | |
schedule.end_date |
string |
No | The date at which the menu ceases to be available, in YYYY-MM-DD format eg 2024-12-01 leave empty always visible |
schedule.end_time |
string |
Yes | The time at which the menu ceases to be available, in 24-hour HH:MM format, for example “08:30”, “23:00” |
schedule.start_date |
string |
No | The date at which the menu becomes available, in YYYY-MM-DD format eg 2024-01-01 leave empty always visible |
schedule.start_time |
string |
Yes | The time at which the menu becomes available, in 24-hour HH:MM format, for example “08:30”, “23:00” |
sequence |
integer |
No | The sequence field orders items for display or application. It's a numeric value indicating the preferred order, with lower values shown first. |
show_online |
boolean |
No | Enable or Disable whether this category shown on Foodhub platform. |
tax_percentage |
number |
No | This will only work when tax included is false. |
tax_percentage_1e4 |
integer |
No | The tax rate value expressed as an integer. An integer representing a tax value scaled by a factor of 10,000. |
Responses
204: No Content
400: Bad Request
application/json
| Property | Type | Required | Description |
|---|---|---|---|
error |
string |
Yes | 400 Bad Request is the status code that indicates the server cannot or will not process the request due to something that is perceived to be a client error |
401: Unauthorized
application/json
| Property | Type | Required | Description |
|---|---|---|---|
error |
string |
Yes | 401 Unauthorized is the status code to return when the client provides no credentials or invalid credentials. |
403: Forbidden
application/json
| Property | Type | Required | Description |
|---|---|---|---|
error |
string |
Yes | 403 Forbidden is the status code to return when a client has valid credentials but not enough privileges to perform an action on a resource. |
404: Not Found
application/json
| Property | Type | Required | Description |
|---|---|---|---|
error |
string |
Yes | 404 Not Found is the status code that indicates a server could not find a client-requested webpage |
429: Too Many Requests
application/json
| Property | Type | Required | Description |
|---|---|---|---|
error |
string |
Yes | 429 Too Many Requests is the status code that indicates the client application has surpassed its rate limit, or number of requests they can send in a given period of time |