Adds a depot
Adds information about the depot to the database.
Request
POST
https://courier.yandex.ru/api/v1/companies/{company_id}/depots
Path parameters
Name |
Description |
company_id* |
Type: integer<int64> Company 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. |
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. |
number* |
Type: string Depot number. Used for syncing with the delivery company's system. |
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: |
id |
Type: integer Depot ID used in requests to the Track & Trace API. |
mark_delivered_radius |
Type: number<float> Radius in meters. If Default: Min value: Max value: |
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: |
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 |
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 |
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
Information about the depot is registered in the database.
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: |
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 Default: Min value: Max value: |
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: |
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 |
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 |
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
Authorization error. Make sure that the request header contains the correct OAuth token.
422 Unprocessable Entity
Incorrect input. The operation can't be performed.
504 Gateway Timeout
Error working with the API. Repeat the request.
No longer supported, please use an alternative and newer version.