Orders

Track Orders

This API allows the creation and immediate tracking of order fulfillment. If the route has been planned and exists in the HyperTrack system, then tracking can be initiated using the route_handle.

post/orders/track

Request

Request body

route_handlestring nullable

Unique Handle of route to be tracked. if provided other parameters are not required and will be ignored if provided

driver_handlestring nullable

One of device_id or driver handle is mandatory

worker_handlestring nullable

One of device_id or worker handle is mandatory

ops_group_handlestring nullable

Unique Handle of Ops Group for which orders are to be tracked

device_idstring nullable

One of device_id or driver handle is mandatory

track_mode'full_shift' | 'pre_shift' | 'on_shift' required

Tracking mode of the order. Note that on_time and flex are deprecated modes.

versioninteger nullable

Route version.

agent_modeunknown
closeout_modeunknown
worker_phone_numberstring nullable

[BETA] Worker phone number for closeout reconciliation. Only used when closeout_mode is 'standalone'.

device_switch_mode'manual' | 'login' | 'closest_to_destination' | 'null' nullable

Mode to control the active device for tracking orders. The following options are available:

  • login : Order tracking is based on the device the worker last logged into. When the worker logs into a new device, the orders automatically transfer to the new device. This is the default setting.
  • closest_to_destination : Order tracking is based on the device closest to the order's destination. The system monitors all of the worker's recent devices and selects the one nearest to the destination for tracking the order.
  • manual : Order tracking remains on the device that was active when the order was created.

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' required

Value representing whether the order is tracked in on_shift, pre_shift or full_shift mode. Modes such as on_time and flex are deprecated.

plan_mode'on_demand' | 'scheduled' | 'manual' | 'null' nullable

Value indicating how the orders in the route were planned

started_atstring required

Timestamp at which the route tracking started

assigned_atstring required

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 order start

time_to_first_locationnumber nullable

Time in seconds to receive first location from device after order 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.