HyperTrackDocs
WebhooksOrdersLifecycle

Order Cancelled

Webhook payload sent when an order is cancelled.

Order Cancelled Webhook Payload

[
  {
   "created_at":"2021-01-01T14:01:00.000000Z",
   "recorded_at":"2021-01-01T14:00:00.000000Z",
   "device_id":"00112233-4455-6677-8899-AABBCCDDEEFF",
   "worker_handle": "Worker-1",
   "account_id":"6784e919-7168-4f61-b686-2020f547637f",
   "type":"order",
   "data":{
      "value":"cancelled",
      "order_handle":"DGC127092",
      "route_handle":"4359cc65-90dd-4b2b-875b-26e6d2eba11d",
      "distance":1834,
      "duration":408,
      "status":"cancelled",
      "cancellation_reason":"no_show",
      "share_url":"https://trck.at/vr1RNLq",
      "metadata":{
         "storeId":"123490809808",
         "customerName":"Andrew"
        }
     },
   "version":"3.0.0"
  }
]
NameTypeMandatoryDescription
data.valuestringYescancelled
data.order_handlestringYesUnique handle for the Order
data.route_handlestringCan be nullUnique identifier of the route containing the order
data.statusstringYesStatus of the order - cancelled
data.cancellation_reasonstringCan be nullWhy the shift did not occur as planned: no_show, worker_cancelled, client_cancelled, or other. null when you did not send a reason. More values can be added; accept values that you do not know. See Report the shift result
data.share_urlstringCan be nullContains tracking url of the order to provide real time visibility of worker on route of this order
data.metadataobjectNoMetadata that you have assigned to this order
data.distanceintCan be nullTotal distance travelled to fulfill the order. In case of no location data stream from the worker's device during the shift, distance will be set to null.
data.durationintCan be nullTotal time in seconds since order start. Can also be null in cases when there is no data sent from the worker's device.

A completed order can be cancelled with a cancellation_reason not more than 7 days after completed_at. You then get this webhook after the Order Completed webhook for the same order. See Cancel a completed order.