Gets route info

  1. HTTP Request
  2. Path Parameters
  3. Query Parameters
  4. Responses
    1. Code 200
      1. Representation
      2. Fields
    2. Code 401
    3. Code 403
    4. Code 404
    5. Code 422

Gets a list of route info and its orders.

HTTP Request

GET https://courier.yandex.ru/api/v1/companies/{company_id}/route-info\
?date={string}\
&depot_id={integer}\
&route_id={integer}\
&with_prolongation={boolean}\
&page={integer}\
&per_page={integer}

Path Parameters

company_id *

integer

The ID of the company that is used in requests to the Track & Trace API.

company_id *

integer

The ID of the company that is used in requests to the Track & Trace API.

Query Parameters

date

string

Date when route is active (started and not finished) in YYYY-MM-DD format.

depot_id

integer

The ID of the depot that is used in requests to the Track & Trace API.

Minimum value: 1.

route_id

integer

The ID of the route that is used in requests to the Track & Trace API.

Minimum value: 1.

with_prolongation

boolean

false - use route_finish_s or last order time-window for filtering by date, true - use prolonged route finish time.

page

integer

Page number where the entity is stored in the database. Each page contains per_page entities arranged in ascending route.

Minimum value: 1.
Default value: 1.

per_page

integer

Number of routes per page.

Minimum value: 1.
Maximum value: 2000.
Default value: 100.

date

string

Date when route is active (started and not finished) in YYYY-MM-DD format.

depot_id

integer

The ID of the depot that is used in requests to the Track & Trace API.

Minimum value: 1.

route_id

integer

The ID of the route that is used in requests to the Track & Trace API.

Minimum value: 1.

with_prolongation

boolean

false - use route_finish_s or last order time-window for filtering by date, true - use prolonged route finish time.

page

integer

Page number where the entity is stored in the database. Each page contains per_page entities arranged in ascending route.

Minimum value: 1.
Default value: 1.

per_page

integer

Number of routes per page.

Minimum value: 1.
Maximum value: 2000.
Default value: 100.

Responses

Code 200

Returns a list of route info and its orders.

[
  {
    "meta": {
      "company_id": string,
      "courier": {
        "deleted": boolean,
        "id": string,
        "name": string,
        "number": string
      },
      "courier_position": {
        "node": {
          "next": integer,
          "prev": integer
        }
      },
      "date": string,
      "id": string,
      "last_update_info": {
        "courier_position": {
          "lat": number,
          "lon": number
        },
        "update_time": {
          "text": string,
          "value": number
        }
      },
      "number": string,
      "planning_area": {
        "id": string,
        "time_zone": string,
        "type": string
      },
      "routing_mode": string,
      "total_transit_distance_m": number
    },
    "nodes": [
      {
        "type": string,
        "types": [
          string
        ]
      }
    ]
  }
]
Copied to clipboard

Representation

Collapse all
Expand all

Fields

meta

object

meta.company_id

string

The ID of the company that is used in requests to the Track & Trace API.

meta.courier

object

meta.courier.deleted

boolean

Flag shows that courier is deleted.

meta.courier.id

string

Courier identifier.

meta.courier.name

string

Courier name.

meta.courier.number

string

Courier number.

meta.courier_position

object

meta.courier_position.node

object

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.

meta.courier_position.node.next

integer

Index of route node courier must visit next.

meta.courier_position.node.prev

integer

Index of route node last visited by courier.

meta.date

string

The route's date in YYYY-MM-DD format.

meta.id

string

Route identifier.

meta.last_update_info

object

meta.last_update_info.courier_position

object

meta.last_update_info.courier_position.lat *

number

Location latitude.

meta.last_update_info.courier_position.lon *

number

Location longitude.

meta.last_update_info.update_time

object

meta.last_update_info.update_time.text

string

Localized text.

meta.last_update_info.update_time.value

number

Numeric representation of a value.

meta.number

string

Route number.

meta.planning_area

object

meta.planning_area.id

string

Planning area identifier.

meta.planning_area.time_zone

string

Time zone of planning area.

meta.planning_area.type

string

Planning area type.

meta.routing_mode

string

Transportation method. Possible values:

  • driving - courier drives a car.
  • truck - courier drives a truck.
  • transit - courier uses public transport and walks.
  • walking - courier walks.

meta.total_transit_distance_m

number

Total transit distance, meters.

nodes[]

array

nodes[].type

string

Node type. Possible values:

  • depot.
  • garage.
  • order.

nodes[].types[]

array

Node type and subtypes in a list of strings. Most accurate last. Possible types:

  • depot.
  • garage.
  • order.
    Possible order subtypes:
  • delivery.
  • pickup.
  • drop_off.
    Example: ["order", "pickup"]

nodes[].value

object

Description of the route node. Content depends on a node type.

nodes[].value.estimated_distance_left_m

number

The distance in meters that the courier has to travel to the point of order.

Minimum value: 0.

nodes[].value.estimated_service_time

object

nodes[].value.estimated_service_time.end

object

