This endpoint checks if a connected Dispatch partner is available to fulfil a delivery job before submitting an order. It enables platforms without built-in delivery capabilities to route orders through Deliverect's integrated Dispatch services.
A Dispatch provider needs to be integrated in a customer location for this endpoint to return courier availability
Dispatch Availability Request
To check the availability of an integrated Dispatch provider, submit a pre-validation request as shown below with a full delivery address including coordinates and postal code. The response will then include:
"available": true/false
if a Dispatch partner is available"validationId"
a unique ID (valid for 10 minutes) to be used when creating the order
Include the validationId in the Create Order request, as detailed in the section below.
⚠️ A 200 OK response only confirms your request was successful, it does not confirm Dispatch availability. Always check the "available"
flag in the response.
When using
validationId
in the order creation endpoint, Deliverect will always use the originally validated address. To update to a new address, set validationId
to null
to trigger a new validation with the Dispatch provider.
Check availability for multiple stores
An array of channelLinkIds
like below can be provided to determine the best possible pickup location for a specific delivery, based on price and distance.
In the second example on the right hand side "Validate Delivery - multiple pickupLocations". two stores are checked by their unique store identifier ((channel link Id) like in below snippet
The response confirms the best pickup location to set for the order
{
"pickupTime": "YYYY-MM-DDTHH:mm:ss.SSSSSSZ",
"deliveryLocations": {
"packageSize": "unknown",
"name": "customer name",
"phone": "+111111111",
"coordinates": {
"longitude": 3.73361,
"latitude": 51.03111
},
"deliveryTime": "YYYY-MM-DDTHH:mm:ss.SSSSSSZ",
"street": "customer street and number",
"city": "customer city",
"country": "customer country",
"postalCode": "postal code"
},
"channelLinkIds": [
"62********************7c",
"62********************7d"
]
}
{
"channelLinkIds": [
"62********************7d"
],
"validationId": "62********************3e",
"available": true,
"expiresAt": "YYYY-MM-DDTHH:mm:ss.SSSSSSZ",
"deliveryTimeETA": "YYYY-MM-DDTHH:mm:ss.SSSSSSZ",
"pickupTimeEta": "YYYY-MM-DDTHH:mm:ss.SSSSSSZ",
"price": 0
}
⚠️ When providing the array"channelLinkIds"
, the "channelLinkId"
field will be disregarded.
Request parameters
See the full Dispatch availability model below:
Package Size
Optional parameter packageSize
definition below (the default applied is 'unknown')
Please note that not all dispatch providers have the capability to adjust transport according to size requirements. Verify with Deliverect if the dispatch provided to be used supports receiving packageSize.
Package Size Name | String Value | Dimensions | Description |
---|---|---|---|
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 is necessary by car or van. |
EXTRA LARGE | extraLarge | Larger than 30 x 124 x 80 cm | For large catering orders with many different trays to be delivered with a van. |
Error Status:
Supported statues in addition to network errors:
Status Name | Integer Value |
---|---|
Success. Dispatch partner is requested. | 200 |
Bad request | 400 |
ChannelLinkId sent is not linked to the account | 403 |
ChannelLinkId sent is not found | 404 |
Unauthorized | 401 |
Example request:
{
"channelLinkId": "62********************7c",
"pickupTime": "YYYY-MM-DDTHH:mm:ss.SSSSSSZ",
"deliveryLocations": {
"deliveryTime": "YYYY-MM-DDTHH:mm:ss.SSSSSSZ",
"packageSize": "unknown",
"name": "customer name",
"street": "customer street and number",
"city": "customer city",
"country": "customer country",
"postalCode": "postal code",
"source": "customer address",
"phone": "+111111111",
"coordinates": {
"longitude": 3.73361,
"latitude": 51.03111
}
}
}
{
"channelLinkIds": [
"62********************7c",
"62********************7d"
],
"deliveryLocations": {
"deliveryTime": "YYYY-MM-DDTHH:mm:ss.SSSSSSZ",
"packageSize": "unknown",
"name": "customer name",
"street": "customer street and number",
"city": "customer city",
"country": "customer country",
"postalCode": "postal code",
"phone": "+111111111",
"coordinates": {
"longitude": 3.73361,
"latitude": 51.03111
}
}
}
Example response:
{
"validationId": "62********************2b",
"available": true,
"expiresAt": "YYYY-MM-DDTHH:mm:ss.SSSSSSZ",
"deliveryTimeETA": "2022-08-08 11:00:00",
"pickupTimeEta":"2022-08-08 10:00:00",
"price": 0
}
{
"channelLinkIds": ["62********************7c"],
"validationId": "62********************2b",
"available": true,
"expiresAt": "YYYY-MM-DDTHH:mm:ss.SSSSSSZ",
"deliveryTimeETA": "2022-08-08 11:00:00",
"pickupTimeEta":"2022-08-08 10:00:00",
"price": 0
}
{
"available": False,
"errors": "No valid offers available"
}