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

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": {},
          "delivery_cost": null
        }
      ]
    }
  }
]

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: 08:00

to

Type: To

End of interval (H:i format)

Example: 20:00

weekday

Type: string

Day of week

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

Example
{
  "weekday": "tuesday",
  "from": "08:00",
  "to": "20:00"
}

IntervalsV1

Type: IntervalV1[]

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

Max length: 3

Example: RUB

value

Type: string

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

Example: 350

Example
{
  "currency": "RUB",
  "value": "350"
}

ThresholdV1

Delivery conditions

Name

Description

delivery_cost

Type: MoneyV1

Monetary value representation.

Example
{
  "currency": "RUB",
  "value": "350"
}

order_cost

Type: MoneyV1

Monetary value representation.

Example
{
  "currency": "RUB",
  "value": "350"
}
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: 0

Max value: 1440

intervals

Type: IntervalsV1

Example
[
  {
    "weekday": "tuesday",
    "from": "08:00",
    "to": "20:00"
  }
]

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.

Min length: 1

Max length: 255

Example: 123

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

Min items: 1

Max items: 10

Example
[
  {
    "order_cost": {
      "currency": "RUB",
      "value": "350"
    },
    "delivery_cost": null
  }
]
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
{
  "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
    }
  ]
}

coordinates

Type: PointV1[][]

Example
[
  [
    {
      "lt": 56.473673,
      "lg": 35.918658
    }
  ]
]
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
[
  {
    "zone_id": "example",
    "is_success": true,
    "status": "updated",
    "error_code": "validation_general"
  }
]

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

Example: 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: example

details

Type: object
Example
{}

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

details

Type: object
Example
{}

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