Validate Dispatch Availability
Introduction
The Dispatch Availability endpoint is crucial to ensure the smooth processing of delivery orders through your channel integration. 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.
Validation endpoint
The Dispatch Availability endpoint allows your channel integration to verify whether a dispatch partner can perform a delivery before submitting an order. This is a crucial step in ensuring that deliveries are successfully fulfilled.
API reference
Refer to our API reference for detailed specifications regarding this endpoint.
Validate 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
- Details about the delivery location: 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
You will receive a response if the validation request is successful, which includes:
- An
available
flag set to "true," indicating that a dispatch partner is available for the specified delivery. - A
validationId
in the response (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
validationId
for order creationWhen 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 12 months ago