How to validate dispatch availability
Introduction
Use the Dispatch Availability endpoint to verify whether a dispatch partner can perform a delivery before you submit an order. This guide provides information on activating dispatch, validating dispatch partner availability, and effectively using the obtained validationId to submit orders.
Activate and Configuring Dispatch
Before utilizing the Dispatch Availability endpoint, it's essential to ensure that dispatch is activated and correctly configured for your channel integration. We can set up a mock dispatch configuration for testing in our staging environment.
If you plan to implement this endpoint, contact our API team at [email protected] to configure this for your staging account.
Validate dispatch partner availability
- Send a POST request to the validation endpoint.
- Include the required request information:
- channelLinkId
- Delivery location details, including delivery time, package size, customer information, and coordinates, if available.
{
"channelLinkId": "62********************7c",
"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
]
}
}
}Handle the validation request
A successful validation response includes:
- An
availableflag set totrue, which means a dispatch partner is available for the specified delivery. - A
validationIdto set within the order creation process (valid for 10 minutes)
{
"validationId": "62********************7c",
"available": true,
"expiresAt": "YYYYY-MM-DDTHH:mm:ss.SSSSSSZ",
"deliveryTimeETA": "YYYYY-MM-DDTHH:mm:ss.SSSSSSZ",
"pickupTimeEta": "YYYYY-MM-DDTHH:mm:ss.SSSSSSZ",
"price": 0
}Use the validationId for order creation
validationId for order creationWhen you submit an order through our Create Order API, include the validationId in the request payload.
Updated 13 days ago
