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: 1

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..
Zone coordinate point.

Min items: 1

ZoneMetaV1

Additional delivery zone data.

Name

Description

average_delivery_time*

Type: integer

Average expected delivery time.

Example: 20

Min value: 0

Max value: 1440

intervals*

Type: IntervalV1[]

is_active*

Type: boolean

Delivery zone activity flag. If the response contains false, the zone becomes inactive.

zone_id*

Type: string

Delivery zone ID in the Partner’s system.

Example: 123

Min length: 1

Max length: 255

thresholds

Type: ThresholdV1[]

Delivery conditions.

A complex example of delivery conditions with multiple thresholds, where delivery cost depends on basket size.
Order from RUB 1000; basket RUB 1000–1999, delivery RUB 350; basket RUB 2000–2999, delivery RUB 250; basket from RUB 3000, delivery is free.

"thresholds": [
{
"order_cost": { "currency": "RUB","value": "1000" },
"delivery_cost": { "currency": "RUB","value": "350" }
},
{ "order_cost": { "currency": "RUB","value": "2000" },
"delivery_cost": { "currency": "RUB","value": "250" }
},
{ "order_cost": { "currency": "RUB","value": "3000" },
"delivery_cost": { "currency": "RUB","value": "0" }
}
]


Delivery conditions

Min items: 1

Max items: 10

PointV1

Zone coordinate point.

Name

Description

lg*

Type: number

Example: 35.918658

lt*

Type: number

Example: 56.473673

IntervalV1

Name

Description

from*

Type: string

Beginning of interval (H:i format)

Example: 08:00

to*

Type: string

End of interval (H:i format)

Example: 20:00

weekday*

Type: string

Day of week

Example: tuesday

Enum: monday, tuesday, wednesday, thursday, friday, saturday, sunday

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: RUB

Min length: 3

Max length: 3

value*

Type: string

Value in the specified currency (no cents/decimal/comma).

Example: 350

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: validation_general, validation_name, validation_delivery_conditions, validation_geo_zone, validation_schedule, validation_times, validation_types

status

Type: string

Enum: updated, error

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.