nodes[].value.estimated_service_time.end.text

string

Localized text.

nodes[].value.estimated_service_time.end.value

number

Numeric representation of a value.

nodes[].value.estimated_service_time.start

object

nodes[].value.estimated_service_time.start.text

string

Localized text.

nodes[].value.estimated_service_time.start.value

number

Numeric representation of a value.

nodes[].value.id

string

Depot identifier.

nodes[].value.number

string

Depot number.

nodes[].value.point

object

nodes[].value.point.lat *

number

Location latitude.

nodes[].value.point.lon *

number

Location longitude.

nodes[].value.related_orders[]

array

nodes[].value.related_orders[].action

string

The action performed on the order:

  • delivery — deliver to this destination (can be a depot and drop-off order).
  • pickup — load for delivery to another destination (it can be loaded from the depot and pickup order).
Allowed values
  1. delivery
  2. pickup

nodes[].value.related_orders[].id

string

Order ID.

nodes[].value.visit_time

object

nodes[].value.visit_time.text

string

Localized text.

nodes[].value.visit_time.value

number

Numeric representation of a value.

nodes[].value.estimated_distance_left_m

number

The distance in meters that the courier has to travel to the point of order.

Minimum value: 0.

nodes[].value.estimated_visit_time

object

nodes[].value.estimated_visit_time.end

object

nodes[].value.estimated_visit_time.end.text

string

Localized text.

nodes[].value.estimated_visit_time.end.value

number

Numeric representation of a value.

nodes[].value.estimated_visit_time.start

object

nodes[].value.estimated_visit_time.start.text

string

Localized text.

nodes[].value.estimated_visit_time.start.value

number

Numeric representation of a value.

nodes[].value.id

string

Garage identifier.

nodes[].value.number

string

Garage number.

nodes[].value.point

object

nodes[].value.point.lat *

number

Location latitude.

nodes[].value.point.lon *

number

Location longitude.

nodes[].value.visit_time

object

nodes[].value.visit_time.text

string

Localized text.

nodes[].value.visit_time.value

number

Numeric representation of a value.

nodes[].value.delivery_time

object

nodes[].value.delivery_time.text

string

Localized text.

nodes[].value.delivery_time.value

number

Numeric representation of a value.

nodes[].value.estimated_distance_left_m

number

The distance in meters that the courier has to travel to the point of order.

Minimum value: 0.

nodes[].value.estimated_service_time

object

nodes[].value.estimated_service_time.end

object

nodes[].value.estimated_service_time.end.text

string

Localized text.

nodes[].value.estimated_service_time.end.value

number

Numeric representation of a value.

nodes[].value.estimated_service_time.start

object

nodes[].value.estimated_service_time.start.text

string

Localized text.

nodes[].value.estimated_service_time.start.value

number

Numeric representation of a value.

nodes[].value.id

string

Order identifier.

nodes[].value.number

string

Order number.

nodes[].value.point

object

nodes[].value.point.lat *

number

Location latitude.

nodes[].value.point.lon *

number

Location longitude.

nodes[].value.related_orders[]

array

nodes[].value.related_orders[].action

string

The action performed on the order:

  • delivery — deliver to this destination (can be a depot and drop-off order).
  • pickup — load for delivery to another destination (it can be loaded from the depot and pickup order).
Allowed values
  1. delivery
  2. pickup

nodes[].value.related_orders[].id

string

Order ID.

nodes[].value.status

string

Order status.

nodes[].value.time_windows[]

array

Array of order's time windows.

nodes[].value.time_windows[].end

object

nodes[].value.time_windows[].end.text

string

Localized text.

nodes[].value.time_windows[].end.value

number

Numeric representation of a value.

nodes[].value.time_windows[].start

object

nodes[].value.time_windows[].start.text

string

Localized text.

nodes[].value.time_windows[].start.value

number

Numeric representation of a value.

nodes[].value.time_zone

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.

meta

object

meta.company_id

string

The ID of the company that is used in requests to the Track & Trace API.

meta.courier

object

meta.courier.deleted

boolean

Flag shows that courier is deleted.

meta.courier.id

string

Courier identifier.

meta.courier.name

string

Courier name.

meta.courier.number

string

Courier number.

meta.courier_position

object

meta.courier_position.node

object

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.

meta.courier_position.node.next

integer

Index of route node courier must visit next.

meta.courier_position.node.prev

integer

Index of route node last visited by courier.

meta.date

string

The route's date in YYYY-MM-DD format.

meta.id

string

Route identifier.

meta.last_update_info

object

meta.last_update_info.courier_position

object

meta.last_update_info.courier_position.lat *

number

Location latitude.

meta.last_update_info.courier_position.lon *

number

Location longitude.

meta.last_update_info.update_time

object

meta.last_update_info.update_time.text

string

Localized text.

meta.last_update_info.update_time.value

number

Numeric representation of a value.

meta.number

string

Route number.

meta.planning_area

object

meta.planning_area.id

string

Planning area identifier.

meta.planning_area.time_zone

string

Time zone of planning area.

