Edits depot

Updates the information about a depot by its ID.

Request

PATCH

https://courier.yandex.ru/api/v1/companies/{company_id}/depots/{depot_id}

Path parameters

Name

Description

company_id*

Type: integer

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

depot_id*

Type: integer

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

Body

application/json
{
    "address": "string",
    "allow_route_editing": false,
    "description": "string",
    "id": 0,
    "lat": 0,
    "lon": 0,
    "name": "string",
    "number": "string",
    "order_service_duration_s": 0,
    "service_duration_s": 0,
    "time_interval": "string",
    "time_zone": "string",
    "mark_route_started_radius": 0,
    "mark_delivered_radius": null,
    "allow_manual_order_detection": false,
    "allow_manual_depot_detection": false
}

Name

Description

address

Type: string

Depot address in text format.

allow_manual_depot_detection

Type: boolean

Indicates whether manual depot visit detection allowed for depot.

allow_manual_order_detection

Type: boolean

Indicates whether manual depot visit detection allowed for depot.

allow_route_editing

Type: boolean

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

Default:

description

Type: string

Depot description.

Max length: 1023

id

Type: integer

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

lat

Type: number<float>

Latitude of depot location.

lon

Type: number<float>

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_delivered_radius

Type: number<float>

Radius in meters. If null, company.mark_delivered_radius is used instead. Order is marked as delivered automatically if mark_delivered_enabled is true and vehicle spent at least mark_delivered_service_time_coefficient * (order.service_duration_s + order.shared_service_duration_s) seconds within mark_delivered_radius meters from the order's location.

Default: null

Min value: 0

Max value: 10000

mark_route_started_radius

Type: integer

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

name

Type: string

Depot name.

Max length: 80

number

Type: string

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

order_service_duration_s

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

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

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

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

200 OK

The depot information was updated.

Body

application/json
{
    "address": "string",
    "allow_route_editing": false,
    "description": "string",
    "id": 0,
    "lat": 0,
    "lon": 0,
    "name": "string",
    "number": "string",
    "order_service_duration_s": 0,
    "service_duration_s": 0,
    "time_interval": "string",
    "time_zone": "string",
    "mark_route_started_radius": 0,
    "mark_delivered_radius": null,
    "allow_manual_order_detection": false,
    "allow_manual_depot_detection": false
}

Name

Description

address

Type: string

Depot address in text format.

allow_manual_depot_detection

Type: boolean

Indicates whether manual depot visit detection allowed for depot.

allow_manual_order_detection

Type: boolean

Indicates whether manual depot visit detection allowed for depot.

allow_route_editing

Type: boolean

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

Default:

description

Type: string

Depot description.

Max length: 1023

id

Type: integer

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

lat

Type: number<float>

Latitude of depot location.

lon

Type: number<float>

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_delivered_radius

Type: number<float>

Radius in meters. If null, company.mark_delivered_radius is used instead. Order is marked as delivered automatically if mark_delivered_enabled is true and vehicle spent at least mark_delivered_service_time_coefficient * (order.service_duration_s + order.shared_service_duration_s) seconds within mark_delivered_radius meters from the order's location.

Default: null

Min value: 0

Max value: 10000

mark_route_started_radius

Type: integer

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

name

Type: string

Depot name.

Max length: 80

number

Type: string

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

order_service_duration_s

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

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

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

Type: 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.

401 Unauthorized

Deprecated

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

403 Forbidden

Deprecated

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

404 Not Found

Deprecated

Object search error. Object not found.

410 Gone

Deprecated

Object was deleted.

422 Unprocessable Entity

Deprecated

Incorrect input. The operation can't be performed.

504 Gateway Timeout

Deprecated

Error working with the API. Repeat the request.

Previous