Submit a vehicle routing problem and receive optimized routes
curl -X POST https://api.solvice.io/v3/routing/solve \
-H "Authorization: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"vehicles": [
{
"id": "truck-1",
"start": [4.3517, 50.8503],
"end": [4.3517, 50.8503],
"shifts": [
{
"from": "2026-04-01T08:00:00+02:00",
"to": "2026-04-01T17:00:00+02:00"
}
],
"capacity": [100],
"skills": ["refrigerated"],
"max_duration": 28800
}
],
"jobs": [
{
"id": "delivery-1",
"location": [4.7005, 50.8798],
"demand": [10],
"time_windows": [
{
"from": "2026-04-01T09:00:00+02:00",
"to": "2026-04-01T12:00:00+02:00"
}
],
"service_duration": 300,
"skills": ["refrigerated"]
},
{
"id": "delivery-2",
"location": [3.7303, 51.05],
"demand": [20],
"time_windows": [
{
"from": "2026-04-01T10:00:00+02:00",
"to": "2026-04-01T15:00:00+02:00"
}
],
"service_duration": 600
}
],
"options": {
"time_limit_ms": 5000,
"seed": 42,
"minimize": "time"
}
}'
{
"summary": {
"status": "completed",
"total_distance": 142000,
"total_duration": 7200,
"vehicles_used": 1,
"jobs_assigned": 2,
"jobs_unassigned": 0,
"elapsed_ms": 850,
"iterations": 1200
},
"routes": [
{
"vehicle_id": "truck-1",
"shift_from": "2026-04-01T08:00:00+02:00",
"shift_to": "2026-04-01T17:00:00+02:00",
"stops": [
{
"job_id": "delivery-2",
"location": [3.7303, 51.05],
"arrival": "2026-04-01T08:40:00+02:00",
"departure": "2026-04-01T08:50:00+02:00",
"wait_time": 0,
"travel_time": 2400,
"service_time": 600,
"load_after": [20]
},
{
"job_id": "delivery-1",
"location": [4.7005, 50.8798],
"arrival": "2026-04-01T09:50:00+02:00",
"departure": "2026-04-01T09:55:00+02:00",
"wait_time": 0,
"travel_time": 3600,
"service_time": 300,
"load_after": [30]
}
],
"distance": 142000,
"duration": 7200,
"load": 30,
"n_stops": 2,
"start_time": "2026-04-01T08:00:00+02:00",
"end_time": "2026-04-01T10:30:00+02:00"
}
],
"unassigned": []
}
Show Vehicle object
[longitude, latitude][longitude, latitude]. Defaults to start if omitted.from and to (ISO 8601), and can optionally override start, end, and capacity.[100] for weight or [50, 30] for weight + volumeShow Job object
[longitude, latitude][10]from and to (ISO 8601)type ("SEQUENCE" or "FIRST_JOB") and jobs (ordered list of job IDs).Show Options
"time" (default) or "distance"distances and durations as square N×N arrays.Show Summary
"completed" or "partial"Show Route object
job_id, location, arrival, departure, wait_time, travel_time, service_time, load_afterjob_id and reasoncurl -X POST https://api.solvice.io/v3/routing/solve \
-H "Authorization: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"vehicles": [
{
"id": "truck-1",
"start": [4.3517, 50.8503],
"end": [4.3517, 50.8503],
"shifts": [
{
"from": "2026-04-01T08:00:00+02:00",
"to": "2026-04-01T17:00:00+02:00"
}
],
"capacity": [100],
"skills": ["refrigerated"],
"max_duration": 28800
}
],
"jobs": [
{
"id": "delivery-1",
"location": [4.7005, 50.8798],
"demand": [10],
"time_windows": [
{
"from": "2026-04-01T09:00:00+02:00",
"to": "2026-04-01T12:00:00+02:00"
}
],
"service_duration": 300,
"skills": ["refrigerated"]
},
{
"id": "delivery-2",
"location": [3.7303, 51.05],
"demand": [20],
"time_windows": [
{
"from": "2026-04-01T10:00:00+02:00",
"to": "2026-04-01T15:00:00+02:00"
}
],
"service_duration": 600
}
],
"options": {
"time_limit_ms": 5000,
"seed": 42,
"minimize": "time"
}
}'
{
"summary": {
"status": "completed",
"total_distance": 142000,
"total_duration": 7200,
"vehicles_used": 1,
"jobs_assigned": 2,
"jobs_unassigned": 0,
"elapsed_ms": 850,
"iterations": 1200
},
"routes": [
{
"vehicle_id": "truck-1",
"shift_from": "2026-04-01T08:00:00+02:00",
"shift_to": "2026-04-01T17:00:00+02:00",
"stops": [
{
"job_id": "delivery-2",
"location": [3.7303, 51.05],
"arrival": "2026-04-01T08:40:00+02:00",
"departure": "2026-04-01T08:50:00+02:00",
"wait_time": 0,
"travel_time": 2400,
"service_time": 600,
"load_after": [20]
},
{
"job_id": "delivery-1",
"location": [4.7005, 50.8798],
"arrival": "2026-04-01T09:50:00+02:00",
"departure": "2026-04-01T09:55:00+02:00",
"wait_time": 0,
"travel_time": 3600,
"service_time": 300,
"load_after": [30]
}
],
"distance": 142000,
"duration": 7200,
"load": 30,
"n_stops": 2,
"start_time": "2026-04-01T08:00:00+02:00",
"end_time": "2026-04-01T10:30:00+02:00"
}
],
"unassigned": []
}
Was this page helpful?
curl -X POST https://api.solvice.io/v3/routing/solve \
-H "Authorization: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"vehicles": [
{
"id": "truck-1",
"start": [4.3517, 50.8503],
"end": [4.3517, 50.8503],
"shifts": [
{
"from": "2026-04-01T08:00:00+02:00",
"to": "2026-04-01T17:00:00+02:00"
}
],
"capacity": [100],
"skills": ["refrigerated"],
"max_duration": 28800
}
],
"jobs": [
{
"id": "delivery-1",
"location": [4.7005, 50.8798],
"demand": [10],
"time_windows": [
{
"from": "2026-04-01T09:00:00+02:00",
"to": "2026-04-01T12:00:00+02:00"
}
],
"service_duration": 300,
"skills": ["refrigerated"]
},
{
"id": "delivery-2",
"location": [3.7303, 51.05],
"demand": [20],
"time_windows": [
{
"from": "2026-04-01T10:00:00+02:00",
"to": "2026-04-01T15:00:00+02:00"
}
],
"service_duration": 600
}
],
"options": {
"time_limit_ms": 5000,
"seed": 42,
"minimize": "time"
}
}'
{
"summary": {
"status": "completed",
"total_distance": 142000,
"total_duration": 7200,
"vehicles_used": 1,
"jobs_assigned": 2,
"jobs_unassigned": 0,
"elapsed_ms": 850,
"iterations": 1200
},
"routes": [
{
"vehicle_id": "truck-1",
"shift_from": "2026-04-01T08:00:00+02:00",
"shift_to": "2026-04-01T17:00:00+02:00",
"stops": [
{
"job_id": "delivery-2",
"location": [3.7303, 51.05],
"arrival": "2026-04-01T08:40:00+02:00",
"departure": "2026-04-01T08:50:00+02:00",
"wait_time": 0,
"travel_time": 2400,
"service_time": 600,
"load_after": [20]
},
{
"job_id": "delivery-1",
"location": [4.7005, 50.8798],
"arrival": "2026-04-01T09:50:00+02:00",
"departure": "2026-04-01T09:55:00+02:00",
"wait_time": 0,
"travel_time": 3600,
"service_time": 300,
"load_after": [30]
}
],
"distance": 142000,
"duration": 7200,
"load": 30,
"n_stops": 2,
"start_time": "2026-04-01T08:00:00+02:00",
"end_time": "2026-04-01T10:30:00+02:00"
}
],
"unassigned": []
}