Delivery zones
Method for updating delivery zones at the Partner’s initiative.
Sending is allowed only for zones where availability or other attributes have changed.
Request
PATCH
/partner-integration/v1/place-info/v1/zones
Query parameters
|
Name |
Description |
|
origin_id* |
Type: string Identifier of the store in the Partner’s system |
Headers
|
Name |
Description |
|
Partner-Name* |
Type: string Partner’s name. |
Body
application/json
{
"zones": [
{
"coordinates": [
[
{
"lt": 56.473673,
"lg": 35.918658
}
]
],
"meta": {
"zone_id": "123",
"is_active": false,
"intervals": [
{
"weekday": "tuesday",
"from": "08:00",
"to": "20:00"
}
],
"average_delivery_time": 20,
"thresholds": [
{
"order_cost": {
"currency": "RUB",
"value": "350"
},
"delivery_cost": {
"currency": "RUB",
"value": "350"
}
}
]
}
}
]
}
|
Name |
Description |
|
zones* |
Type: ZoneChangedPartV1[] Diff of delivery zones, coordinates are not a required field. Min items: |
ZoneChangedPartV1
Diff of delivery zones, coordinates are not a required field.
|
Name |
Description |
|
meta* |
Type: ZoneMetaV1 Additional delivery zone data. |
|
coordinates |
Type: PointV1[][] Set of polygon coordinates, must contain an ordered set of coordinate points.. Min items: |
ZoneMetaV1
Additional delivery zone data.
|
Name |
Description |
|
average_delivery_time* |
Type: integer Average expected delivery time. Example: Min value: Max value: |
|
intervals* |
Type: IntervalV1[] |
|
is_active* |
Type: boolean Delivery zone activity flag. If the response contains |
|
zone_id* |
Type: string Delivery zone ID in the Partner’s system. Example: Min length: Max length: |
|
thresholds |
Type: ThresholdV1[] Delivery conditions. A complex example of delivery conditions with multiple thresholds, where delivery cost depends on basket size.
Min items: Max items: |
PointV1
Zone coordinate point.
|
Name |
Description |
|
lg* |
Type: number Example: |
|
lt* |
Type: number Example: |
IntervalV1
|
Name |
Description |
|
from* |
Type: string Beginning of interval (H:i format) Example: |
|
to* |
Type: string End of interval (H:i format) Example: |
|
weekday* |
Type: string Day of week Example: Enum: |
ThresholdV1
Delivery conditions
|
Name |
Description |
|
delivery_cost* |
Type: MoneyV1 Monetary value representation. |
|
order_cost* |
Type: MoneyV1 Monetary value representation. |
MoneyV1
Monetary value representation.
|
Name |
Description |
|
currency* |
Type: string Three-letter ISO 4217 currency code. Example: Min length: Max length: |
|
value* |
Type: string Value in the specified currency (no cents/decimal/comma). Example: |
Responses
200 OK
Successful response.
Body
application/json
{
"zones": [
{
"zone_id": "string",
"is_success": false,
"status": "updated",
"error_code": "validation_general"
}
]
}
|
Name |
Description |
|
zones* |
Type: ZoneChangeV1[] List of zones with change statuses. |
ZoneChangeV1
|
Name |
Description |
|
is_success* |
Type: boolean |
|
error_code |
Type: string Enum: |
|
status |
Type: string Enum: |
|
zone_id |
Type: string |
400 Bad Request
Request error
Body
application/json
{
"message": "string",
"code": 0,
"details": {}
}
|
Name |
Description |
|
code* |
Type: integer Error code. |
|
message* |
Type: string Error message. |
|
details |
Type: object |
500 Internal Server Error
Service error
Body
application/json
{
"message": "string",
"code": 0,
"details": {}
}
|
Name |
Description |
|
code* |
Type: integer Error code. |
|
message* |
Type: string Error message. |
|
details |
Type: object |
No longer supported, please use an alternative and newer version.