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 page with specifications.

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 it's the only depot).
    },
    "depots": [
        // Describes depots (if there are multiple depots).
    ],
    "locations": [
        // Describes orders.
    ],
    "vehicles": [
        // Describes vehicles.
        "planned_route": {
            // Describes previously planned destinations without specifying the visit sequence.
        }
    ],
   "options": {
        // Describes 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

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

Order incompatibility

Incompatible_order_types

location_groups

Order grouping

Location_groups

zones

Geofences

-

* Mandatory objects/arrays of objects when using the API to plan routes. Doesn't apply to the corresponding Excel sheets.

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