Dispatch Availability

📘

Pre-Requisite

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

👍

Mandatory Delivery Information

In order to ascertain the most accurate delivery information a full delivery address including coordinates and postal code must be sent.

🚧

Check availability for multiple stores (currently in beta)

An array of channelLinkIds can be provided to determine the best possible pickup location for a specific delivery, based on price and distance.

Please check the second example on the right hand side named "Validate Delivery - multiple pickupLocations".

"channelLinkIds": ["61bcc34f657cc48c23eb60d5","61bcc34f657cc48c23eb602a]

When providing the array"channelLinkIds", the "channelLinkId" field will be disregarded.

The "channelLinkId" selected will be included on the response to the call for multiple locations.

This endpoint allows the aggregator 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.

The parameters marked with an asterisk (*) are required :

ParameterMeaningtype
channelLinkId* or
channelLinkIds*
Unique identifier(s) of the channel(s) (merchant store) in Deliverect.

e.g. "channelLinkIds": ["61bcc34f657cc48c23eb60d5","61bcc34f657cc48c23eb602a]
string/ array
deliveryLocations*Object containing the address for the delivery including coordinatesobject
deliveryLocations.deliveryTime*Expected time for the delivery of the order (UTC)
Time format is in UTC yyyy-MM-ddTHH:mm:ssZ (all time values in our API are in UTC time as per ISO8601).

If the deliveryTime is less than 30 minutes from now, Deliverect will assume it is an ASAP order request.
string
deliveryLocations.street*This includes the street number where provided e.g. "Stationsstraat 79e"string
deliveryLocations.postalCode*e.g. "3811MH"string
deliveryLocations.city*e.g. "Amersfoort"string
deliveryLocations.coordinates*Object containing longitude and latitude expressed as below;

"coordinates": { "coordinates": [ 9.124598503112793, 45.50004196166992 ] }
object
deliveryLocations.countrye.g. "The Netherlands"string
deliveryLocations.streetNumberIf the number has already been included on the "street" field, it should not be repeated here.
e.g." 79e"
str

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":"61bcc34**57cc48c23eb65",
  "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 ]
    }
  }
}
{
  "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 ]
    }
  }
}

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 are sent during the order creation with validationID it will be ignored and the deliveryLocations used in the dispatchAvailability request will be used.

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