Orders

Update Order

Update information for an order identified by the order handle. metadata replaces the stored metadata. cancellation_reason can only be updated on a cancelled order (else 409). timesheets can be updated on an order in any status: they replace all stored customer timesheet entries, so send the full list. The HyperTrack location entry stays, and a timesheet_updated webhook is sent when the stored timesheets change.

patch/orders/{order_handle}

Request

Path parameters

order_handlestring required

Query parameters

typestring nullable

Type of the order which can be drop or pick

type_indexinteger nullable

Integer representing the pick or drop order index when having a pick/drop scenario

fulfillment_attemptinteger nullable

The attempt number for fulfilling the order

Request body

metadataobject nullable

Additional information about the order. Replaces the stored metadata (no merge, unlike complete and cancel).

scheduled_atstring nullable

Schedule time by which order needs to be fulfilled. May be updated on ongoing orders.

scheduled_afterstring nullable

Schedule time after which the worker needs to fulfill order (similar to slot start). May be updated on ongoing orders.

expected_service_timeinteger nullable

Specified in seconds.

product_typestring[] nullable

Array of string representing skills required to fulfill the order

type'pick' | 'drop' | 'null' nullable

Type of Order

type_indexinteger nullable

Type index of the order, used in pick/drop scenario

capacity_usedinteger nullable

Volumetric units which is to be occupied by the order

ops_group_handlestring nullable

Unique Handle of Ops Group to which order needs to be reassigned

worker_locationsobject[] nullable

Only used when the order is in standalone closeout mode; forwarded as-is to closeout-copilot.

messagesobject[] nullable

Only used when the order is in standalone closeout mode; forwarded as-is to closeout-copilot.

facility_namestring nullable

Only used when the order is in standalone closeout mode; forwarded as-is to closeout-copilot.

cancellation_reason'no_show' | 'worker_cancelled' | 'client_cancelled' | 'other' | 'null' nullable

Why the shift did not occur as planned. Consumers must accept new values. Different from cancellation_source, which is the channel that cancelled the order. Only for a cancelled order.

Response

Successful response

order_handlestring required

Unique customer provided identifier for an order

status'completed' | 'cancelled' | 'disabled' | 'ongoing' | 'unplanned' | 'assigned' | 'planned' | 'dispatched' | 'summarizing' required

Current state of the order

fulfillment_attemptinteger nullable

Number identifying the attempt count for the order

created_atstring nullable

Timestamp at which the order was created

rescheduled_marked_atstring nullable

Timestamp at which the order was rescheduled

risk_statusboolean nullable

Flag indicating whether the order is at risk

ops_group_handlestring nullable

Unique identifier for the ops group to which the order is associated

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

Value indicating how the order was planned - manual, scheduled

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

started_atstring nullable

Timestamp at which the order tracking started

assigned_atstring nullable

Timestamp at which the order was assigned to a driver

planned_atstring nullable

Timestamp at which the order was planned into a route

scheduled_atstring nullable

Timestamp by which the order should be fulfilled to meet the customer promise

scheduled_afterstring nullable

Timestamp after which the order should be fulfilled to meet the customer promise

completed_atstring nullable

Timestamp at which the order was completed

cancelled_atstring nullable

Timestamp at which the order was cancelled

cancellation_sourceobject nullable

Detail about how order got cancelled

cancellation_reasonstring nullable

Customer-reported reason why the shift did not occur as planned: no_show, worker_cancelled, client_cancelled, other. Consumers must accept new values.

disabled_atstring nullable

Timestamp at which the order was disabled so that it can be fulfillment later

enabled_atstring nullable

Timestamp at which the disabled order was enabled for fulfillment

arrived_atstring nullable

Timestamp at which the driver arrived at the order fulfillment location

exited_atstring nullable

Timestamp at which the driver exited from the order fulfillment location

metadataobject nullable

Additional customer provided information about the order

risksobject nullable

Object containing different risk statuses for the order

expected_service_timeinteger nullable

Time in seconds that the driver is expected to spend at the location when fulfilling the order

product_typestring[] nullable

List of customer provided product/service types used when matching orders to a driver

type'pick' | 'drop' | 'null' nullable

Field to specify if the order is a pick/drop

type_indexinteger nullable

Field to specify if the order is a pick/drop

capacity_usedinteger nullable

Volumetric unit occupied by the order

distanceinteger nullable

Total distance in meters travelled by the driver to reach the order location

durationinteger nullable

Total time in seconds spent on the order.

share_urlstring nullable

Shareable URL for the consumer to track the live movement of the drive after the order is dispatched

embed_urlstring nullable

Embeddable URL for the ops team to view order timeline

route_handlestring nullable

Unique identifier for the route

plan_idstring nullable

Unique identifier of the plan

planning_failure_reasonstring nullable

Reason explaining why automated planning left the order unplanned. Present only when a planning attempt could not assign the order.

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

Value representing whether the order is tracked in flex, on_time, on_shift, full_shift or pre_shift mode

actual_service_timeinteger nullable

Time in seconds that the driver is actually spent at the location when fulfilling the order

tracked_service_timeinteger nullable

Total time tracked in seconds for the driver at the location when fulfilling the order

deviation_from_destinationinteger nullable

Distance in meters between the actual completion location to the order location

completed_at_destinationboolean nullable

Indicates whether the order was completed at destination

cancelled_at_destinationboolean nullable

Indicates whether the order was cancelled at destination

visited_destinationboolean nullable

Indicates whether the driver visited the destination

tracking_ratenumber nullable

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

imagesstring[] nullable

List of URLs to be used to retrieve images associated with the order

order_scorenumber nullable
time_to_first_eventnumber nullable

Time in seconds to receive first location after device's tracking is initiated for the route

time_to_first_locationnumber nullable

Time in seconds to receive first event after device's tracking is initiated for the route

worker_namestring nullable

Name of the worker to whom order is assigned.

device_switch_modeunknown
place_handlestring nullable

Unique customer provided identifier of the place

priorityunknown

Changes

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