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 depots

Depot Depot and Depots are mutually exclusive objects. You can only use one of them at a time.

Depot or Depots

locations

Order

Orders

vehicles

Vehicle

Vehicles

planned_route

Planned route

Routes

options

Routing options

Options

incompatible_load_types

Incompatible orders

Incompatible_order_types

location_groups

Order groups

Location_groups

zones

Geofences

-

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 and point.lon
    • Time window time_window or multiple time windows time_windows if the depot operates with breaks
  • Orders locations:

    • Identifier id
    • Coordinates point.lat and point.lon
    • Time window for completing an order time_window or multiple time windows time_windows
    • Strictness of time window hard_window
    • Order handling time (time to complete an order) service_duration_s
  • 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
  • Parameters of the planning algorithm options:

    • Time zone time_zone
Contact support