Route Plan

The Route Plan endpoints allow creating, updating, and deleting Route Plans, in addition to shuffling the tasks within the planned routes and adding more tasks to them.

A Route Plan (Route) is a container used to track a driver’s work throughout a shift, day, or planned segment of work (e.g., morning route and afternoon route). Pickup and Delivery tasks are assigned to a Route manually or seamlessly through the Route Optimization process when an Admin or a Dispatcher "Accepts" the Route Optimization results.

A Route Plan typically contains one to many tasks and represents the collection as a whole by its name, rather than the current Onfleet model where tasks are only grouped by assigning the collection to a driver. Even after a Route has started, tasks can be added or removed. A driver can be assigned to a Route or changed at any time before the Route is started.

The base URL for all route plan requests is:


Task States

Each request will return a computed property called taskStates, which is an array of integers that represent the state of each task. Its length will always match the tasks length and the sequence matches the task sequence in the Route Plan. The nth element in taskStates is the state for the nth element in tasks.

Task states: 0 (unassigned), 1 (assigned to worker), 2 (active), 3 (completed)