This page enumerates some of the API parameters used by RouteStripe, for optimization options, vehicles, and visits.
Parameters
1. Optimization Options
Parameter | Type | Required | Description |
---|---|---|---|
visit_balance_coefficient | integer | Optional | Specifies the type of task balancing between drivers (0 - determines optimal number of drivers, 1 - balances routes by number of tasks, 2 - balances routes by working time). |
polylines | boolean | Optional | If true , generates a polyline encoding the route of each vehicle and provides stop-to-stop distances. |
avoid_tolls | boolean | Optional | Avoids toll roads if true . Use with caution, especially for non-urban routes. |
avoid_highways | boolean | Optional | Avoids highways if true . Use with caution, especially when planning routes outside the city. |
squash_duration | number | Required | Allows reducing time for multiple deliveries to the same address (e.g., if a base visit is 5 min, setting squash_duration: 2 results in a total of 7 min instead of 10). |
JSON Example for Optimization Options
Set general requirements for route calculation if necessary.
{
"options": {
"visit_balance_coefficient": 0,
"polylines": true,
"avoid_tolls": false,
"avoid_highways": false,
"squash_duration": 1
}
}
2. Vehicles Parameters
Your fleet
is an array that contains one of the main objects - a vehicle
, to build a route, each request must contain at least one vehicle
with a specified start_location
or end_location
.
Basic parameters of vehicles
Parameter | Type | Required | Description |
---|---|---|---|
name | string | Required | Title for vehicle. |
profile | string | Optional | Vehicle type (car or truck ). Defaults to car if not specified. |
shift_start | string | Required | Start work time (hh:mm format). |
shift_end | string | Required | End work time (hh:mm format). |
start_location | Location | Required | Start location (longitude, latitude). |
end_location | Location | Optional | End location (longitude, latitude). |
JSON Example for Basic Vehicles
{
"fleet": [
{
"name": "Vehicle 1",
"profile": "car",
"shift_start": "09:00",
"shift_end": "18:00",
"start_location": {
"lng": 50.123456,
"lat": 50.123456
},
"end_location": {
"lng": 50.123456,
"lat": 50.123456
}
}
]
}
Additional Properties of Vehicles
Use additional parameters to refine calculations and task distribution:
Parameter | Type | Required | Description |
---|---|---|---|
load | number<float> | Optional | Current load (kg). |
capacity | number<float> | Optional | Vehicle capacity (m³). |
visits_max | integer | Optional | Maximum number of visits per route. |
max_distance | string | Optional | Limits maximum route distance. |
speed_factor | number<double> | Optional | Adjusts speed calculation based on vehicle performance. |
breaks | array | Optional | Defines driver breaks with service , start , and end times. |
width | number<float> | Soon | Vehicle width (m). |
height | number<float> | Soon | Vehicle height (m). |
weight | number<float> | Soon | Vehicle weight (kg). |
JSON Example for Additional Properties
{
"fleet": [
{
"name": "Vehicle 1",
"profile": "car",
"shift_start": "09:00",
"shift_end": "18:00",
"start_location": {
"lng": 50.123456,
"lat": 50.123456
},
"end_location": {
"lng": 50.123456,
"lat": 50.123456
},
"load": 300,
"capacity": 600,
"visits_max": 50,
"max_distance": "200",
"speed_factor": 1,
"breaks": [
{
"service": 30,
"start": "12:00",
"end": "13:00"
}
]
}
]
}
3. Visits Parameters
Parameter | Type | Required | Description |
---|---|---|---|
location | Location | Required | Visit location (longitude, latitude). |
lng | number | Required | Longitude. |
lat | number | Required | Latitude. |
type | string | Required | D - Delivery. |
start | string | Required | Start time window (hh:mm ). |
end | string | Required | End time window (hh:mm ). |
duration | number | Required | Duration in minutes. |
load | integer | Optional | Weight (g). |
capacity | integer | Optional | Volume (cm³). |