Sets the order of deliveries in the route
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. |
* Required parameter
Request Body
[ integer ]
Copied to clipboard
Representation
Fields
* Required parameter
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.