WebhooksRoutes
Route Estimate Generated
Webhook payload sent when HyperTrack calculates an estimate for a route.
Route Estimate Generated 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":"route",
"data":{
"value":"estimate_generated",
"route_handle":"4359cc65-90dd-4b2b-875b-26e6d2eba11d",
"status":"assigned",
"embed_url":"https://embed.hypertrack.com/trips/4359cc65-90dd-4b2b-875b-26e6d2eba11d?publishable_key=lujVNBunxFFHBQ2gk980UqQ3KQemmKRsqlATo4nes959pKEo9nAqxv60Sk1r1HR_KSpdZ0feR4FLajKuw",
"estimate":{
"distance": 7382,
"duration": 1263,
"start_by": "2021-01-01T14:05:00.000Z"
},
"reason": "order_completed",
"metadata":{
"storeId":"123490809808",
"customerName":"Andrew"
}
},
"version":"3.0.0"
}
]| Name | Type | Mandatory | Description |
|---|---|---|---|
| data.value | string | Yes | estimate_generated |
| data.route_handle | string | Yes | Unique identifier of the route |
| data.status | string | Yes | Status of the route - planned |
| data.metadata | object | No | Metadata that you have assigned to this route |
| data.embed_url | string | Yes | Embeddable url of the route to provide real time visibility of worker on route to fulfil the batch of orders |
| data.estimate | object | Yes | Object containing the estimate metrics for the route |
| data.estimate.distance | int | Yes | Estimated total distance in meters to be travelled by the worker to fulfil the orders |
| data.estimate.duration | int | Yes | Estimated total duration in seconds it would take for the worker to fulfil the orders |
| data.estimate.start_by | timestamp | Yes | Estimated start time for the route to ensure all orders are fulfilled within the provided order scheduled times |
| data.reason | string | No | String representing why estimate for a route is generated |