Validating Dispatch Availability
The Dispatch Availability endpoint is a crucial step in ensuring the smooth processing of delivery orders through your channel integration. This article provides you with detailed information on how to enable Dispatch, validate Dispatch partner availability, and use the obtained "validationId" to submit orders effectively.
Enabling and Configuring Dispatch
Before utilizing the Dispatch availability endpoint, it's essential to ensure that Dispatch is enabled and correctly configured for your channel integration. For your testing in our staging environment, we can set up a mock Dispatch configuration. If you plan to implement this endpoint, reach out to our API team inbox, [email protected] to configure this for your staging account.
Understanding the Validation Endpoint
The Dispatch availability endpoint allows your channel integration to verify whether a Dispatch partner is available to carry out a delivery before you submit an actual order. This is a crucial step in ensuring that deliveries can be successfully fulfilled.
API Reference
For detailed specifications regarding the Dispatch Availability Endpoint, please refer to our API reference.
Validating Dispatch Partner Availability
To validate Dispatch partner availability, follow these steps as described in the API reference:
-
Send a POST request to the validation endpoint with the required information, including:
channelLinkId
: Your channel's unique identifier.- Delivery location details, such as delivery time, package size, customer information, and coordinates (if available).
{
"channelLinkId": "61bcc34f657cc48c23eb60d5",
"deliveryLocations": {
"deliveryTime": "2023-05-17T10:00:00Z",
"packageSize": "unknown",
"name": "customer name",
"source": "customer address",
"street": "customer street and number",
"postalCode": "postal code",
"phone": "+111111111",
"coordinates": {
"coordinates": [
-113,
53
]
}
}
}
Handling the validation request
If the validation request is successful, you will receive a response with the following:
- An "available" flag set to "true," indicating that a Dispatch partner is available for the specified delivery.
- A "validationId" will be included in the response, which is valid for 10 minutes.
{
"validationId": "6317******4b5efe",
"available": true,
"expiresAt": "2022-09-06 10:24:25.445709",
"deliveryTimeETA": "2022-08-08 11:00:00",
"pickupTimeEta":"2022-08-08 10:00:00",
"price": 0
}
Using the "validationId" for Order Creation
When you submit orders through our Create Order API make sure to include the "validationId" in the payload.
Delivery location
Please note that any separate delivery location information sent during order creation will be ignored. Instead, the delivery location information used in the original dispatchAvailability request will be used.
Updated 2 months ago