Gets route plan info
Gets a list of routes with plan metrics.
Request
GET
https://courier.yandex.ru/api/v1/companies/{company_id}/route-plan-info
Path parameters
Name |
Description |
company_id* |
Type: integer The ID of the company that is used in requests to the Track & Trace API. |
Query parameters
Name |
Description |
depot_id |
Type: integer Filter routes by depot ID. Min value: |
end_date |
Type: string<date> Filter routes by date. Routes with a date less than or equal to the specified date will be included in the output. Format YYYY-MM-DD. |
page |
Type: integer Page number where the entity is stored in the database. Each page contains per_page entities arranged in ascending route. Default: Min value: |
per_page |
Type: integer Number of routes per page. Default: Min value: Max value: |
start_date |
Type: string<date> Filter routes by date. Routes with a date greater than or equal to the specified date will be included in the output. Format YYYY-MM-DD. |
Responses
200 OK
Returns a list of routes with plan metrics.
Body
application/json
[
{
"id": 0,
"number": "string",
"date": "string",
"plan_metrics": {
"orders_count": 0,
"total_duration": {
"value": 0,
"text": "string"
},
"total_transit_distance_m": 0
}
}
]
RoutePlanInfo
Route information with plan metrics.
Name |
Description |
date |
Type: string<date> The date of the route in YYYY-MM-DD format. |
id |
Type: integer Route ID used in requests to the Track & Trace API. |
number |
Type: string Route number. |
plan_metrics |
RoutePlanInfo_plan_metrics
Name |
Description |
orders_count |
Type: number Number of orders in the route. |
total_duration |
Type: LocalizedValue Total route duration. |
total_transit_distance_m |
Type: number Total transit distance, meters. |
LocalizedValue
Name |
Description |
text |
Type: string Localized text. |
value |
Type: number Numeric representation of a value. |
401 Unauthorized
Authorization error. Make sure that the request header contains the correct OAuth token.
403 Forbidden
You do not have access to this object.
404 Not Found
Provided depot_id does not exist.
422 Unprocessable Entity
Incorrect input. The operation can't be performed.
No longer supported, please use an alternative and newer version.