API Reference
API Reference

This endpoint allows you to retrieve the solution to an optimization problem previously submitted to the /optimize/create endpoint.

If we haven't finished processing the problem, the API response will show a status of in_progress.
The body of the request payload should be empty or null. And a basic schematic of the response looks like this:

{
    "actionUuid": "{{uuid}}",
    "actionName": "OptimizeAction",
    "status": "finished",
    "routeScenario": {
        ...
    },
    "routeSchedule": {
      	"unscheduledStops": [],
        "scheduledRoutes": [...]
        
    }
}

The actionUuid, actionName, and status fields contain metadata that help you identify the status of an optimization problem.

📘

Status of Optimization Job

The status field can resemble any one of these values: not_started, in_progress, finished/failed. And each of these values represents the current stage of your optimization request being processed.

The routeScenario object describes the original problem that was sent to /optimize/create endpoint, which was used to generate the solution represented inside the routeSchedule object.

scheduledRoutes and unscheduledStops arrays within the routeSchedule object describe orders that were scheduled onto a route and the ones that couldn't be scheduled, respectively.

Parsing the Solution

Units of Measurement

All distance fields in the response are expressed in meters, while duration related fields are expressed in seconds.

Decoding Polylines

The polyline data was generated using an encoding precision level of 6, as such please ensure to decode with a similar precision level. If you need help decoding the polyline data, you can use something like this to decode. Also check out our guide on decoding polyline for more details.

Language
Authorization
Header
Click Try It! to start a request and see the response here!