Dispatch Availability

For platforms who don't directly handle delivery or aren't currently offering this order type, Deliverect allows for an order to be routed to an integrated 'Dispatch' service after first validating if a Dispatch partner is available.

📘

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. This is dependant on the Deliverect customer having one or more of our integrated Dispatch Partners connected.

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.

📘

ASAP Delivery?

If your customer wants their delivery as soon as possible, send the "deliveryTime" within 30 minutes of your request.

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.

Example request:

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

👍

Longitude and Latitude

First position is Longitude , second position is Latitude

Example response:

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

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. Please ensure a valid address is sent on delivery creation.

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