Edits depot

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

Updates the information about a depot by its ID.

HTTP Request

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

Path Parameters

company_id *

integer

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

depot_id *

integer

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

company_id *

integer

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

depot_id *

integer

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

Request Body

{
  "address": string,
  "allow_manual_depot_detection": boolean,
  "allow_manual_order_detection": boolean,
  "allow_route_editing": boolean,
  "description": string,
  "id": integer,
  "lat": number,
  "lon": number,
  "mark_delivered_radius": 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_manual_depot_detection

boolean

Indicates whether manual depot visit detection allowed for depot.

allow_manual_order_detection

boolean

Indicates whether manual depot visit detection allowed for depot.

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_delivered_radius

number

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.

Minimum value: 0.
Maximum value: 2000.

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_manual_depot_detection

boolean

Indicates whether manual depot visit detection allowed for depot.

allow_manual_order_detection

boolean

Indicates whether manual depot visit detection allowed for depot.

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_delivered_radius

number

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.

Minimum value: 0.
Maximum value: 2000.

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

The depot information was updated.

{
  "address": string,
  "allow_manual_depot_detection": boolean,
  "allow_manual_order_detection": boolean,
  "allow_route_editing": boolean,
  "description": string,
  "id": integer,
  "lat": number,
  "lon": number,
  "mark_delivered_radius": 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_manual_depot_detection

boolean

Indicates whether manual depot visit detection allowed for depot.

allow_manual_order_detection

boolean

Indicates whether manual depot visit detection allowed for depot.

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_delivered_radius

number

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.

Minimum value: 0.
Maximum value: 2000.

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_manual_depot_detection

boolean

Indicates whether manual depot visit detection allowed for depot.

allow_manual_order_detection

boolean

Indicates whether manual depot visit detection allowed for depot.

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_delivered_radius

number

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.

Minimum value: 0.
Maximum value: 2000.

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.

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 410

Object was deleted.

Code 422

Incorrect input. The operation can't be performed.

Code 504

Error working with the API. Repeat the request.