WebhooksGeotags, Geofences & Trips
Trip
Webhook payload sent for events of the legacy Trips flow.
[
{
"created_at": "2019-07-01T14:00:00.000000Z",
"data": {
"value": "created",
"trip_id": "123E4567-E89B-12D3-A456-426655440000",
"trip_metadata": { "customer": "1234" }
},
"device_id": "00112233-4455-6677-8899-AABBCCDDEEFF",
"type": "trip",
"version": "2.0.0"
}
]For the legacy Trips flow, trip events are sent whenever the following occur. For new order-tracking integrations, start with Track Work and the order webhook payloads.
- a new trip is created successfully
- a device enters or exits a trip destination
- a trip with a scheduled arrival time is estimated to be delayed
- a trip is completed successfully and a summary is available
- when there is change in ETA (change in minutes described as integer)
Trip start and completion webhooks do not have a "recorded_at" property because the recording time equals the creation time due to server-side operations.
| Name | Type | Description |
|---|---|---|
| data.value | string | One of: created, destination_arrival, destination_exit, delayed, first_eta, eta_change or completed |
| data.trip_id | string | Unique identifier of the trip, case sensitive |
| data.trip_metadata | Object | Metadata that you have assigned to this trip (optional) |
| data.arrive_at | string | Timestamp with new arrived date, only available if value is delayed |
| data.remaining_duration | int | Time remaining (in seconds) as per ETA calculations, only available if value is eta_change or first_eta |
| data.remaining_distance | int | Distance remaining (in meters) as per ETA calculations, only available if value is eta_change or first_eta |
| data.destination_id | string | Unique identifier of the trip destination, case sensitive (Only available for trips with multiple orders) |
| data.destination_metadata | Object | Metadata that you have assigned to the trip destination (Only available for trips with multiple orders) |
| data.duration | int | Duration of trip (in seconds), only available if value is completed |
| data.distance | int | Distance travelled during trip (in meters), only available if value is completed |
| data.duration_at_destination | int | Duration spent at the destination before trip completion, only available if value is completed |