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.
Request
POST
https://courier.yandex.ru/api/v1/companies/{company_id}/routes/{route_id}/order-sequence
Path parameters
Name |
Description |
company_id* |
Type: integer Company ID used in requests to the Track & Trace API. |
route_id* |
Type: integer Route ID used in requests to the Track & Trace API. |
Body
application/json
[
4789,
4790,
5245
]
integer[]
Responses
200 OK
The route was successfully created in the specified order.
401 Unauthorized
Authorization error. Make sure that the request header contains the correct OAuth token.
403 Forbidden
Error accessing the object. The user doesn't have the rights to access the object.
404 Not Found
Object search error. Object not found.
409 Conflict
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.
422 Unprocessable Entity
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.
504 Gateway Timeout
Error working with the API. Repeat the request.
No longer supported, please use an alternative and newer version.