Sets the order of deliveries in the route

  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 404
    5. Code 409
    6. Code 422
    7. Code 504

Set of provided orders should include all orders of the route. Instead of a list with order IDs you can specify an object like: '{"order_ids": [id1, id2, ...]}' to set sequence by order IDs or '{"order_numbers": ["number1", "number2", ...]}' to set sequence by numbers.

HTTP Request

POST https://courier.yandex.ru/api/v1/companies/{company_id}/routes/{route_id}/order-sequence

Path Parameters

company_id *

integer

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

route_id *

integer

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

company_id *

integer

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

route_id *

integer

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

Request Body

[ 
   integer
]
Copied to clipboard

Representation

Collapse all
Expand all

Fields

Responses

Code 200

The route was successfully created in the specified order.

Code 401

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

Code 403

Error accessing the object. The user doesn't have the rights to access the object.

Code 404

Object search error. Object not found.

Code 409

Can't set the delivery route in the specified order because some of the orders were already delivered. The response contains information about the error and where to start the delivery sequence.

Code 422

Incorrect input, for example mandatory parameters are missing, list of orders does not correspond to the list of orders in the route. The operation can't be performed.

Code 504

Error working with the API. Repeat the request.