Cancel Order
Cancel an order identified by the given order_handle. A cancelled order means that the shift did not occur as planned. Send cancellation_reason to say why, the worker's timesheets when the worker came and was sent home, and additional metadata (merged with the stored metadata), for example the handle of the order that replaces this one. The timesheets replace all stored customer timesheet entries; the HyperTrack location entry stays. An empty body cancels the order as before.
A completed order can be cancelled with a cancellation_reason not more than 7 days after completed_at. The status then changes from completed to cancelled, completed_at becomes null, and a cancelled webhook is sent. Without a cancellation_reason, or after 7 days, the response is 409.
In: header
Path Parameters
Query Parameters
Type of the order which can be drop or pick
Integer representing the pick or drop order index when having a pick/drop scenario
The attempt number for fulfilling the order
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/orders/string/cancel" \ -H "Content-Type: application/json" \ -d '{ "cancelled_at": "2026-10-14T15:30:00Z", "cancellation_reason": "no_show", "metadata": { "replacement_order_handle": "IW-88213", "note": "no contact after 2 calls" } }'{ "order_handle": "order-1", "fulfillment_attempt": 0, "status": "cancelled", "destination": { "geometry": { "type": "Point", "coordinates": [ -121.8610066, 37.3263062 ] }, "address": "748 Story Rd, San Jose, CA 95112", "radius": 100 }, "ops_group_handle": "store-sf", "track_mode": "full_shift", "plan_mode": "manual", "risks": { "moving_away_from_destination": "green", "is_offline": "green", "delayed_from_scheduled_at": "green", "deviating_from_expected_route": "green", "moving_too_slow": "green", "in_outage": "green", "delayed_from_initial_eta": "green", "in_low_battery": "green" }, "scheduled_at": "2023-10-26T02:30:00.000Z", "started_at": "2023-10-26T01:28:22.016Z", "type": "drop", "type_index": 0, "expected_service_time": 0, "actual_service_time": 0, "tracked_service_time": 0, "capacity_used": 1, "metadata": { "customerID": "12654", "replacement_order_handle": "order-1-replacement", "note": "no contact after 2 calls" }, "cancellation_reason": "no_show", "region": { "country": "United States", "city": "San Jose", "state": "California" }, "share_url": "https://trck.at/gv2oZRGKqB", "cancelled_at": "2023-10-26T01:37:03.650Z", "disabled_at": "2023-10-26T01:32:43.721Z", "device_id": "52193948-1A79-47CC-AB81-2FB0A59536D1", "worker_handle": "James", "created_at": "2023-10-25T17:54:42.233Z", "assigned_at": "2023-10-26T01:27:40.170Z", "route_handle": "812a1ea5-8c1e-407a-ba24-6cc46d783fef", "plan_id": "0f3415f2-63b7-4727-83d2-010e88b48715", "distance": 0, "duration": 520, "polyline": { "type": "LineString", "coordinates": [ [ -121.877261, 37.371918, 24.98, "2023-10-26T01:28:23.916Z" ], [ -121.877261, 37.371918, 24.98, "2023-10-26T01:28:24.045Z" ], [ -121.877246, 37.371916, 24.49, "2023-10-26T01:29:24.055Z" ], [ -121.877246, 37.371916, 24.49, "2023-10-26T01:31:24.080Z" ], [ -121.877246, 37.371916, 24.49, "2023-10-26T01:34:24.103Z" ] ] }, "start_location": { "type": "Point", "coordinates": [ -121.877261, 37.371918 ] }, "end_location": { "type": "Point", "coordinates": [ -121.877246, 37.371916 ] }, "visited_destination": false, "cancelled_at_destination": false, "timeline": [ { "type": "driver_order_created", "recorded_at": "2023-10-25T17:54:42.233Z", "order_handle": "order-2", "driver_handle": "James" }, { "type": "driver_order_assigned", "recorded_at": "2023-10-26T01:27:40.170Z", "order_handle": "order-2", "driver_handle": "James" }, { "type": "driver_order_cancelled", "recorded_at": "2023-10-26T01:37:03.650Z", "order_handle": "order-2", "driver_handle": "James" } ]}{ "title": "string", "detail": "string"}{ "code": "string", "title": "string", "detail": "string"}{ "code": "string", "title": "string", "detail": "string"}