Dispatch Availability

Channel integration can use this endpoint to validate if a Dispatch partner is available to carry out the delivery before submitting your order.

📘

Pre-Requisite

Dispatch needs to be enabled and configured for the channel to use the endpoint.

This endpoint allows the channel integration to validate if a Dispatch partner is available to carry out the delivery before submitting the actual order. The endpoint will be open to all partners to integrate. Each call will require the below information:

  • channelLinkId of where the order is being placed
  • Delivery address inclusive of source and coordinates if possible
  • deliveryTime expected for the order

Optional parameter packageSize definition (default = unknown)

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.

Error Status:
Supported statues in addition to network errors:

Status NameInteger Value
Success. Dispatch partner is requested.200
Bad request400
ChannelLinkId sent is not linked to the account403
ChannelLinkId sent is not found404
Unauthorized401

📘

NOTE

Please note, that even if status 200 is received, the parameter "available" determines whether a dispatch partner is available to accept the job.

Below are examples.

{      
  "channelLinkId": "6220a********21257f",
  "deliveryLocations": 
  		{
        "deliveryTime": "2022-08-08T11:00:00Z",
        "packageSize": "unknown",
        "name": "customer name",
        "source": "customer address",
        "street": "12a Amersfoort street",
        "postalCode" : "1028 EN",
        "area" : "townhall",
        "extraAddressInfo" : "near the door",
        "phone": "+111111111",
        "coordinates": {"coordinates": [-113,53]}
      }
}
{
        "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
}
{
  "available": False, 
  "errors": "No valid offers available"
}
{
    "code": "token_expired",
    "description": "token is expired"
}

If the validation is successful and the available flag is set "true" , the validationId returned in the response is valid for 10 minutes. This validationId can be used by the ChannelIntegrations to send the orders using the existing Create Order API , which is now extended with the optional parameter to support the validationID.

📘

NOTE

If separate deliveryLocations is sent during the order creation with validationID it will be ignored and the deliveryLocations used in the dispatchAvailability request will be used.

Language
Authorization
OAuth2
Click Try It! to start a request and see the response here!