Edits multiple depots

  1. HTTP Request
  2. Path Parameters
  3. Request Body
    1. Representation
    2. Fields
  4. Responses
    1. Code 200
    2. Code 401
    3. Code 403
    4. Code 404
    5. Code 422
    6. Code 504

Adds information about new depots to the database or updates information about existing ones if their numbers match.

HTTP Request

POST https://courier.yandex.ru/api/v1/companies/{company_id}/depots-batch

Path Parameters

company_id *

integer

Company ID used in requests to the Track & Trace API.

company_id *

integer

Company ID used in requests to the Track & Trace API.

Request Body

[
  {
    "address": string,
    "allow_route_editing": boolean,
    "description": string,
    "id": integer,
    "lat": number,
    "lon": number,
    "mark_route_started_radius": integer,
    "name": string,
    "number": string,
    "order_service_duration_s": integer,
    "service_duration_s": integer,
    "time_interval": string,
    "time_zone": string
  }
]
Copied to clipboard

Representation

Collapse all
Expand all

Fields

address

string

Depot address in text format.

allow_route_editing

boolean

A flag that indicates that couriers are able to edit their routes.

description

string

Depot description.

id

integer

Depot ID used in requests to the Track & Trace API.

lat

number

Latitude of depot location.

lon

number

Longitude of depot location. The request for new depot must contain both lat and lon parameters. The requests to update the depot can omit both lat and lon parameters, but not one of them.

mark_route_started_radius

integer

The minimal distance between a courier and the depot at which a shift start sms is sent.

name

string

Depot name.

number

string

Depot number. Used for syncing with the delivery company's system.

order_service_duration_s

integer

Additional time spent to dispatch a particular order in the depot, in seconds. Total service duration is calculated by adding service_duration_s with order_service_duration_s that is multiplied by the number of orders.

service_duration_s

integer

Time spent dispatching goods in the depot, in seconds. This time is independent from the time required to load orders. Total service duration is calculated by adding service_duration_s with order_service_duration_s that is multiplied by the number of orders.

time_interval

string

Depot opening hours, in "T - T" or "T-T" time format, where T represents time in HH, HH:MM, HH:MM:SS or [d.]HH:MM:SS format.

time_zone

string

Time zone of depot in tz database format, for example Europe/Moscow, Europe/Berlin, Asia/Irkutsk, Asia/Istanbul. Visit https://en.wikipedia.org/wiki/List_of_tz_database_time_zones for more examples. By default, the depot time zone is calculated based on its coordinates.

address

string

Depot address in text format.

allow_route_editing

boolean

A flag that indicates that couriers are able to edit their routes.

description

string

Depot description.

id

integer

Depot ID used in requests to the Track & Trace API.

lat

number

Latitude of depot location.

lon

number

Longitude of depot location. The request for new depot must contain both lat and lon parameters. The requests to update the depot can omit both lat and lon parameters, but not one of them.

mark_route_started_radius

integer

The minimal distance between a courier and the depot at which a shift start sms is sent.

name

string

Depot name.

number

string

Depot number. Used for syncing with the delivery company's system.

order_service_duration_s

integer

Additional time spent to dispatch a particular order in the depot, in seconds. Total service duration is calculated by adding service_duration_s with order_service_duration_s that is multiplied by the number of orders.

service_duration_s

integer

Time spent dispatching goods in the depot, in seconds. This time is independent from the time required to load orders. Total service duration is calculated by adding service_duration_s with order_service_duration_s that is multiplied by the number of orders.

time_interval

string

Depot opening hours, in "T - T" or "T-T" time format, where T represents time in HH, HH:MM, HH:MM:SS or [d.]HH:MM:SS format.

time_zone

string

Time zone of depot in tz database format, for example Europe/Moscow, Europe/Berlin, Asia/Irkutsk, Asia/Istanbul. Visit https://en.wikipedia.org/wiki/List_of_tz_database_time_zones for more examples. By default, the depot time zone is calculated based on its coordinates.

Responses

Code 200

Information about depots was registered or updated in the database.

Code 401

Authorization error. Make sure that the request header contains the correct OAuth token.

Code 403

Error accessing the object. The user doesn't have the rights to access the object.

Code 404

Object search error. Object not found.

Code 422

Incorrect input. The operation can't be performed.

Code 504

Error working with the API. Repeat the request.