Skip to content
GuidesPlaygroundDashboard

Optimize

Optimize route through waypoints
OptimizeResult Optimize.Create(OptimizeCreateParamsparameters, CancellationTokencancellationToken = default)
POST/api/v1/optimize
Get async optimization result
OptimizeJobStatus Optimize.Retrieve(OptimizeRetrieveParamsparameters, CancellationTokencancellationToken = default)
GET/api/v1/optimize/{job_id}
ModelsExpand Collapse
class OptimizeCompletedResult:

Completed optimization — GeoJSON Feature with optimized route

required GeoJsonGeometry Geometry
required Coordinates Coordinates

GeoJSON coordinates array (nesting depth varies by geometry type)

One of the following:
IReadOnlyList<Double>
IReadOnlyList<IReadOnlyList<Double>>
IReadOnlyList<IReadOnlyList<IReadOnlyList<Double>>>
IReadOnlyList<IReadOnlyList<IReadOnlyList<IReadOnlyList<Double>>>>
required Type Type
One of the following:
"Point"Point
"LineString"LineString
"Polygon"Polygon
"MultiPoint"MultiPoint
"MultiLineString"MultiLineString
"MultiPolygon"MultiPolygon
required Properties Properties
Double Distance

Total distance in meters

Double Duration

Estimated duration in seconds

IReadOnlyList<Long> WaypointOrder

Optimized waypoint ordering

required Status Status

Job status

required Type Type
class OptimizeJobStatus:

Status of an async optimization job

required Status Status

Job status

One of the following:
"completed"Completed
"processing"Processing
"failed"Failed
string? Error

Error message when failed

JsonElement? Result

Optimization result when completed

class OptimizeProcessingResult:

Async optimization in progress — poll with the job_id

required string JobID

Job ID for polling

required Status Status

Job status

class OptimizeRequest:

Route optimization request through waypoints

required GeoJsonGeometry Waypoints

Waypoints to visit (GeoJSON MultiPoint geometry, minimum 2 points)

required Coordinates Coordinates

GeoJSON coordinates array (nesting depth varies by geometry type)

One of the following:
IReadOnlyList<Double>
IReadOnlyList<IReadOnlyList<Double>>
IReadOnlyList<IReadOnlyList<IReadOnlyList<Double>>>
IReadOnlyList<IReadOnlyList<IReadOnlyList<IReadOnlyList<Double>>>>
required Type Type
One of the following:
"Point"Point
"LineString"LineString
"Polygon"Polygon
"MultiPoint"MultiPoint
"MultiLineString"MultiLineString
"MultiPolygon"MultiPolygon
Mode Mode

Travel mode (default: auto)

One of the following:
"auto"Auto
"foot"Foot
"bicycle"Bicycle
Boolean Roundtrip

Whether route returns to start (default: true)

class OptimizeResult: A class that can be one of several variants.union

Optimization response — either a completed GeoJSON Feature route or an async job reference

class OptimizeCompletedResult:

Completed optimization — GeoJSON Feature with optimized route

required GeoJsonGeometry Geometry
required Coordinates Coordinates

GeoJSON coordinates array (nesting depth varies by geometry type)

One of the following:
IReadOnlyList<Double>
IReadOnlyList<IReadOnlyList<Double>>
IReadOnlyList<IReadOnlyList<IReadOnlyList<Double>>>
IReadOnlyList<IReadOnlyList<IReadOnlyList<IReadOnlyList<Double>>>>
required Type Type
One of the following:
"Point"Point
"LineString"LineString
"Polygon"Polygon
"MultiPoint"MultiPoint
"MultiLineString"MultiLineString
"MultiPolygon"MultiPolygon
required Properties Properties
Double Distance

Total distance in meters

Double Duration

Estimated duration in seconds

IReadOnlyList<Long> WaypointOrder

Optimized waypoint ordering

required Status Status

Job status

required Type Type
class OptimizeProcessingResult:

Async optimization in progress — poll with the job_id

required string JobID

Job ID for polling

required Status Status

Job status