meta.planning_area.type

string

Planning area type.

meta.routing_mode

string

Transportation method. Possible values:

  • driving - courier drives a car.
  • truck - courier drives a truck.
  • transit - courier uses public transport and walks.
  • walking - courier walks.

meta.total_transit_distance_m

number

Total transit distance, meters.

nodes[]

array

nodes[].type

string

Node type. Possible values:

  • depot.
  • garage.
  • order.

nodes[].types[]

array

Node type and subtypes in a list of strings. Most accurate last. Possible types:

  • depot.
  • garage.
  • order.
    Possible order subtypes:
  • delivery.
  • pickup.
  • drop_off.
    Example: ["order", "pickup"]

nodes[].value

object

Description of the route node. Content depends on a node type.

nodes[].value.estimated_distance_left_m

number

The distance in meters that the courier has to travel to the point of order.

Minimum value: 0.

nodes[].value.estimated_service_time

object

nodes[].value.estimated_service_time.end

object

nodes[].value.estimated_service_time.end.text

string

Localized text.

nodes[].value.estimated_service_time.end.value

number

Numeric representation of a value.

nodes[].value.estimated_service_time.start

object

nodes[].value.estimated_service_time.start.text

string

Localized text.

nodes[].value.estimated_service_time.start.value

number

Numeric representation of a value.

nodes[].value.id

string

Depot identifier.

nodes[].value.number

string

Depot number.

nodes[].value.point

object

nodes[].value.point.lat *

number

Location latitude.

nodes[].value.point.lon *

number

Location longitude.

nodes[].value.related_orders[]

array

nodes[].value.related_orders[].action

string

The action performed on the order:

  • delivery — deliver to this destination (can be a depot and drop-off order).
  • pickup — load for delivery to another destination (it can be loaded from the depot and pickup order).
Allowed values
  1. delivery
  2. pickup

nodes[].value.related_orders[].id

string

Order ID.

nodes[].value.visit_time

object

nodes[].value.visit_time.text

string

Localized text.

nodes[].value.visit_time.value

number

Numeric representation of a value.

nodes[].value.estimated_distance_left_m

number

The distance in meters that the courier has to travel to the point of order.

Minimum value: 0.

nodes[].value.estimated_visit_time

object

nodes[].value.estimated_visit_time.end

object

nodes[].value.estimated_visit_time.end.text

string

Localized text.

nodes[].value.estimated_visit_time.end.value

number

Numeric representation of a value.

nodes[].value.estimated_visit_time.start

object

nodes[].value.estimated_visit_time.start.text

string

Localized text.

nodes[].value.estimated_visit_time.start.value

number

Numeric representation of a value.

nodes[].value.id

string

Garage identifier.

nodes[].value.number

string

Garage number.

nodes[].value.point

object

nodes[].value.point.lat *

number

Location latitude.

nodes[].value.point.lon *

number

Location longitude.

nodes[].value.visit_time

object

nodes[].value.visit_time.text

string

Localized text.

nodes[].value.visit_time.value

number

Numeric representation of a value.

nodes[].value.delivery_time

object

nodes[].value.delivery_time.text

string

Localized text.

nodes[].value.delivery_time.value

number

Numeric representation of a value.

nodes[].value.estimated_distance_left_m

number

The distance in meters that the courier has to travel to the point of order.

Minimum value: 0.

nodes[].value.estimated_service_time

object

nodes[].value.estimated_service_time.end

object

nodes[].value.estimated_service_time.end.text

string

Localized text.

nodes[].value.estimated_service_time.end.value

number

Numeric representation of a value.

nodes[].value.estimated_service_time.start

object

nodes[].value.estimated_service_time.start.text

string

Localized text.

nodes[].value.estimated_service_time.start.value

number

Numeric representation of a value.

nodes[].value.id

string

Order identifier.

nodes[].value.number

string

Order number.

nodes[].value.point

object

nodes[].value.point.lat *

number

Location latitude.

nodes[].value.point.lon *

number

Location longitude.

nodes[].value.related_orders[]

array

nodes[].value.related_orders[].action

string

The action performed on the order:

  • delivery — deliver to this destination (can be a depot and drop-off order).
  • pickup — load for delivery to another destination (it can be loaded from the depot and pickup order).
Allowed values
  1. delivery
  2. pickup

nodes[].value.related_orders[].id

string

Order ID.

nodes[].value.status

string

Order status.

nodes[].value.time_windows[]

array

Array of order's time windows.

nodes[].value.time_windows[].end

object

nodes[].value.time_windows[].end.text

string

Localized text.

nodes[].value.time_windows[].end.value

number

Numeric representation of a value.

nodes[].value.time_windows[].start

object

nodes[].value.time_windows[].start.text

string

Localized text.

nodes[].value.time_windows[].start.value

number

Numeric representation of a value.

nodes[].value.time_zone

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.

Code 401

Authorization failed. Send the correct OAuth token in the authorization header.

Code 403

You do not have access to this object.

Code 404

Provided route_id does not exist.

Code 422

Incorrect input.