You can use webhooks to 'listen' to events from our platform. The following webhook triggers are currently available:
Order completed
Batch has been dispatched
In order to set up webhooks, navigate to 'Account' and then 'Webhooks'. More information about how webhooks work can be found in our developer's guide.
Order completed
An event is sent when the order is marked as 'Completed' in our Last Mile Platform. The order can have different status codes, such as:
Delivered
Unable to deliver
Missing goods
Webhook response
{
"id" : "60f4a9e795b3bf0ba7c5c7b0",
"externalRef" : ”A1",
"stopNumber" : 30,
"status" : "Delivered outside",
"estimatedTimeUTC" : "2023-01-21T15:21:47.000Z",
"timeArrivedUTC" : "2023-01-21T15:30:06.887Z",
"timeDeliveredUTC" : "2023-01-21T15:32:06.887Z",
"deliveryGroup" : ”Gordon Store",
"deliveryGroupId" : "5e29a7e06f2635ea9fbb6678",
}
Batch has been dispatched
An event is sent when a route optimization batch has been approved and dispatched to 'Activity'.
Webhook response
{
"name": "Batch 1",
"deliveryDate": "2023-01-21 12.00:00",
"routes": [
{
"id": "123",
"routeName": "Route 1",
"deliveryDate": "2023-01-21 12.00:00",
"status": "Routed",
"estimatedLoadingStartTimeUTC": "2023-01-21 13.00:00",
"estimatedStartTimeUTC": "2023-01-21 13.15:00",
"estimatedEndTimeUTC": "2023-01-21 17.00:00",
"estimatedReturnTimeUTC": "2023-01-21 17.30:00",
"orders": [ ... ]
}
]
}