Gets route plan 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 routes with plan metrics.

HTTP Request

GET https://courier.yandex.ru/api/v1/companies/{company_id}/route-plan-info\
?start_date={string}\
&end_date={string}\
&depot_id={integer}\
&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

start_date

string

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.

end_date

string

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.

depot_id

integer

Filter routes by depot ID.

Minimum value: 1.

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.

start_date

string

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.

end_date

string

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.

depot_id

integer

Filter routes by depot ID.

Minimum value: 1.

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 routes with plan metrics.

[
  {
    "date": string,
    "id": integer,
    "number": string,
    "plan_metrics": {
      "orders_count": number,
      "total_duration": {
        "text": string,
        "value": number
      },
      "total_transit_distance_m": number
    }
  }
]
Copied to clipboard

Representation

Collapse all
Expand all

Fields

date

string

The date of the route in YYYY-MM-DD format.

id

integer

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

number

string

Route number.

plan_metrics

object

plan_metrics.orders_count

number

Number of orders in the route.

plan_metrics.total_duration

object

plan_metrics.total_duration.text

string

Localized text.

plan_metrics.total_duration.value

number

Numeric representation of a value.

plan_metrics.total_transit_distance_m

number

Total transit distance, meters.

date

string

The date of the route in YYYY-MM-DD format.

id

integer

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

number

string

Route number.

plan_metrics

object

plan_metrics.orders_count

number

Number of orders in the route.

plan_metrics.total_duration

object

plan_metrics.total_duration.text

string

Localized text.

plan_metrics.total_duration.value

number

Numeric representation of a value.

plan_metrics.total_transit_distance_m

number

Total transit distance, meters.

Code 401

Authorization error. Make sure that the request header contains the correct OAuth token.

Code 403

You do not have access to this object.

Code 404

Provided depot_id does not exist.

Code 422

Incorrect input. The operation can't be performed.