Put the orders on a route in the order you choose
A PUT request to the /routes/{routeUuid}/sequence endpoint sets the order in which a route visits its orders. Routific applies your sequence exactly as sent and recalculates the route's arrival times, distance and working time. Nothing is re-optimized, and no order moves to another route.
Use it when your own rules decide the order of stops — loading order, customer priority, or a driver's local knowledge — rather than the optimized sequence.
Request URL
Send the whole routeThe request lists every order on the route, in the new order. Orders you leave out aren't removed or kept in place — the request is rejected. Read the current sequence from Fetch route timeline, reorder it, and send the full list orderUuids back.
Sample Request Payload
{
"orders":
[
"6a8e071a-4ee0-470b-982e-b24ed1d1b90c",
"9b3f2c44-1d7e-4a90-b3c1-8f2e6a91d445",
"1c7d5e90-3a2b-4f61-8e47-2d9c0b6a5f13"
]
}| Field | Type | Description |
|---|---|---|
| orders (required) | String Array | The uuid of every order on the route, in the order they should be visited. Each order must appear exactly once. |
The list contains orders only. Routific places the start location, end location, breaks and any waiting time around them.
Routes a driver has started
You can re-sequence a route the driver is already working. Orders at stops the driver has arrived at or completed must stay in their current positions. Everything after that can be reordered, including the stop the driver is currently driving to.
Completed route cannot be re-sequencedA route that has been completed by the driver or has visited all of the orders in the route returns a
409status code.
Orders at the same stop
When several orders are delivered at one stop, the sequence you send decides how they're grouped:
- Orders you keep next to each other stay one stop.
- Orders you separate become separate stops at the same address, visited at the points you placed them.
Time windows aren't enforcedYour sequence is applied even if it means an order is reached after its time window. Each late order is marked
isLate: truein the route timeline, and the action result says how many orders are late, so you can decide whether to keep the sequence.
Sample Response Payload
A valid request returns 202 Accepted. The new sequence is applied in the background.
{
"actionUuid": "f81d4fae-7dec-11d0-a765-00a0c91e6bf6",
"actionName": "resequenceRoute",
"status": "pending"
}Poll Fetch route action status with the actionUuid until status is finished
| Field | Type | Description |
|---|---|---|
| actionUuid | String | Unique identifier of the re-sequencing action. Use this to check the status of the action. |
| actionName | String | Name of the action being performed. Always resequenceRoute. |
| status | String | Current status of the action. Possible values: pending, finished, and failed. |

