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

Example: ``

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": "https://example.com",
          "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": [
            null
          ],
          "minSelectedModifiers": 0,
          "maxSelectedModifiers": 10,
          "sortOrder": 0
        }
      ],
      "images": [
        {
          "hash": "example",
          "url": "https://example.com"
        }
      ],
      "additional_descriptions": {
        "consisting_ingredients": [
          "flour"
        ],
        "badges": [
          {}
        ]
      },
      "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

Example
[
  {
    "id": "5af86d5a-d92d-4e07-9271-aea0f7ef95a6",
    "parentId": "5af86d5a-d92d-4e07-9271-aea0f7ef95a6",
    "schedules": [
      "breakfasts"
    ],
    "name": "Breakfast",
    "sortOrder": 0,
    "images": [
      {
        "url": "https://example.com",
        "updatedAt": "1937-01-01T12:00:27.870000+00:20"
      }
    ]
  }
]

items

Type: MenuCompositionItem[]

List of items available to order

Example
[
  {
    "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": [
          {}
        ],
        "minSelectedModifiers": 0,
        "maxSelectedModifiers": 10,
        "sortOrder": 0
      }
    ],
    "images": [
      {
        "hash": "example",
        "url": "https://example.com"
      }
    ],
    "additional_descriptions": {
      "consisting_ingredients": [
        "flour"
      ],
      "badges": [
        {
          "category": "cooking_method",
          "value": "fried"
        }
      ]
    },
    "adult_info": {
      "age_group": 18,
      "alcohol_percentage": "12.34"
    }
  }
]

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: 1937-01-01T12:00:27.870000+00:20

schedules

Type: Schedule

Description of possible types of menu category schedules

Example
{
  "scheduleName": [
    {
      "from": "08:00",
      "till": "09:45",
      "weekdays": [
        "monday"
      ]
    }
  ]
}

ScheduleName

Name

Description

from

Type: string

The start time is represented in a 24-hour format, ranging from 00:00 to 24:00.

Example: 08:00

till

Type: string

The end time is represented in a 24-hour format, ranging from 00:00 to 24:00.

Example: 09:45

weekdays

Type: string[]

specifying the days of the week when a declared schedule type is active.

Example
[
  "monday"
]
Example
{
  "from": "08:00",
  "till": "09:45",
  "weekdays": [
    "monday"
  ]
}

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.

Example
[
  {
    "from": "08:00",
    "till": "09:45",
    "weekdays": [
      "monday"
    ]
  }
]
Example
{
  "scheduleName": [
    {
      "from": "08:00",
      "till": "09:45",
      "weekdays": [
        "monday"
      ]
    }
  ]
}

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: 1937-01-01T12:00:27.870000+00:20

url

Type: string<uri>

Link to the image for download

Example: https://example.com

Example
{
  "url": "https://example.com",
  "updatedAt": "1937-01-01T12:00:27.870000+00:20"
}

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

Max length: 64

Example: 5af86d5a-d92d-4e07-9271-aea0f7ef95a6

name

Type: string

Category name

Example: Breakfast

images

Type: CategoryImages[]

Image of the restaurant category

Example
[
  {
    "url": "https://example.com",
    "updatedAt": "1937-01-01T12:00:27.870000+00:20"
  }
]

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.

Max length: 64

Example: 5af86d5a-d92d-4e07-9271-aea0f7ef95a6

schedules

Type: string[]

Example
[
  "breakfasts"
]

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
{
  "id": "5af86d5a-d92d-4e07-9271-aea0f7ef95a6",
  "parentId": "5af86d5a-d92d-4e07-9271-aea0f7ef95a6",
  "schedules": [
    "breakfasts"
  ],
  "name": "Breakfast",
  "sortOrder": 0,
  "images": [
    {
      "url": "https://example.com",
      "updatedAt": "1937-01-01T12:00:27.870000+00:20"
    }
  ]
}

Nutrients

The nutrition value of the product per 100g

Name

Description

calories

Type: number

Calories per 100g

carbohydrates

Type: number

Carbohydrates per 100g

fats

Type: number

Fats per 100g

proteins

Type: number

Protein per 100g

Example
{
  "calories": 12.5,
  "proteins": 15.3,
  "fats": 12.5,
  "carbohydrates": 15.3
}

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: 916cfc99-acb4-4a96-9a42-b29159e88189

maxAmount

Type: integer

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.

Min value: 0

Max value: 255

minAmount

Type: integer

Minimum quantity of the specified modifier for the dish in the order. The minAmount value must be less than maxAmount.

Min value: 0

Max value: 255

name

Type: string

Name of the modifier

Example: Utensils

price

Type: number

modifier price

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.

Enum: sugary_drink, other

originalPrice

Type: number

Specific field for transmitting the price of mandatory free modifiers, which will be used for
printing in receipts and partial refund receipts. In this case, the price field value must be 0.

vat

Type: integer

VAT included in the price, in percentage. If not specified, it is considered as 0.

Example
{
  "id": "916cfc99-acb4-4a96-9a42-b29159e88189",
  "name": "Utensils",
  "price": 150,
  "originalPrice": 150,
  "vat": 20,
  "excise": "sugary_drink",
  "minAmount": 0,
  "maxAmount": 10
}

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: 9987c815-3069-46ad-9626-74799fb22210

maxSelectedModifiers

Type: integer

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)

Min value: 0

Max value: 255

minSelectedModifiers

Type: integer

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

Min value: 0

Max value: 255

name

Type: string

The name of the modifier group

Example: Utensil selection

modifiers

Type: Modifiers[]

Options included in the group

