Get the current restaurant menu
Items with schematic or logical inconsistencies (too long string, price equal to 0.00) may be ignored. The current version of the response model is application/vnd.eats.menu.composition.v2+json
Request
GET
/menu/{restaurantId}/composition
Path parameters
|
Name |
Description |
|
restaurantId* |
Type: string The ID of the restaurant in the partner's system |
Responses
200 OK
Success. The current menu for the specified restaurant is returned
Body
application/vnd.eats.menu.composition.v2+json
{
"schedules": {
"scheduleName": [
{
"from": "08:00",
"till": "09:45",
"weekdays": [
"monday"
]
}
]
},
"categories": [
{
"id": "5af86d5a-d92d-4e07-9271-aea0f7ef95a6",
"parentId": "5af86d5a-d92d-4e07-9271-aea0f7ef95a6",
"schedules": [
"breakfasts"
],
"name": "Breakfast",
"sortOrder": 0,
"images": [
{
"url": "string",
"updatedAt": "1937-01-01T12:00:27.870000+00:20"
}
]
}
],
"items": [
{
"id": "e6709e9a-d3ab-4d1e-aa69-7ce30073cbc9",
"categoryId": "fa494dc1-2578-4adb-a8fa-e270de8c3d28",
"name": "Pies Cherry pie",
"description": "Flour, water, egg powder, frozen cherries",
"price": 1000,
"vat": 20,
"isCatchweight": false,
"measure": 666,
"weightQuantum": 0.1,
"measureUnit": "g",
"excise": "sugary_drink",
"nutrients": {
"calories": 12.5,
"proteins": 15.3,
"fats": 12.5,
"carbohydrates": 15.3
},
"sortOrder": 0,
"modifierGroups": [
{
"id": "9987c815-3069-46ad-9626-74799fb22210",
"name": "Utensil selection",
"modifiers": [
{
"id": "916cfc99-acb4-4a96-9a42-b29159e88189",
"name": "Utensils",
"price": 150,
"originalPrice": 150,
"vat": 20,
"excise": "sugary_drink",
"minAmount": 0,
"maxAmount": 10
}
],
"minSelectedModifiers": 0,
"maxSelectedModifiers": 10,
"sortOrder": 0
}
],
"images": [
{
"hash": "string",
"url": "string"
}
],
"additional_descriptions": {
"consisting_ingredients": [
"flour"
],
"badges": [
{
"category": "cooking_method",
"value": "fried"
}
]
},
"adult_info": {
"age_group": 18,
"alcohol_percentage": "12.34"
}
}
],
"lastChange": "1937-01-01T12:00:27.870000+00:20"
}
|
Name |
Description |
|
categories* |
Type: Category[] Menu categories |
|
items* |
Type: MenuCompositionItem[] List of items available to order |
|
lastChange* |
Type: string<date-time> The date of the last change in the restaurant menu (on the partner's side). Important: date in RFC 3339 format with fractional part of seconds (Y-m-d\TH:i:s.uP)! If the last update date hasn't changed, Yandex can automatically determine that the menu doesn't need to be updated. If the update date in this field differs from the date of the last menu update, the menu will be reloaded. Example: |
|
schedules |
Type: Schedule Description of possible types of menu category schedules |
Category
|
Name |
Description |
|
id* |
Type: string The category ID is a unique identifier that distinguishes one category from another within the partner system. The ID can be any value that can be converted to a string. It is recommended to use a UUID4 UUID4 Example: Max length: |
|
name* |
Type: string Category name Example: |
|
images |
Type: CategoryImages[] Image of the restaurant category |
|
parentId |
Type: string The parent category ID is a unique identifier that references an existing category in the system. The parent category ID is nullable, meaning it can be absent or null, but it cannot be an empty string. It refers to existing categories in the system, ensuring that the hierarchical structure is maintained. When loading, the hierarchical structure is adapted to the flat category structure used by Yandex, where items from subcategories are moved to their parent categories at the first level. Example: Max length: |
|
schedules |
Type: string[] Category schedule type. This refers to the type of schedule associated with a category. If an empty list is provided or a reference is made to an empty category in a separate schedules block, the category is considered always available. This means that if no schedule is specified or if the referenced category is empty, the category is assumed to be always accessible or available. Example: |
|
sortOrder |
Type: integer The sort order is from smallest to largest (i.e., ascending order). If the sort order is not specified, it is assumed to be 100. Example: |
MenuCompositionItem
|
Name |
Description |
|
categoryId* |
Type: string The ID of the category in the partner's system Example: Max length: |
|
id* |
Type: string Unique identifier for a dish within a restaurant's system. The internal dish ID can be any value that can be converted to a string. It is recommended to use a UUID4. Example: Max length: |
|
measure* |
Type: integer Characteristics of the measurements of the item - weight or volume Example: |
|
measureUnit* |
Type: string Unit of measurement. Acceptable values are grams and milliliters Example: Enum: |
|
name* |
Type: string The name of the dish in the restaurant Example: |
|
price* |
Type: number<double> cost of a dish or product in the restaurant's system. The product price must be a non-zero value; dishes with a price of zero are skipped and not included in the menu. Example: |
|
additional_descriptions |
Type: MenuCompositionItemAdditionalDescriptions Additional fields for the item description |
|
adult_info |
Type: AdultInfo Adult attributes information for the product |
|
description |
Type: string Full description of the dish Example: |
|
excise |
Type: string A sign of an excisable product. You can also use a key instead excise to pass the label [AT] (in capital Latin letters in square brackets) in the product name. Example: Enum: |
|
images |
Type: ItemsImages[] item image |
|
isCatchweight |
Type: boolean boolean flag indicating whether a product is weighted or not in a restaurant system. Default: Example: |
|
modifierGroups |
Type: ModifierGroups[] Groups of modifiers for an item. The obligation of modifiers is determined by the parameter |
|
nutrients |
Type: Nutrients The parameters of calories, proteins, fats and carbohydrates. |
|
sortOrder |
Type: integer The sort order is from smaller to larger. If not specified, it's counted for 100 Example: |
|
vat |
Type: number<int32> Percentage of Value-Added Tax (VAT) included in the product price. If the VAT rate is not specified, it is assumed to be 0%. Example: |
|
weightQuantum |
Type: number<float> The smallest quantity of product (quantum) available for order. This field is required if the value of is Catch weight is equal to true, otherwise the field value is not used Example: |
Schedule
|
Name |
Description |
|
scheduleName |
Type: ScheduleName[] Schedule type identification. The schedule type is identified by a unique key name, such as "breakfasts". This key is used in the schedule array for menu categories to specify the type of schedule. |
CategoryImages
|
Name |
Description |
|
updatedAt* |
Type: string<date-time> The date of the image update, in RFC 3339 format with a fractional part of seconds (Y-m-d\TH:i:s.uP) Example: |
|
url* |
Type: string<uri> Link to the image for download |
MenuCompositionItemAdditionalDescriptions
Additional fields for the item description
|
Name |
Description |
|
badges |
Type: MenuCompositionItemAdditionalDescriptionsBadge[] The tags of the dish are divided into categories and values. You can select only one option in each category. When processing, the first valid value will be taken from each category. Duplicate, unknown categories or mismatched category values will be skipped.
|
|
consisting_ingredients |
Type: string[] The list of ingredients that make up the dish. These are the initial components of the dish, not its constituent parts. It is advisable to specify all the ingredients that can cause allergies or they strongly affect the taste. This way users will immediately see the important ones details about the dish. Example: Max length: Max items: |
AdultInfo
Adult attributes information for the product
|
Name |
Description |
|
age_group* |
Type: AgeGroup Age restriction on the product Enum: |
|
alcohol_percentage |
Type: string Item's alcohol by volume. The number is indicated only with a dot. Example: Pattern: |
ItemsImages
|
Name |
Description |
|
hash* |
Type: string SHA1 hash of the image file content. Calculated by the partner, serves as a uniqueness indicator. If it changes, Yandex reloads the image. |
|
url* |
Type: string<uri> Link to download the image |
ModifierGroups
|
Name |
Description |
|
id* |
Type: string ID of the modifier group on the partner's side. It can be any value that is cast to a string. Recommendation - UUID4 Example: |
|
maxSelectedModifiers* |
Type: integer<int32> Maximum number of modifiers that can be selected for this group. Must not be less than the total number of possible modifiers (considering their maxAmount) Example: Min value: Max value: |
|
minSelectedModifiers* |
Type: integer<int32> Minimum number of modifiers that must be selected for this group. Must not exceed the total number of required modifiers (considering their minAmount) and not exceed maxSelectedModifiers Example: Min value: Max value: |
|
name* |
Type: string The name of the modifier group Example: |
|
modifiers |
Type: Modifiers[] Options included in the group |
|
sortOrder |
Type: integer Sorting order from smallest to largest. If not specified, it is considered as 100. Example: |
Nutrients
The nutrition value of the product per 100g
|
Name |
Description |
|
calories* |
Type: number Calories per 100g Example: |
|
carbohydrates* |
Type: number Carbohydrates per 100g Example: |
|
fats* |
Type: number Fats per 100g Example: |
|
proteins* |
Type: number Protein per 100g Example: |
ScheduleName
|
Name |
Description |
|
from* |
Type: string The start time is represented in a 24-hour format, ranging from 00:00 to 24:00. Example: |
|
till* |
Type: string The end time is represented in a 24-hour format, ranging from 00:00 to 24:00. Example: |
|
weekdays* |
Type: string[] specifying the days of the week when a declared schedule type is active. Example: Enum: |
MenuCompositionItemAdditionalDescriptionsBadge
The tags of the dish are divided into categories and values. You can select only one option in each category. When processing, the first valid value will be taken from each category. Duplicate, unknown categories or mismatched category values will be skipped.
Available categories and their values:
food_specificshalalmeat_free
food_spicinessspicy
cooking_methodfriedbakedgrillednot_cooked
food_portionportion_for_several_peoplebig_portioncombo
|
Name |
Description |
|
category* |
Type: string Example: Enum: |
|
value* |
Type: string Example: Enum: |
Modifiers
|
Name |
Description |
|
id* |
Type: string Modifier identifier on the partner's side. Can be any value convertible to a string. Recommendation - UUID4. This identifier is passed in the order along with the selected quantity. example: 916cfc99-acb4-4a96-9a42-b29159e88189 Example: |
|
maxAmount* |
Type: integer<int32> Maximum quantity of the specified modifier for the dish in the order. This number must not exceed the value of the maxSelectedModifiers parameter in the ModifierGroup model for the entire order. For example, if you support 5 modifiers in a group in total, but the maximum value of the modifier for an individual dish is 10 – such a modifier will not pass validation. Incorrect modifiers, the group to which they belong, and the menu items using incorrect data will not be loaded. Example: Min value: Max value: |
|
minAmount* |
Type: integer<int32> Minimum quantity of the specified modifier for the dish in the order. The minAmount value must be less than maxAmount. Example: Min value: Max value: |
|
name* |
Type: string Name of the modifier Example: |
|
price* |
Type: number<double> modifier price Example: |
|
excise |
Type: string Indicator of excise goods. Instead of using the excise key, you can use the [AT] tag (uppercase Latin letters in square brackets) in the modifier's name field. Example: Enum: |
|
originalPrice |
Type: number<double> Specific field for transmitting the price of mandatory free modifiers, which will be used for Example: |
|
vat |
Type: integer<int32> VAT included in the price, in percentage. If not specified, it is considered as 0. Example: |
400 Bad Request
Bad request. An array with an object from the error list is expected in the response body
OrderStatusPut
|
Name |
Description |
|
status* |
Type: string Order ststus.
Enum: |
|
attributes |
Type: string[] Additional attributes when changing the order status, for example, a sign of payment upon cancellation Example: |
|
comment |
Type: string Description of cancellation reasons (can be empty) Example: Max length: |
|
reason |
Type: string The reason for the cancellation of the order. It is transmitted only with the CANCELLED status Example: |
|
updatedAt |
Type: string The date when the order status changed, in RFC 3339 format with fractional part of seconds (Y-m-d\TH:i:s.uP) Example: |
401 Unauthorized
Authorization failed - the token expired or was not passed in the request. A retry will be made
Body
application/json
{
"reason": "Access token has been expired. You should request a new one"
}
|
Name |
Description |
|
reason* |
Type: string Reason for authorization failure Example: |
404 Not Found
No restaurant found. An array with an object from the error list is expected in the response body
500 Internal Server Error
Internal server errors. An array with an object from the error list is expected in the response body
No longer supported, please use an alternative and newer version.