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 Example: `` |
Headers
|
Name |
Description |
|
Partner-Name |
Type: string Partner’s name. Example: `` |
Body
application/json
{
"zones": [
{
"coordinates": [
[
{}
]
],
"meta": {
"zone_id": "123",
"is_active": true,
"intervals": [
{}
],
"average_delivery_time": 20,
"thresholds": [
{}
]
}
}
]
}
|
Name |
Description |
|
zones |
Type: ZoneChangedPartV1[] Min items: Example
|
PointV1
Zone coordinate point.
|
Name |
Description |
|
lg |
Type: number |
|
lt |
Type: number |
Example
{
"lt": 56.473673,
"lg": 35.918658
}
From
Beginning of interval (H:i format)
Type: string
Example: 08:00
To
End of interval (H:i format)
Type: string
Example: 20:00
IntervalV1
|
Name |
Description |
|
from |
Type: From Beginning of interval (H:i format) Example: |
|
to |
Type: To End of interval (H:i format) Example: |
|
weekday |
Type: string Day of week Enum: |
Example
{
"weekday": "tuesday",
"from": "08:00",
"to": "20:00"
}
MoneyV1
Monetary value representation.
|
Name |
Description |
|
currency |
Type: string Three-letter ISO 4217 currency code. Min length: Max length: Example: |
|
value |
Type: string Value in the specified currency (no cents/decimal/comma). Example: |
Example
{
"currency": "RUB",
"value": "350"
}
ThresholdV1
Delivery conditions
|
Name |
Description |
|
delivery_cost |
Type: MoneyV1 Monetary value representation. Example
|
|
order_cost |
Type: MoneyV1 Monetary value representation. Example
|
Example
{
"order_cost": {
"currency": "RUB",
"value": "350"
},
"delivery_cost": null
}
ZoneMetaV1
Additional delivery zone data.
|
Name |
Description |
|
average_delivery_time |
Type: integer Average expected delivery time. Min value: Max value: |
|
intervals |
Type: IntervalsV1 Example
|
|
is_active |
Type: boolean Delivery zone activity flag. If the response contains |
|
zone_id |
Type: string Delivery zone ID in the Partner’s system. Min length: Max length: Example: |
|
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: Example
|
Example
{
"zone_id": "123",
"is_active": true,
"intervals": [
{
"weekday": "tuesday",
"from": "08:00",
"to": "20:00"
}
],
"average_delivery_time": 20,
"thresholds": [
{
"order_cost": {
"currency": "RUB",
"value": "350"
},
"delivery_cost": null
}
]
}
ZoneChangedPartV1
Diff of delivery zones, coordinates are not a required field.
|
Name |
Description |
|
meta |
Type: ZoneMetaV1 Additional delivery zone data. Example
|
|
coordinates |
Type: PointV1[][] Example
|
Example
{
"coordinates": [
[
{
"lt": 56.473673,
"lg": 35.918658
}
]
],
"meta": {
"zone_id": "123",
"is_active": true,
"intervals": [
{
"weekday": "tuesday",
"from": "08:00",
"to": "20:00"
}
],
"average_delivery_time": 20,
"thresholds": [
{
"order_cost": {
"currency": "RUB",
"value": "350"
},
"delivery_cost": null
}
]
}
}
Responses
200 OK
Successful response.
Body
application/json
{
"zones": [
{
"zone_id": "example",
"is_success": true,
"status": "updated",
"error_code": "validation_general"
}
]
}
|
Name |
Description |
|
zones |
Type: ZoneChangeV1[] List of zones with change statuses. Example
|
ZoneChangeV1
|
Name |
Description |
|
is_success |
Type: boolean |
|
error_code |
Type: string Enum: |
|
status |
Type: string Enum: |
|
zone_id |
Type: string Example: |
Example
{
"zone_id": "example",
"is_success": true,
"status": "updated",
"error_code": "validation_general"
}
400 Bad Request
Request error
Body
application/json
{
"message": "example",
"code": 0,
"details": {}
}
|
Name |
Description |
|
code |
Type: integer Error code. |
|
message |
Type: string Error message. Example: |
|
details |
Type: objectExample
|
500 Internal Server Error
Service error
Body
application/json
{
"message": "example",
"code": 0,
"details": {}
}
|
Name |
Description |
|
code |
Type: integer Error code. |
|
message |
Type: string Error message. Example: |
|
details |
Type: objectExample
|
No longer supported, please use an alternative and newer version.