Get information about the activity of the chain's restaurants

Enabling and disabling restaurants in the Yandex service.

To indicate the availability or unavailability of a restaurant in the Yandex service
should pass the corresponding places.enabled value.
If the restaurant is not included in the partner's response, the availability does not change.
You can only enable Restaurants that were not previously disabled by the Yandex service for other reasons.

Request

GET

/restaurants/availability

Responses

200 OK

A list of restaurants that are currently active

Body

application/json
{
    "places": [
        {
            "id": "e89b-12d3-a456",
            "enabled": true
        }
    ]
}

Name

Description

places

Type: RestaurantAvailability[]

RestaurantAvailability

Name

Description

enabled*

Type: boolean

Restaurant activity

Example: true

id*

Type: string

ID of the restaurant in the partner system

Example: e89b-12d3-a456

Max length: 255

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

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"
    }
]

OrderStatusPut[]

OrderStatusPut

Name

Description

status*

Type: string

Order ststus.
Status description:

  • TAKEN_BY_COURIER - courier picked up the order from the restaurant.
  • DELIVERED – order completed.
  • CANCELLED – order cancelled.

Enum: CANCELLED, TAKEN_BY_COURIER, DELIVERED

attributes

Type: string[]

Additional attributes when changing the order status, for example, a sign of payment upon cancellation

Example: paid

comment

Type: string

Description of cancellation reasons (can be empty)

Example: test

Max length: 500

reason

Type: string

The reason for the cancellation of the order. It is transmitted only with the CANCELLED status

Example: place.unable_to_call

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

No longer supported, please use an alternative and newer version.