MenuSubcategory
A subcategory of a menu category.
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/subcategory/{subcategoryId} |
load |
OK |
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_subcategory, err := client.MenuSubcategory(nil).Load(map[string]any{"id": "example_id", "store_id": "example"}, nil)
if err != nil {
panic(err)
}
fmt.Println(menu_subcategory)
Lua
Construct client as shown in the Lua setup, then call the operations:
local menu_subcategory, err = client:MenuSubcategory():load({ id = "example_id", store_id = "example" })
PHP
Construct client as shown in the PHP setup, then call the operations:
$menu_subcategory = $client->MenuSubcategory()->load(["id" => "example_id", "store_id" => "example"]);
Python
Construct client as shown in the Python setup, then call the operations:
menu_subcategory = client.MenuSubcategory().load({"id": "example_id", "store_id": "example"})
Ruby
Construct client as shown in the Ruby setup, then call the operations:
menu_subcategory = client.MenuSubcategory.load({ "id" => "example_id", "store_id" => "example" })
TypeScript
Construct client as shown in the TypeScript setup, then call the operations:
const menu_subcategory = await client.MenuSubcategory().load({ id: "example_id", store_id: "example" })
Fields
| Field | Type | Required | Description |
|---|---|---|---|
availability |
array |
No | An array containing the days of hte week this subcategory should be shown |
description |
string |
No | Description |
fulfillment_modes |
array |
No | An array containing the possible fulfillment modes |
id |
string |
Yes | Subcategory ID (controlled by partners) |
image |
string |
No | Image that should be displayed along side this subcategory. |
is_tax_included |
boolean |
Yes | Setting to true assumes tax is included in the price. |
items |
array |
Yes | An array of item ids that should be show under this subcategory |
kitchen_sections |
array |
No | A list of unique kitchen section identifiers assigned to this subcategory. |
name |
string |
Yes | Subcategory Name |
name_localized |
string |
No | Second Language Name |
schedule |
object |
Yes | Schedule |
sequence |
integer |
No | The sequence field orders subcategories for display or application. |
service_availability |
array |
No | [Menu V4 only] Service availability details for the menu. |
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/subcategory/{subcategoryId}
Operation ID: GET/v1/stores/{storeId}/menu/subcategory/{subcategoryId}.
Authentication: oauth2 (AccessToken).
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
storeId |
path |
string |
Yes | Store Identifier |
subcategoryId |
path |
string |
Yes |
Responses
200: OK
application/json
| Property | Type | Required | Description |
|---|---|---|---|
data |
object |
No | |
data.availability |
array of enum: MO, TU, WE, TH, FR, SA, ... |
No | An array containing the days of hte week this subcategory should be shown |
data.description |
string |
No | |
data.fulfillment_modes |
array of enum: DELIVERY, COLLECTION |
No | An array containing the possible fulfillment modes |
data.id |
string |
Yes | Subcategory ID (controlled by partners) |
data.image |
string |
No | Image that should be displayed along side this subcategory. If the field is missing - any existing image will be removed. |
data.is_tax_included |
boolean |
Yes | Setting to true assumes tax is included in the price. Otherwise you will be able to set tax_percentage. |
data.items |
array of string |
Yes | An array of item ids that should be show under this subcategory |
data.kitchen_sections |
array of string |
No | A list of unique kitchen section identifiers assigned to this subcategory. This field takes precedence over inheritance, if provided, it will override any parent section mapping. |
data.name |
string |
Yes | Subcategory Name |
data.name_localized |
string |
No | Second Language Name |
data.schedule |
object |
No | |
data.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 |
data.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” |
data.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 |
data.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” |
data.sequence |
integer |
No | The sequence field orders subcategories for display or application. It's a numeric value indicating the preferred order, with lower values shown first. |
data.service_availability |
array of object |
No | [Menu V4 only] Service availability details for the menu. Not supported in Menu V3 and below.. |
data.service_availability[].time_periods |
array of object |
Yes | Time periods for the selected weekdays |
data.service_availability[].time_periods[].time |
object |
Yes | |
data.service_availability[].time_periods[].time.from |
string |
Yes | Start time in HH:MM format |
data.service_availability[].time_periods[].time.to |
string |
Yes | End time in HH:MM format |
data.service_availability[].weekday |
array of enum: MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, ... |
Yes | Weekdays when the menu is available |
data.show_online |
boolean |
No | Enable or Disable whether this category shown on Foodhub platform. |
data.tax_percentage |
number |
No | This will only work when tax included is false. |
data.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. |
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 |