Purpose
The initial dispatch notification that one or multiple delivery jobs are neeeing validated as being deliverable e.g. a Courier is available for the provided delivery job specification.
ℹ️ Standardised Cancel Webhook URL
The Validate Webhook URL needs to be standardised, i.e. the same URL should be used for every customer installation.
Request Parameters
See full list of order attributes below;
Request Example
{
"jobId": "627a6f4c2*****3fbc79a",
"account": "60f15a8***069643633",
"pickupTime": "2022-05-10T14:12:31.649000Z",
"transportType": "unknown",
"driverTip": 500,
"pickupLocation": {
"location": "60f15a8e9****ddceb6a7b1",
"name": "Location 1",
"remarks": "",
"street": "Van Slingelandtstraat",
"streetNumber": "32",
"postalCode": "1051CH",
"city": "Amsterdam",
"latitude": "52.3842918",
"longitude": "4.8662024"
},
"deliveryLocations": [
{
"orderId": "627a6f*****5c09221a9837",
"channelOrderDisplayId": "T191051",
"deliveryTime": "2022-05-10T14:27:31.649000Z",
"packageSize": "unknown",
"orderDescription": "This is a test order",
"company": "",
"name": "",
"street": "4 The Krook",
"postalCode": "8888KL",
"city": "Gent",
"phone": "",
"phoneAccessCode" : "43121212",
"latitude": "29.37045479999999",
"longitude": "47.9787778",
"deliveryRemarks": "",
"payment": {
"orderIsAlreadyPaid": true,
"amount": 800,
"paymentType": 0
}
}
],
"ageCheck": False
}Error codes
If delivery is not possible, one or more of the following error codes are expected to be returned in the response;
🚧 Delivery Address Coordinates
In the rare event that the coordinates are not included in the payload, you should still validate the delivery job, as the delivery address details are always provided.
Response
Below is an examples of the expected response from the dispatch platform;
⚠️ Required Parameters
All parameters shown in the response model are required. Omitting any of these parameters will prevent the
Create Delivery Job request from being triggered.
{
"jobId": "627a6f4c2*****3fbc79a",
"canDeliver": true,
"distance":10,
"pickupTimeETA": "2022-05-10T14:47:31.649000Z",
"deliveryLocations": [
{
"deliveryId": "ABC567",
"orderId": "627a6f*****5c09221a9837",
"deliveryTimeETA": "2022-05-10T14:57:31.649000Z"
}
],
"price": {
"price": 750,
"taxRate": 10000
}
}{
"jobId": "651******************22a",
"canDeliver": false,
"errors": [
{
"deliveryId": "J****FI",
"orderId": "651******************215",
"channelOrderDisplayId": "T1***51",
"reason": 20,
"description": "No drivers available at this time"
}
]
}{
"jobId": "",
"canDeliver": false,
"errors": [
{
"deliveryId": "",
"orderId": "",
"channelOrderDisplayId": "",
"reason": 10,
"description": "package size too large for delivery type"
},
{
"deliveryId": "",
"orderId": "",
"channelOrderDisplayId": "",
"reason": 20,
"description": "No drivers available at this time"
},
{
"deliveryId": "",
"orderId": "",
"channelOrderDisplayId": "",
"reason": 30,
"description": "address outside of delivery area"
},
{
"deliveryId": "",
"orderId": "",
"channelOrderDisplayId": "",
"reason": 40,
"description": "too many packages for selected transport type"
}
]
}Response Parameters
All parameters shown in the response payload are required. Missing out will result in the create call request not to be triggered, see full list delivery model in link below;
