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
  • pickupTime required for future orders (if this value is not provided, current time will be used as pickupTime).

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": "61bcc34f657cc48c23eb60d5",
  "pickupTime":"2023-05-17T09:50:00Z",
  "deliveryLocations": {
    "deliveryTime": "2023-05-17T10:00:00Z",
    "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": {. 
      "coordinates": [
        -113,
        53
      ]
    }
  }
}
{
  "channelLinkIds": ["61bcc34**57cc48c23eb65", "61bcc34f657cc**c23eb6a"],
  "deliveryLocations": {
    "deliveryTime": "2023-05-17T10:00:00Z",
    "name": "John Doe",
    "street": "Stationsstraat 79e",
    "city": "Amersfoort",
    "country": "The Netherlands",
    "postalCode": "3811 MH",
    "phone": "+31678776787",
    "coordinates": {
      "coordinates":
        [ 9.124598503112793, 
        45.50004196166992 ]
    }
  }
}

👍

Longitude and Latitude (mandatory)

First position is Longitude , second position is Latitude

👍

postalCode

Using the "postalCode" field is mandatory.

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
}
{         
        "channelLinkIds": ["61bcc34**57cc48c23eb65"],
        "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
Credentials
OAuth2
Click Try It! to start a request and see the response here!