Get restaurant's delivery zones
The method of creating delivery zones in Yandex systems. It works according to a schedule (by default, once a day at 9:00, it is possible to change/extend the request interval in agreement with Yandex).
Note
This method is only available by subscription.
Request
GET
/places/{restaurantId}/zones
Path parameters
|
Name |
Description |
|
restaurantId* |
Type: string The ID of the restaurant in the partner's system |
Responses
200 OK
Sucsess
Body
application/json
[
{
"coordinates": [
{
"lt": 56.473673,
"lg": 35.918658
}
],
"meta": {
"zoneId": "string",
"enabled": false,
"intervals": {
"mon": [
{
"start": "00:00",
"end": "24:00"
}
],
"tue": [
{
"start": "00:00",
"end": "24:00"
}
],
"wed": [
{
"start": "00:00",
"end": "24:00"
}
],
"thu": [
{
"start": "00:00",
"end": "24:00"
}
],
"fri": [
{
"start": "00:00",
"end": "24:00"
}
],
"sat": [
{
"start": "00:00",
"end": "24:00"
}
],
"sun": [
{
"start": "00:00",
"end": "24:00"
}
]
},
"averageDeliveryTime": 0,
"thresholds": [
{
"orderCost": {
"currency": "SUM",
"value": 0
},
"deliveryCost": {
"currency": "SUM",
"value": 0
}
}
],
"courierType": "pedestrian"
},
"name": "string"
}
]
Zone[]
Zone
Delivery area
|
Name |
Description |
|
coordinates* |
Type: Point[] The set of coordinates of the polygon must contain an ordered a set of coordinate points Min length: Max length: |
|
meta* |
Type: ZoneMeta Additional data of delivery zones |
|
name* |
Type: string Delivery zone name Min length: Max length: |
Point
The coordinate point of the zone
|
Name |
Description |
|
lg* |
Type: number Example: |
|
lt* |
Type: number Example: |
ZoneMeta
Additional data of delivery zones
|
Name |
Description |
|
averageDeliveryTime* |
Type: number Average waiting time for delivery |
|
enabled* |
Type: boolean The boolean flag of the Delivery zone activity. When received in response |
|
intervals* |
Type: Intervals Delivery zones opening hours |
|
thresholds* |
Type: Threshold[] Terms of delivery Min length: Max length: |
|
zoneId* |
Type: string Delivery zone ID in the partner's system Min length: Max length: |
|
courierType |
Type: string Enum: |
Intervals
Delivery zones opening hours
|
Name |
Description |
|
fri* |
Type: Interval[] Opening hours for Friday, leave an empty array for non-working days |
|
mon* |
Type: Interval[] Opening hours for Monday, leave an empty array for non-working days |
|
sat* |
Type: Interval[] Opening hours for Saturday, leave an empty array for non-working days |
|
sun* |
Type: Interval[] Opening hours for Sunday, leave an empty array for non-working days |
|
thu* |
Type: Interval[] Opening hours for Thursday, leave an empty array for non-working days |
|
tue* |
Type: Interval[] Opening hours for Tuesday, leave an empty array for non-working days |
|
wed* |
Type: Interval[] Opening hours for Wednesday, leave an empty array for non-working days |
Threshold
Terms of delivery
|
Name |
Description |
|
deliveryCost* |
Type: Money The cost of delivery. Specify 0 for free shipping |
|
orderCost* |
Type: Money Minimum order amount for delivery |
Interval
The interval of working hours. Specify 00:00-24:00 for round-the-clock zones. Opening hours are indicated according to the local timezone of the restaurant.
|
Name |
Description |
|
end* |
Type: string Period end time in HH:MM format Example: Min length: Max length: |
|
start* |
Type: string The start time of the period in the HH:MM format Example: Min length: Max length: |
Money
Presentation of the amount of money
|
Name |
Description |
|
currency* |
Type: string Three-letter currency designation ISO 4217 Example: Min length: Max length: |
|
value* |
Type: number The value in the specified currency Example: Min value: |
400 Bad Request
Error in the parameters, the response contains a list of validation errors
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: |
500 Internal Server Error
Internal server errors
No longer supported, please use an alternative and newer version.