Authorizations
Api Key based authentication (apikey)
Body
OnRoute Request for solving, evaluating
List of available resources (vehicles, drivers, workers) that can be assigned to perform jobs. Each resource defines their working schedules, location constraints, capacity limits, and capabilities. At least one resource is required, with a maximum of 2000 resources per request.
1 - 2000
elementsList of jobs/tasks to be assigned to resources. Each job specifies service requirements, location, time constraints, duration, and resource preferences. Jobs represent the work that needs to be scheduled and optimized. At least one job is required, with a maximum of 10,000 jobs per request.
1 - 10000
elementsConfiguration options that control the solver's behavior, optimization strategy, and output format. These settings affect how the solver approaches the problem, what data is included in responses, and performance characteristics. Options to tweak the routing engine
{
"euclidian": false,
"routingEngine": "OSM",
"partialPlanning": true,
"minimizeResources": true,
"traffic": 1.1,
"polylines": true,
"fairWorkloadPerTrip": false,
"fairWorkloadPerResource": false,
"workloadSensitivity": 0.1,
"snapUnit": 300,
"maxSuggestions": 3,
"onlyFeasibleSuggestions": true,
"explanation": {
"enabled": true,
"filterHardConstraints": true
}
}
Relative importance weights for different optimization objectives and constraint violations. These weights allow you to balance competing priorities such as travel time vs. resource utilization, or to emphasize certain constraints like customer preferences or service urgency. OnRoute Weights
{
"priorityWeight": 100,
"workloadSpreadWeight": 10,
"travelTimeWeight": 1,
"plannedWeight": 1000,
"asapWeight": 5,
"minimizeResourcesWeight": 3600,
"allowedResourcesWeight": 500,
"waitTimeWeight": 1,
"urgencyWeight": 50,
"driveTimeWeight": 1
}
Optional webhook URL that will receive a POST request with the job ID when the optimization is complete. This enables asynchronous processing where you can submit a request and be notified when results are ready, rather than waiting for the synchronous response.
Optional configuration for custom distance matrices supporting multiple vehicle profiles and time slices. When provided, these matrix IDs will be used instead of calculating distances through routing engines. This is useful for scenarios requiring pre-computed distance matrices with specific routing constraints or for improved performance. Custom distance matrix configuration for multi-profile and multi-slice scenarios
{
"profileMatrices": {
"CAR": {
"6": "matrix-car-morning-123",
"9": "matrix-car-midday-456",
"16": "matrix-car-evening-789"
},
"TRUCK": {
"6": "matrix-truck-morning-abc",
"9": "matrix-truck-midday-def"
}
},
"matrixServiceUrl": "https://custom-matrix-service.com/api"
}
Response
Status