Skip to main content
POST
Solve a routing problem (solver2-compatible V2 format)

Authorizations

Authorization
string
header
required

Query Parameters

millis
integer<int64>

Time limit override in milliseconds

Required range: x >= 0

Body

application/json

Top-level request body for POST /v2/vrp/sync/solve.

Mirrors the solver2 OnRoute API. The mapping to V3 is handled by [crate::api::v2_compat::map_v2_request].

jobs
object[]
required

Jobs to be assigned and sequenced.

resources
object[]
required

Fleet of vehicles (called "resources" in V2).

options
null | object

Solver options; currently only solvingTime is honoured.

relations
object[] | null

Optional ordering constraints between jobs.

Response

Solution found

Top-level response body for POST /v2/vrp/sync/solve.

Field set mirrors solver2's OnRouteResponse Kotlin DTO. All optional fields are omitted from the JSON when None, so adding them is wire-safe for existing clients.

trips
object[]
required

One trip per vehicle that has at least one visit.

id
string | null

Solver job ID — kept for SDK wire compatibility. Sync solves emit None because the request has no persistent job identity.

messages
string[] | null

Free-text events emitted during the solve. Empty array on success; reserved for future warnings.

status
string | null

Sync solves always return Some("SOLVED") on the 200 path; async/error paths are not exercised by this endpoint.

totalServiceTimeInSeconds
integer<int64> | null

Total service time across all trips in seconds.

totalTravelDistanceInMeters
integer<int64> | null

Total travel distance across all trips in metres.

totalTravelTimeInSeconds
integer<int64> | null

Total travel time across all trips in seconds.

totalWaitTimeInSeconds
integer<int64> | null

Total wait time across all trips in seconds.

unserved
string[] | null

Job names that could not be assigned; None when all jobs are assigned.

unservedReasons
object | null

Maps each unserved job name to a list of reason strings.