Example
[
  {
    "id": "916cfc99-acb4-4a96-9a42-b29159e88189",
    "name": "Utensils",
    "price": 150,
    "originalPrice": 150,
    "vat": 20,
    "excise": "sugary_drink",
    "minAmount": 0,
    "maxAmount": 10
  }
]

sortOrder

Type: integer

Sorting order from smallest to largest. If not specified, it is considered as 100.

Example
{
  "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
}

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.

Example: example

url

Type: string<uri>

Link to download the image

Example: https://example.com

Example
{
  "hash": "example",
  "url": "https://example.com"
}

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_specifics
    • halal
    • meat_free
  • food_spiciness
    • spicy
  • cooking_method
    • fried
    • baked
    • grilled
    • not_cooked
  • food_portion
    • portion_for_several_people
    • big_portion
    • combo

Name

Description

category

Type: string

Enum: food_specifics, food_spiciness, cooking_method, food_portion

value

Type: string

Enum: halal, meat_free, spicy, fried, baked, grilled, not_cooked, portion_for_several_people, big_portion, combo

Example
{
  "category": "cooking_method",
  "value": "fried"
}

MenuCompositionItemAdditionalDescriptions

Additional fields for the item description

Name

Description

badges

Type: MenuCompositionItemAdditionalDescriptionsBadge[]

Example
[
  {
    "category": "cooking_method",
    "value": "fried"
  }
]

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.

Max items: 100

Example
[
  "flour"
]
Example
{
  "consisting_ingredients": [
    "flour"
  ],
  "badges": [
    {
      "category": "cooking_method",
      "value": "fried"
    }
  ]
}

AgeGroup

Age restriction on the product

Type: integer

Enum: 18, 21

AlcoholPercentage

Item's alcohol by volume. The number is indicated only with a dot.

Type: string

Pattern: ^[0-9]+(\.[0-9]{1,2})?$

Example: 12.34

AdultInfo

Adult attributes information for the product

Name

Description

age_group

Type: AgeGroup

Age restriction on the product

Enum: 18, 21

Example: 18

alcohol_percentage

Type: AlcoholPercentage

Item's alcohol by volume. The number is indicated only with a dot.

Pattern: ^[0-9]+(\.[0-9]{1,2})?$

Example: 12.34

Example
{
  "age_group": 18,
  "alcohol_percentage": "12.34"
}

MenuCompositionItem

Name

Description

categoryId

Type: string

The ID of the category in the partner's system

Max length: 64

Example: fa494dc1-2578-4adb-a8fa-e270de8c3d28

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.

Max length: 64

Example: e6709e9a-d3ab-4d1e-aa69-7ce30073cbc9

measure

Type: integer

Characteristics of the measurements of the item - weight or volume

measureUnit

Type: string

Unit of measurement. Acceptable values are grams and milliliters

Enum: г, мл, g, ml

name

Type: string

The name of the dish in the restaurant

Example: Pies Cherry pie

price

Type: number

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.

additional_descriptions

Type: MenuCompositionItemAdditionalDescriptions

Additional fields for the item description

Example
{
  "consisting_ingredients": [
    "flour"
  ],
  "badges": [
    {
      "category": "cooking_method",
      "value": "fried"
    }
  ]
}

adult_info

Type: AdultInfo

Adult attributes information for the product

Example
{
  "age_group": 18,
  "alcohol_percentage": "12.34"
}

description

Type: string

Full description of the dish

Example: Flour, water, egg powder, frozen cherries

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.

Enum: sugary_drink, other

images

Type: ItemsImages[]

item image

Example
[
  {
    "hash": "example",
    "url": "https://example.com"
  }
]

isCatchweight

Type: boolean

boolean flag indicating whether a product is weighted or not in a restaurant system.

Default: false

modifierGroups

Type: ModifierGroups[]

Groups of modifiers for an item. The obligation of modifiers is determined by the parameter minSelectedModifiers in the modifiers group.

Example
[
  {
    "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
  }
]

nutrients

Type: Nutrients

The parameters of calories, proteins, fats and carbohydrates.

The nutrition value of the product per 100g

Example
{
  "calories": 12.5,
  "proteins": 15.3,
  "fats": 12.5,
  "carbohydrates": 15.3
}

sortOrder

Type: integer

The sort order is from smaller to larger. If not specified, it's counted for 100

vat

Type: number

Percentage of Value-Added Tax (VAT) included in the product price. If the VAT rate is not specified, it is assumed to be 0%.

weightQuantum

Type: number

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
{
  "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": "example",
      "url": "https://example.com"
    }
  ],
  "additional_descriptions": {
    "consisting_ingredients": [
      "flour"
    ],
    "badges": [
      {
        "category": "cooking_method",
        "value": "fried"
      }
    ]
  },
  "adult_info": {
    "age_group": 18,
    "alcohol_percentage": "12.34"
  }
}

400 Bad Request

Bad request. An array with an object from the error list is expected in the response body

Body

application/json
[
  {
    "code": 100,
    "description": "Description of error"
  }
]

Type: ErrorItem[]

ErrorItem

Name

Description

code

Type: integer

Error code agreed with Yandex

description

Type: string

Error message

Example: Description of error

Example
{
  "code": 100,
  "description": "Description of error"
}

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: Access token has been expired. You should request a new one

404 Not Found

No restaurant found. An array with an object from the error list is expected in the response body

Body

application/json
[
  {
    "code": 100,
    "description": "Description of error"
  }
]

Type: ErrorItem[]

500 Internal Server Error

Internal server errors. An array with an object from the error list is expected in the response body

Body

application/json
[
  {
    "code": 100,
    "description": "Description of error"
  }
]

Type: ErrorItem[]