The initial dispatch notification that a new job is available which needs validated as being deliverable
Webhook called to validate if drivers are available and check if it's possible to deliver one or multiple orders. You will receive this request for every order that is placed for delivery.
Request parameters
Parameter | Meaning | Type |
---|---|---|
jobId | Deliverect delivery job ID. | string |
pickupTime | Expected pick up time. | string |
pickupLocation | Order pick up location. | object |
deliveryLocations | Array of delivery locations. | array (object) |
deliveryLocations.orderId | Deliverect order ID. | string |
deliveryLocations.channelOrderDisplayId | Channel order ID. | string |
deliveryLocations.deliveryTime | Expected delivery time. | string |
deliveryLocations.packageSize | Package size (not provided for all channel orders) | string |
deliveryLocations.phoneAccessCode | PhoneAccessCode if available from channel, field will be present only if value is not None. | string |
deliveryLocations.payment.orderIsAlreadyPaid | Indicates if order has been paid already. | bool |
deliveryLocations.payment.amount | Payment amount. | integer |
deliveryLocations.payment.paymentType | Payment type. | integer |
deliveryLocations.payment.paysWith | Customer pays with specified amount of money. Can be used to calculate change. | integer |
Response parameters
Parameter | Meaning | Type |
---|---|---|
jobId | Deliverect delivery job ID. | string |
canDeliver | Indicates if delivery partner able complete delivery job. | bool |
distance | Indicates the distance for the delivery | int |
pickupTimeETA | Estimated pick up time. | string |
price | This is the cost charged for delivery. | object |
price.price | Delivery cost (1000 stands for 10.00). | integer |
price.taxRate | Tax rate for delivery - 10000 stands for 10.00% (if not applicable send 0) | integer |
courierId | This is the unique identifier of the rider. | string |
externalJobId | Job id in delivery partner system. | string |
deliveryLocations.deliveryId | Id of the delivery generated by delivery partner. | string |
deliveryLocations.orderId | Deliverect order ID. | string |
deliveryLocations.deliveryTimeETA | Estimated delivery up time. | string |
Transport types
The following transport types are supported by deliverect.
Transport Type Name | String Value |
---|---|
UNKNOWN | unknown |
BICYCLE | bicycle |
CARGOBIKE | cargobike |
MOTORBIKE | motorbike |
MOTORBIKE XL | motorbikexl |
CAR | car |
Package sizes
Package size support is limited
Not all channels will provide the below variations on package size
The following package sizes are supported by deliverect.
Package Size Name | String Value | Dimensions | Description |
---|---|---|---|
UNKNOWN | unknown | unknown | unknown |
SMALL | small | 22 x 42 x 45 cm | Standard delivery with a Courier on a bicycle or scooter. |
LARGE | large | 30 x 124 x 80 cm | Delivery which will require to be delivered via car |
EXTRA LARGE | extraLarge | Larger than 30 x 124 x 80 cm | For large catering orders with many different trays to be delivered requiring a van |
Payment info
Along with delivery location info, we send payment information. This contains if the order is paid for, the amount of payment, and the payment type. See the table below for payment types currently supported by Deliverect.
Payment Type Name | Integer Value |
---|---|
Credit card online | 0 |
Cash | 1 |
On Delivery | 2 |
Online | 3 |
Credit Card at Door | 4 |
PIN at Door | 5 |
Voucher at Door | 6 |
Cheque | 7 |
Ban Contact | 8 |
Other | 9 |
Error codes
If delivery is not possible, one or more of the following error codes are expected to be returned in the response.
Deliverect error tag | Description | Integer Value |
---|---|---|
UNKNOWN | Unknown error occurred. | 0 |
INTERNAL ERROR | Internal error occurred. | 5 |
PACKAGE SIZE TOO LARGE | Package is too big to be delivered. | 10 |
INVALID PACKAGE SIZE | Provided package size is invalid. | 15 |
NO DRIVERS AVAILABLE | No drivers available. | 20 |
INVALID DELIVERY DATA | Provided data is not valid. | 25 |
OUTSIDE DELIVERY AREA | Pickup or drop off location is outside delivery zone. | 30 |
TOO MANY PACKAGES | Too many packages within a delivery job. | 40 |
DELIVERY ADDRESS NOT RECOGNIZED | Delivery address is not recognized. | 50 |
PICKUP ADDRESS NOT RECOGNIZED | Pickup address is not recognized. | 60 |
UNKNOWN DELIVERY JOB | Job with provided ID not found of doesn't exist. | 70 |
CONTACT DATA INVALID | Invalid contact person data. | 80 |
INVALID COORDINATES | Provided coordinates is not valid. | 90 |
TIME NOT ALLOWED | Pickup or delivery time is not allowed. | 100 |
PAYMENT DECLINED | Payment declined. | 110 |
DUPLICATE JOB | Delivery job already exists. | 120 |
CANNOT TRAVEL TO DELIVERY | Drop off locations is not reachable. | 130 |
CANNOT CANCEL | Cancel is not possible. | 140 |
DATE FORMAT ERROR | Invalid date format. | 150 |
CONFIGURATION ERROR | Delivery system settings misconfigured | 160 |
PARTNER_UNAVAILABLE | Communication with partner not established | 170 |
{
"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
}
Here is an example of a response from your side.
{
"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": "",
"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"
}
]
}
Required parameters
All parameters shown in the response payload are required. Missing out will result in the create call request not to be triggered.
deliveryId
When validating an order and accepting a job, there is no necessity to provide the deliveryId which will be used if the job is assigned.
This deliveryId be required when responding to the 'Create Delivery Job' webhook.
phoneAccessCode
The parameter is optional and of type string . It will be only sent to dispatch partners in the payload if valid value is received in the order.