Orders

Create Route

This API is used to plan a set of unplanned orders into a route

post/orders/routes/

Request

Request body

track_mode'full_shift' | 'on_shift' | 'pre_shift' | 'null' nullable

Filter routes on the specified track_mode

ops_group_handlestring nullable

Filter routes on the specified ops group

optimiseboolean nullable

Flag to determine whether orders sequence needs to be updated to minimise total travel distance.

driver_handlestring nullable

Unique customer provided identifier for the driver to whom the route needs to be assigned to

worker_handlestring nullable

Unique customer provided identifier for the worker to whom the route needs to be assigned to

Response

Successful response

route_handlestring required

Unique identifier for the route

status'planned' | 'assigned' | 'tracking' | 'completed' | 'summarizing' required

Current state of route

versioninteger required

Value indicating the latest updated state of the route

created_atstring required

Timestamp at which the route was created

embed_urlstring required

Embeddable link that renders the route profile view

ops_group_handlestring

URL safe unique identifier for the ops group to which the orders in the route are associated

track_mode'full_shift' | 'on_shift' | 'pre_shift' | 'null' nullable

Value representing whether the route is tracked in on_shift, pre_shift or full_shift mode

plan_modestring required

Value would be manual

started_atstring nullable

Timestamp at which the route tracking started

assigned_atstring nullable

Timestamp at which the route was assigned to a driver

planned_atstring nullable

Timestamp at which the orders were planned into this route

completed_atstring nullable

Timestamp at which the route was completed

device_idstring nullable

Unique identifier for a device

driver_handlestring nullable

Unique customer provided identifier for the driver

worker_handlestring nullable

Unique customer provided identifier for the worker

metadataobject nullable

Additional customer provided information about the route

distanceinteger nullable

Actual distance travelled by the driver to fulfill all orders in the route

durationinteger nullable

Actual time spent by the driver to fulfill all orders in the route

plan_idstring nullable

Unique identifier for the plan to which the route belongs to

device_switch_modeunknown
candidate_devicesstring[] nullable

List of devices among which the route is expected to be tracked

completion_sourcestring nullable

Source of the route completion

scheduled_start_atstring nullable

Scheduled start time of the route

tracking_ratenumber nullable

Indicates the ratio of time tracked to expected tracking time of route. Values lie between 0.0 and 1.0

time_to_first_eventnumber nullable

Time in seconds to receive first event from device after tracking start

time_to_first_locationnumber nullable

Time in seconds to receive first location from device after tracking start

completion_type'end_at_last_order' | 'return_to_start_location' | 'manual' | 'null' nullable

Configuration to identify where routes are expected to end

Changes

No recorded changes to this operation across all 1 revision of this API.