The Solution object (response)¶
Reference · API reference
When a solve completes, GET /raas/optimization/{id} returns 200 with a solution that has three parts:
{
"status": "completed",
"solution": {
"statistics": { … },
"routes": [ … ],
"unassigned": [ … ]
}
}
statistics¶
Present when configuration.statistics is true.
| Group | Fields |
|---|---|
distance |
totalDistance, revenueDistance |
vehicles |
used, unused |
jobs |
scheduledTasks, unassignedTasks |
times |
totalHours, revenueHours |
routes[]¶
One entry per vehicle that was used. Each route has a vehicleId and shifts[]; each shift has an index and an ordered list of stops[].
Stop fields:
| Field | Notes |
|---|---|
ordinal |
Position in the route (1, 2, 3, …). |
jobId, taskId |
Which job/task this stop serves. |
type |
pickup, delivery, or break. |
location |
Coordinates of the stop. |
eta |
Estimated arrival (same timezone as the request). |
timeToNext |
Seconds to the next stop. |
distanceToNext |
Distance to the next stop (request units). |
waitTime |
Seconds spent waiting for a service window to open. |
polyline |
Path to the next stop (if polylineType ≠ none). |
break |
Present when the stop is a break. |
{
"vehicleId": 1,
"shifts": [{
"index": 0,
"stops": [
{ "ordinal": 1, "jobId": 101, "taskId": 1001, "type": "delivery",
"eta": "2026-07-31T08:14:00-07:00", "timeToNext": 540, "distanceToNext": 3.1, "waitTime": 0 }
]
}]
}
unassigned[]¶
Present when configuration.unassignedTasks is true. Anything the engine couldn't place, with a reason:
{
"id": { "job": 108, "task": 1008 },
"reason": [{ "code": "TIME_WINDOW", "description": "No vehicle can reach this stop within its service window." }]
}
Read the unassigned list first
A non-empty unassigned list is the fastest signal that the problem needs a fix (a missing depot, an impossible time window, too little capacity) rather than the solution. See Rate limits and errors.
Related: The Problem object · Status codes · Polling and backoff