API

MenuCategory

A category of 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/category/{categoryId} load OK
PUT /v1/stores/{storeId}/menu/category/{categoryId} 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_category, err := client.MenuCategory(nil).Load(map[string]any{"id": "example_id", "store_id": "example"}, nil)
if err != nil {
    panic(err)
}
fmt.Println(menu_category)
updated, err := client.MenuCategory(nil).Update(map[string]any{"id": "example_id", "store_id": "example", "availability": []any{}}, nil)
if err != nil {
    panic(err)
}
fmt.Println(updated)

Lua

Construct client as shown in the Lua setup, then call the operations:

local menu_category, err = client:MenuCategory():load({ id = "example_id", store_id = "example" })
local updated, err = client:MenuCategory():update({ id = "example_id", store_id = "example", availability = {} })

PHP

Construct client as shown in the PHP setup, then call the operations:

$menu_category = $client->MenuCategory()->load(["id" => "example_id", "store_id" => "example"]);
$updated = $client->MenuCategory()->update(["id" => "example_id", "store_id" => "example", "availability" => []]);

Python

Construct client as shown in the Python setup, then call the operations:

menu_category = client.MenuCategory().load({"id": "example_id", "store_id": "example"})
updated = client.MenuCategory().update({"id": "example_id", "store_id": "example", "availability": []})

Ruby

Construct client as shown in the Ruby setup, then call the operations:

menu_category = client.MenuCategory.load({ "id" => "example_id", "store_id" => "example" })
updated = client.MenuCategory.update({ "id" => "example_id", "store_id" => "example", "availability" => [] })

TypeScript

Construct client as shown in the TypeScript setup, then call the operations:

const menu_category = await client.MenuCategory().load({ id: "example_id", store_id: "example" })
const updated = await client.MenuCategory().update({ id: "example_id", store_id: "example", availability: [] })

Fields

Field Type Required Description
availability array No An array containing the days of the week this category should be shown
expand_subcategories boolean No If true, subcategories will be expanded and shown directly at the top level, without requiring the user to click on the category to see the list of subcategories.
fulfillment_modes array No An array containing the possible fulfillment modes
id string Yes Category ID (controlled by partners)
image string No Image that should be displayed along side this category.
is_tax_included boolean Yes Setting to true assumes tax is included in the price.
kitchen_sections array No A list of unique kitchen section identifiers assigned to this category
name string Yes Category Name
name_localized string No Second Language Name
schedule object Yes Schedule
sequence integer No The sequence field orders categories 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.
subcategories array Yes An array of subcategory ids that should be show under this category
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/category/{categoryId}

Operation ID: GET/v1/stores/{storeId}/menu/category/{categoryId}.

Authentication: oauth2 (AccessToken).

Parameters

Parameter In Type Required Description
categoryId path string Yes
storeId path string Yes Store Identifier

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 the week this category should be shown
data.expand_subcategories boolean No If true, subcategories will be expanded and shown directly at the top level, without requiring the user to click on the category to see the list of subcategories.
data.fulfillment_modes array of enum: DELIVERY, COLLECTION No An array containing the possible fulfillment modes
data.id string Yes Category ID (controlled by partners)
data.image string No Image that should be displayed along side this category. 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.kitchen_sections array of string No A list of unique kitchen section identifiers assigned to this category
data.name string Yes Category 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 categories 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.subcategories array of string Yes An array of subcategory ids that should be show under this category
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

update

PUT /v1/stores/{storeId}/menu/category/{categoryId}

Operation ID: PUT/v1/stores/{storeId}/menu/category/{categoryId}.

Authentication: oauth2 (AccessToken).

Parameters

Parameter In Type Required Description
categoryId 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 An array containing the days of the week this category should be shown
expand_subcategories boolean No If true, subcategories will be expanded and shown directly at the top level, without requiring the user to click on the category to see the list of subcategories.
fulfillment_modes array of enum: DELIVERY, COLLECTION No An array containing the possible fulfillment modes
image string No Image that should be displayed along side this category. If the field is missing - any existing image will be removed.
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 category
name string No Category Name
name_localized string No Second Language Name
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”
show_online boolean No Enable or Disable whether this category shown on Foodhub platform.
tax_percentage number No This is to capture the tax percentage in both the cases of is_tax_included true or 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