Skip to main content

Plan routes

POST /v1/routes/solve

Optimises the given jobs across the fleets and waits for the result. The response is a planner request whose solution holds the planned routes and any unassigned jobs.

Routes are not saved by this call — save the ones you want with POST /v1/routes. For large problems use POST /v1/routes/solve/async instead.

Authentication​

Send a token issued in the Zoopit dashboard as Authorization: Bearer <token>.

Request body​

FieldTypeRequired
ownerstringyes
jobsarray of objectyes
initial_solutionobject
continued_from_parentboolean
fleetsarray of objectyes
with_traffic_etaboolean
auto_save_routesboolean
objectivesarray of Objective
parent_planner_request_idnull or string
main_plan_idnull or string
routes_conditionsarray of object or null
sort_type"delivery" | "pickup" or null
sort_bynull or string
ignore_sortingnull or boolean
ignore_skillsnull or boolean
ignore_capacitynull or boolean
ignore_driver_shiftsnull or boolean
ignore_pickup_windownull or boolean
ignore_delivery_windownull or boolean
sequence_mode"strict" or null
tagsarray of string
edgesarray of object
relationsarray of object
solve_configobject
driversarray of object
driving_rulesobject

Responses​

200​

resource: PlannerRequest

FieldTypeRequired
attributesobjectyes
errorobject
idstringyes
created_atstringyes
modified_atnull or stringyes
deleted_atnull or stringyes
created_bystringyes
modified_bynull or stringyes
deleted_bynull or stringyes
ownersarray of stringyes
tagsarray of stringyes
request_idstringyes
requested_solver_namestringyes
solver_idstring
solver_request_idstringyes
input_statsobjectyes
output_statsobject
solutionobject
problemobject
job_statusJobStatusyes
with_traffic_etanull or boolean
auto_save_routesnull or boolean
objectivesarray of Objective or nullyes
parent_planner_request_idnull or stringyes
main_plan_idnull or stringyes
routes_conditionsarray of object or nullyes
sort_type"delivery" | "pickup" or nullyes
sort_bynull or stringyes
ignore_sortingnull or booleanyes
ignore_skillsnull or booleanyes
ignore_capacitynull or booleanyes
ignore_driver_shiftsnull or booleanyes
ignore_pickup_windownull or booleanyes
ignore_delivery_windownull or booleanyes
edgesarray of object or nullyes
initial_solutionobject or nullyes
continued_from_parentbooleanyes
relationsarray of object
jobsarray of object or nullyes
fleetsarray of object or nullyes

Example​

curl -X POST 'https://routes-api.cloud.zoopit.no/v1/routes/solve'
-H 'Authorization: Bearer <token>'
-H 'Content-Type: application/json'
-d '{ ... }'

Try it in the interactive Routes API reference.

Field descriptions, guides and worked examples are in the full reference, available to customers in the Zoopit dashboard under Accounts → Developer.