Adding a task
When using the API to plan routes, the parameters are passed to RouteQ in the request body in JSON format. You can queue a task for processing using the /add/mvrp
method. To learn more, see the specifications page.
To send API requests via Postman, you can use the RouteQ API collection.
Description of the request body
JSON structure
{
"depot": {
// Describes the depot if there's only one.
},
"depots": [
// Describes depots if there are multiple.
],
"locations": [
// Describes orders.
],
"vehicles": [
// Describes vehicles.
"planned_route": {
// Describes the planned destinations without specifying the visit sequence.
}
],
"options": {
// Describes the routing options.
"incompatible_load_types": [
// Describes incompatible order types.
],
"location_groups": [
// Describes order groups.
]
},
"zones": [
// Describes geofences (if geofences from the interface aren't used).
]
}
Object/Array |
Description |
Compliance with Excel sheets |
Required field* |
|
Depot Depot and Depots are mutually exclusive objects. You can only use one of them at a time. |
|
|
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
- |
|
Note
Objects in the request body may include references to presets (predefined settings).
Minimum set of parameters for each object:
-
Depots
depots
:- Identifier
id
- Coordinates
point.lat
andpoint.lon
- Time window
time_window
or multiple time windowstime_windows
if the depot operates with breaks
- Identifier
-
Orders
locations
:- Identifier
id
- Coordinates
point.lat
andpoint.lon
- Time window for completing an order
time_window
or multiple time windowstime_windows
- Strictness of time window
hard_window
- Order handling time (time to complete an order)
service_duration_s
- Identifier
-
Couriers and vehicles
vehicles
:- Identifier
id
- Transportation method (on foot, public transport, car, or truck)
routing_mode
- Requirement to return to the depot after completing the route
return_to_depot
- Identifier
-
Parameters of the planning algorithm
options
:- Time zone
time_zone
- Time zone
Mandatory objects/arrays of objects when using the API to plan routes. Doesn't apply to the corresponding Excel sheets.