Route optimization API
The routeOptimizer API is a route optimization API for multi-vehicle fleets. Send your stops and vehicles in one request and get back optimized routes: which vehicle visits which stop, in what order, with distance and duration. It handles capacity, time windows, pickup-and-delivery pairs and road restrictions, so you can plan last-mile routes automatically from your ERP or CRM.
All tools for success last-mile optimization
Routing API
Helps to significantly speed up delivery planning, zone and route management and enhances efficiency of transport use. Now the number of addresses and restrictions no longer matter. The system will immediately generate and offer the most optimized and accurate routing solutions of all possible options.
Distance Matrix API
Quickly calculates the distance, travel time and ETA for origins and destinations. You can set thousands of departure and destination points simultaneously. The system considers type of transport, its technical limitations, cargo to be transported, as well as the route, road infrastructure and possible delays.
Geocoding API
Converts latitude and longitude coordinates as well as place designation into a address or simple postal code and vice versa.
Supports Google, Open Street and country specific geocoding API's
Various Constraints for Route Planning Software
Route constraints
- Duration and distance
- Multi circuit(route) per vehicle
- Automatic order distribution with route optimization
- Limitation by distance between points
- Priority by goods type
- Area/Polygon constraints
Vehicle constraints
- Classification
- Speed manipulation
- Multi capacity types
- Usage & service costs
- Goods dimensions & weight
- Limitation by stop counts and type
Time constraints
- Staff working hours and break
- Pickup & delivery windows
- Maximum allowed idle at stop
Stop constraints
- Soft & absolute priorities
- Service time
- Stop classification
- Permitted vehicles lists
- Pick-up / Delivery time windows
- Pick-up / Delivery sequence control
Route
- Duration and distance
- Multi circuit(route) per vehicle
- Automatic order distribution with route optimization
Vehicle
- Classification, speed manipulation, capacity, usage & service costs
- Goods dimensions & weight
Time
- Staff working hours & shift
- Pickup & delivery windows
- Maximum allowed idle at stop
Stop
- Soft & absolute priorities
- Service time
- Classification
- Permitted vehicles lists
- Pick-up / Delivery time windows
- Pick-up / Delivery sequence control
How does the routeOptimizer API work?
- Authenticate. Call
POST /loginto get a session cookie and send it with every following request. - Send stops and vehicles. Call
POST /optimizationswith an array of points (coordinates, load and service time) and an array of vehicles (capacity and optional constraints). Point 0 is the depot unless a vehicle has its own start and end. - Get the routes. The response assigns points to vehicles and gives the visit order of each route with distance, duration and arrival times. Points that cannot be served are listed as unassigned.
- Adjust if needed. Reorder stops, move points between vehicles, force dropped points back into the plan, exclude road segments or areas, and attach your own metadata.
Sample request
POST /optimizations
{
"response_format": "v2",
"capacity_measurement_type": "volume",
"search_time_limit": 15,
"vehicles": [
{ "id": 1, "capacity": { "general": 6 } },
{ "id": 2, "capacity": { "general": 6 } }
],
"points": [
{ "id": 0, "la": 59.444701, "lo": 24.723633 },
{ "id": 1, "volume": 3, "la": 59.438947, "lo": 24.711118, "st": 900 },
{ "id": 2, "volume": 3, "la": 59.444348, "lo": 24.713008, "st": 1800 }
]
}
Sample response (shortened)
{
"code": 200,
"data": {
"id": 1502,
"result_body": {
"routes": [
{
"veh_id": 1,
"num": 2,
"duration": 3198,
"leg_rings": [[
{ "from": 0, "to": 1, "duration": 243.1,
"time": { "min": "2025-02-09 08:04:03" } },
{ "from": 1, "to": 2, "duration": 106,
"time": { "min": "2025-02-09 08:20:49" } }
]]
}
]
}
}
}
Which constraints does the API support?
Vehicle capacity by weight, volume or units, including multi-compartment capacity; customer time windows; pickup-before-delivery pairs; limits on visits to customer types per vehicle; stop priorities; and road restrictions by excluded segments or polygons.
Are there limits?
The demo account is limited to 50 stops per request. For production volumes, contact us.
Where is the full documentation?
All endpoints, schemas and examples are in the routeOptimizer API documentation. To try it on your data, book a demo.