Dispatch Availability

Purpose

Pre-validate if an integrated Dispatch partner has available couriers to handle a delivery before placing an order. This enables platforms without their own delivery integrations to route orders through Deliverect’s Dispatch network.

Requires Integrated Dispatch: a Dispatch provider needs to be integrated with a customer location for this endpoint to return courier availability.

Request Example

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.

{
    "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
        }
    }
}

Request parameters

See the full Dispatch availability model below:

Response Example

{
    "validationId": "62********************2b",
    "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
}
{
    "channelLinkIds": [
        "62********************7c"
    ],
    "validationId": "62********************2b",
    "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
}
{
  "available": False, 
  "errors": "No valid offers available"
}

⚠️ Dispatch Availability Response Handling

A 200 OK response only confirms that your request was successful; it does not confirm Dispatch availability. Always check the available flag in the response.

Validation Id

A successful response where "available": true, will also include a"validationId" which is a unique ID (valid for 10 minutes) to be used when creating an order

Include the validationId in the Create Order request, as detailed in the section below;

⚠️ Validation ID in Orders

When applying the validationId to an order, the originally validated address will be applied. 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.

Package Size

Optional parameter packageSize definition below (the default applied is 'unknown')

ℹ️ Package Sizing Support

Please note that not all Dispatch providers have the capability to adjust transport according to size requirements. Verify with Deliverect that the Dispatch provider being used supports receiving packageSize.

Package Size NameString ValueDimensionsDescription
SMALLsmall22 x 42 x 45 cmStandard delivery with a Courier on a bicycle or scooter.
LARGElarge30 x 124 x 80 cmDelivery is necessary by car or van.
EXTRA LARGEextraLargeLarger than 30 x 124 x 80 cmFor large catering orders with many different trays to be delivered with a van.

Body Params
string
required
deliveryLocations
object
required
string
required
Responses

Language
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json