Gets route info
Gets a list of route info and its orders.
Request
GET
https://courier.yandex.ru/api/v1/companies/{company_id}/route-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 |
date |
Type: string<date> Date when route is active (started and not finished) in YYYY-MM-DD format. |
depot_id |
Type: integer The ID of the depot that is used in requests to the Track & Trace API. Min value: |
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: |
route_id |
Type: integer The ID of the route that is used in requests to the Track & Trace API. Min value: |
with_prolongation |
Type: boolean
Default: |
Responses
200 OK
Returns a list of route info and its orders.
Body
application/json
[
{
"meta": {
"id": "string",
"number": "string",
"company_id": "string",
"date": "string",
"routing_mode": "string",
"courier": {
"id": "string",
"number": "string",
"name": "string",
"deleted": false
},
"planning_area": {
"type": "string",
"id": "string",
"time_zone": "string"
},
"courier_position": {
"node": {
"prev": 0,
"next": 0
}
},
"total_transit_distance_m": 0,
"last_update_info": {
"courier_position": {
"lat": 0,
"lon": 0
},
"update_time": {
"value": 0,
"text": "string"
}
}
},
"nodes": [
{
"type": "string",
"types": [
"string"
],
"value": {
"id": "string",
"number": "string",
"estimated_service_time": {
"start": {
"value": 0,
"text": "string"
},
"end": {
"value": 0,
"text": "string"
}
},
"estimated_distance_left_m": 0,
"visit_time": {
"value": 0,
"text": "string"
},
"point": {
"lat": 0,
"lon": 0
},
"related_orders": [
{
"id": "string",
"action": "delivery"
}
]
}
}
]
}
]
RouteInfoItem
Name |
Description |
meta |
Type: RouteInfoMeta |
nodes |
Type: RouteInfoNode[] Element of a route. |
RouteInfoMeta
Name |
Description |
company_id |
Type: string The ID of the company that is used in requests to the Track & Trace API. |
courier |
Type: RouteInfoMetaCourier |
courier_position |
|
date |
Type: string<date> The route's date in YYYY-MM-DD format. |
id |
Type: string Route identifier. |
last_update_info |
|
number |
Type: string Route number. |
planning_area |
|
routing_mode |
Type: string Transportation method. Possible values:
|
total_transit_distance_m |
Type: number Total transit distance, meters. |
RouteInfoNode
Element of a route.
Name |
Description |
type |
Type: string Node type. Possible values:
|
types |
Type: string[] Node type and subtypes in a list of strings. Most accurate last. Possible types:
|
value |
Type: RouteInfoNodeDepot or RouteInfoNodeGarage or RouteInfoNodeOrder Description of the route node. Content depends on a node type. |
RouteInfoMetaCourier
Name |
Description |
deleted |
Type: boolean Flag shows that courier is deleted. |
id |
Type: string Courier identifier. |
name |
Type: string Courier name. |
number |
Type: string Courier number. |
RouteInfoMetaCourierPosition
Name |
Description |
node |
Type: RouteInfoMetaCourierPosition_node Courier position in prev and next node index. |
RouteInfoMetaLastUpdateInfo
Name |
Description |
courier_position |
Type: Point Courier position used for last route update. |
update_time |
Type: LocalizedValue Update time. |
RouteInfoMetaPlanningArea
Name |
Description |
id |
Type: string Planning area identifier. |
time_zone |
Type: string Time zone of planning area. |
type |
Type: string Planning area type. |
RouteInfoNodeDepot
Name |
Description |
estimated_distance_left_m |
Type: number The distance in meters that the courier has to travel to the point of order. Min value: |
estimated_service_time |
Type: RouteInfoWindow Estimated service time. |
id |
Type: string Depot identifier. |
number |
Type: string Depot number. |
point |
Type: Point |
related_orders |
Type: RelatedOrdersById[] |
visit_time |
Type: LocalizedValue Visit time. |
RouteInfoNodeGarage
Name |
Description |
estimated_distance_left_m |
Type: number The distance in meters that the courier has to travel to the point of order. Min value: |
estimated_visit_time |
Type: RouteInfoWindow Estimated visit time. |
id |
Type: string Garage identifier. |
number |
Type: string Garage number. |
point |
Type: Point |
visit_time |
Type: LocalizedValue Visit time. |
RouteInfoNodeOrder
Name |
Description |
delivery_time |
Type: LocalizedValue Actual delivery time. |
estimated_distance_left_m |
Type: number The distance in meters that the courier has to travel to the point of order. Min value: |
estimated_service_time |
Type: RouteInfoWindow Estimated service time. |
id |
Type: string Order identifier. |
number |
Type: string Order number. |
point |
Type: Point |
related_orders |
Type: RelatedOrdersById[] |
status |
Type: string Order status. |
time_windows |
Type: RouteInfoWindow[] Array of order's time windows. |
time_zone |
Type: string Time zone of order 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. It's calculated based on orders coordinates. |
RouteInfoMetaCourierPosition_node
Courier position in prev and next node index. {"prev": null, "next": null}
for courier violated the route or empty route, {"prev": null, "next": i}
for the start of the route, {"prev": i, "next": null}
for the end of the route, {"prev": i, "next": i+1}
when courier goes from i node to i+1.
Name |
Description |
next |
Type: integer Index of route node courier must visit next. |
prev |
Type: integer Index of route node last visited by courier. |
Point
Name |
Description |
lat* |
Type: number<float> Location latitude. |
lon* |
Type: number<float> Location longitude. |
LocalizedValue
Name |
Description |
text |
Type: string Localized text. |
value |
Type: number Numeric representation of a value. |
RouteInfoWindow
Name |
Description |
end |
Type: LocalizedValue End value of a window. |
start |
Type: LocalizedValue Starting value of a window. |
RelatedOrdersById
Name |
Description |
action |
Type: string The action performed on the order:
Enum: |
id |
Type: string Order ID. |
401 Unauthorized
Authorization failed. Send the correct OAuth token in the authorization header.
403 Forbidden
You do not have access to this object.
404 Not Found
Provided route_id does not exist.
422 Unprocessable Entity
Incorrect input.
No longer supported, please use an alternative and newer version.