Get currently unavailable menu items
Items with schematic or logical inconsistencies (too long string, stock equal to -10.00) may be ignored. The current version of the response model is application/vnd.eats.menu.availability.v2+json
Request
GET
/menu/{restaurantId}/availability
Path parameters
|
Name |
Description |
|
restaurantId |
Type: string The ID of the restaurant in the partner's system Example: `` |
Responses
200 OK
Returns a list of currently unavailable menu items in the restaurant menu
Body
application/vnd.eats.menu.availability.v2+json
{
"items": [
{
"itemId": "eff0cec0-058c-4d53-b524-1c04ac24fb51",
"stock": 5
}
],
"modifiers": [
{
"modifierId": "eff0cec0-058c-4d53-b524-1c04ac24fb51",
"stock": 5
}
]
}
|
Name |
Description |
|
items |
Type: MenuAvailabilityItems[] List of menu items for which availability needs to be changed Example
|
|
modifiers |
Type: MenuAvailabilityModifiers[] List of dish modifiers for which availability needs to be change Example
|
MenuAvailabilityItems
|
Name |
Description |
|
itemId |
Type: string Internal identifier of the dish in the partner's restaurant system. Can be any value convertible to a string. Recommendation - UUID4 Example: |
|
stock |
Type: integer Stock in the restaurant. When 0, the dish disappears from the menu. Optional field. If stock is not passed for itemId, the stock of the dish is considered as 0. Default: |
Example
{
"itemId": "eff0cec0-058c-4d53-b524-1c04ac24fb51",
"stock": 5
}
MenuAvailabilityModifiers
|
Name |
Description |
|
modifierId |
Type: string Internal identifier of the modifier in the partner's restaurant system. Can be any value convertible to a string. Recommendation - UUID4 Example: |
|
stock |
Type: integer Stock in the restaurant. When 0, the modifier disappears from the menu. Optional field. If stock is not passed for modifierId, the stock of the modifier is considered as 0. Default: |
Example
{
"modifierId": "eff0cec0-058c-4d53-b524-1c04ac24fb51",
"stock": 5
}
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
ErrorItem
|
Name |
Description |
|
code |
Type: integer Error code agreed with Yandex |
|
description |
Type: string Error message Example: |
Example
{
"code": 100,
"description": "Description of error"
}
500 Internal Server Error
Internal server errors. An array with an object from the error list is expected in the response body