Adds route plans.

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

Adds info about route plans.

HTTP Request

POST https://courier.yandex.ru/api/v1/companies/{company_id}/route-plans

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.

Request Body

[
  {
    "nodes": [
      {
        "arrival_time_s": number,
        "departure_time_s": number,
        "transit_distance_m": number,
        "type": string,
        "used_time_window": string,
        "value": {
          "address": string,
          "customer_name": string,
          "multi_order": boolean,
          "number": string,
          "point": {
            "lat": number,
            "lon": number
          },
          "service_duration_s": integer,
          "shared_service_duration_s": integer,
          "shipment_size": {
            "amount": number,
            "volume_cbm": number,
            "weight_kg": number
          }
        }
      }
    ],
    "number": string
  }
]
Copied to clipboard

Representation

Collapse all
Expand all

Fields

nodes[] *

array

Planned route nodes.

nodes[].arrival_time_s *

number

Arrival ETA in seconds from midnight.

Minimum value: 0.

nodes[].departure_time_s

number

Time of departure from the location.

Minimum value: 0.

nodes[].transit_distance_m *

number

Transit distance to a location, meters.

Minimum value: 0.

nodes[].type *

string

Node type. Always equals depot.

nodes[].used_time_window *

string

Planned service time interval in "T - T" or "T-T" time format, where T represents time in HH, HH:MM or HH:MM:SS format.

nodes[].value *

object

nodes[].value.address

string

Node address in text format.

nodes[].value.number *

string

Node number.

nodes[].value.point *

object

nodes[].value.point.lat *

number

Location latitude.

nodes[].value.point.lon *

number

Location longitude.

nodes[].value.service_duration_s

integer

Time spent in the node.

Minimum value: 0.

nodes[].arrival_time_s *

number

Arrival ETA in seconds from midnight.

Minimum value: 0.

nodes[].departure_time_s

number

Time of departure from the location.

Minimum value: 0.

nodes[].transit_distance_m *

number

Transit distance to a location, meters.

Minimum value: 0.

nodes[].type *

string

Node type. Always equals garage.

nodes[].used_time_window

string

Planned service time interval in "T - T" or "T-T" time format, where T represents time in HH, HH:MM or HH:MM:SS format.

nodes[].value *

object

nodes[].value.address

string

Node address in text format.

nodes[].value.number *

string

Node number.

nodes[].value.point *

object

nodes[].value.point.lat *

number

Location latitude.

nodes[].value.point.lon *

number

Location longitude.

nodes[].value.service_duration_s

integer

Time spent in the node.

Minimum value: 0.

nodes[].arrival_time_s *

number

Arrival ETA in seconds from midnight.

Minimum value: 0.

nodes[].departure_time_s *

number

Time of departure from the location.

Minimum value: 0.

nodes[].transit_distance_m *

number

Transit distance to a location, meters.

Minimum value: 0.

nodes[].type *

string

Node type. Always equals order.

nodes[].used_time_window *

string

Planned service time interval in "T - T" or "T-T" time format, where T represents time in HH, HH:MM or HH:MM:SS format.

nodes[].value *

object

nodes[].value.address

string

Node address in text format.

nodes[].value.customer_name

string

Customer name of the order.

nodes[].value.multi_order

boolean

Defines if an order is one of several orders at exactly the same location.

nodes[].value.number *

string

Node number.

nodes[].value.point *

object

nodes[].value.point.lat *

number

Location latitude.

nodes[].value.point.lon *

number

Location longitude.

nodes[].value.service_duration_s *

integer

Time spent in the node.

Minimum value: 0.

nodes[].value.shared_service_duration_s

integer

Service duration at the location, which can be shared with other orders at the same location.
Shared service duration can include operations as parking a car, delivering documents, etc.

Minimum value: 0.

nodes[].value.shipment_size

object

nodes[].value.shipment_size.amount

number

Size of shipment in custom units.

Minimum value: 0.

nodes[].value.shipment_size.volume_cbm

number

Order volume.

Minimum value: 0.

nodes[].value.shipment_size.weight_kg

number

Order weight.

Minimum value: 0.

number *

string

Route number.

nodes[] *

array

Planned route nodes.

nodes[].arrival_time_s *

number

Arrival ETA in seconds from midnight.

Minimum value: 0.

nodes[].departure_time_s

number

Time of departure from the location.

Minimum value: 0.

nodes[].transit_distance_m *

number

Transit distance to a location, meters.

Minimum value: 0.

nodes[].type *

string

Node type. Always equals depot.

nodes[].used_time_window *

string

Planned service time interval in "T - T" or "T-T" time format, where T represents time in HH, HH:MM or HH:MM:SS format.

nodes[].value *

object

nodes[].value.address

string

Node address in text format.

nodes[].value.number *

string

Node number.

nodes[].value.point *

object

nodes[].value.point.lat *

number

Location latitude.

nodes[].value.point.lon *

number

Location longitude.

nodes[].value.service_duration_s

integer

Time spent in the node.

Minimum value: 0.

nodes[].arrival_time_s *

number

Arrival ETA in seconds from midnight.

Minimum value: 0.

nodes[].departure_time_s

number

Time of departure from the location.

Minimum value: 0.

nodes[].transit_distance_m *

number

Transit distance to a location, meters.

Minimum value: 0.

nodes[].type *

string

Node type. Always equals garage.

nodes[].used_time_window

string

Planned service time interval in "T - T" or "T-T" time format, where T represents time in HH, HH:MM or HH:MM:SS format.

nodes[].value *

object

nodes[].value.address

string

Node address in text format.

nodes[].value.number *

string

Node number.

nodes[].value.point *

object

nodes[].value.point.lat *

number

Location latitude.

nodes[].value.point.lon *

number

Location longitude.

nodes[].value.service_duration_s

integer

Time spent in the node.

Minimum value: 0.

nodes[].arrival_time_s *

number

Arrival ETA in seconds from midnight.

Minimum value: 0.

nodes[].departure_time_s *

number

Time of departure from the location.

Minimum value: 0.

nodes[].transit_distance_m *

number

Transit distance to a location, meters.

Minimum value: 0.

nodes[].type *

string

Node type. Always equals order.

nodes[].used_time_window *

string

Planned service time interval in "T - T" or "T-T" time format, where T represents time in HH, HH:MM or HH:MM:SS format.

nodes[].value *

object

nodes[].value.address

string

Node address in text format.

nodes[].value.customer_name

string

Customer name of the order.

nodes[].value.multi_order

boolean

Defines if an order is one of several orders at exactly the same location.

nodes[].value.number *

string

Node number.

nodes[].value.point *

object

nodes[].value.point.lat *

number

Location latitude.

nodes[].value.point.lon *

number

Location longitude.

nodes[].value.service_duration_s *

integer

Time spent in the node.

Minimum value: 0.

nodes[].value.shared_service_duration_s

integer

Service duration at the location, which can be shared with other orders at the same location.
Shared service duration can include operations as parking a car, delivering documents, etc.

Minimum value: 0.

nodes[].value.shipment_size

object

nodes[].value.shipment_size.amount

number

Size of shipment in custom units.

Minimum value: 0.

nodes[].value.shipment_size.volume_cbm

number

Order volume.

Minimum value: 0.

nodes[].value.shipment_size.weight_kg

number

Order weight.

Minimum value: 0.

number *

string

Route number.

Responses

Code 200

Route plans were added.

Code 401

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

Code 403

You do not have access to this object.

Code 422

Incorrect input.