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

Use the Dispatch Availability endpoint to verify whether a dispatch partner can perform a delivery before you submit the order.

If dispatch is available, the response includes a validationId. Use this validationId when you create the order.

API reference

Refer to our API reference for detailed specifications regarding this endpoint.

Validate dispatch partner availability

  1. Send a POST request to the validation endpoint.
  2. Include the required request information:
    • channelLinkId
    • Delivery location details, including 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
      ]
    }
  }
}

Handle the validation request

A successful validation response includes:

  • An available flag set to true, which means a dispatch partner is available for the specified delivery.
  • A validationId, 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

Use the validationId for order creation

When you submit an order through our Create Order API, include the validationId in the request payload.

🚧

Delivery location

Any separate delivery location information sent during order creation is ignored. Deliverect uses the delivery location information from the original dispatchAvailability request.



Did this page help you?