Validate Delivery Job

Purpose

The initial dispatch notification that one or multiple delivery jobs are needing validated as being deliverable i.e. a Courier is available for the provided delivery job specification.

The Validate Webhook URL needs to be standardised, i.e. the same URL should be used for every customer installation.

Request Parameters

See full list of order attributes below;

Request Example

{
  "jobId": "62*****************9a",
  "account": "60***************33",
  "pickupTime": "YYYY-MM-DDTHH:mm:ss.SSSSSSZ",
  "transportType": "unknown",
  "driverTip": 500,
  "pickupLocation": {
    "location": "60*******************b1",
    "name": "Location 1",
    "remarks": "",
    "street": "West 34th Street",
    "streetNumber": "350",
    "postalCode": "10001",
    "city": "New York",
    "latitude": "40.7505045",
    "longitude": "-73.9964267"
  },
  "deliveryLocations": [
    {
      "orderId": "62*******************37",
      "channelOrderDisplayId": "",
      "deliveryTime": "YYYY-MM-DDTHH:mm:ss.SSSSSSZ",
      "packageSize": "unknown",
      "orderDescription": "This is a test order",
      "company": "",
      "name": "",
      "street": "Flatbush Avenue",
      "postalCode": "11201",
      "city": "Brooklyn",
      "phone": "",
      "phoneAccessCode": "43121212",
      "latitude": "40.6912345",
      "longitude": "-73.9812345",
      "deliveryRemarks": "",
      "payment": {
        "orderIsAlreadyPaid": true,
        "amount": 800,
        "paymentType": 0
      }
    }
  ],
  "ageCheck": false
}

Error codes

If delivery is not possible, one or more of the following error codes are expected to be returned in the response;

Delivery Address Coordinates
In the rare event that the coordinates are not included in the payload, you should still validate the delivery job, as the delivery address details are always provided.

Response

Below is an examples of the expected response from the dispatch platform;

Required Parameters
All parameters shown in the response model are required. Omitting any of these parameters will prevent the Create Delivery Job request from being triggered

{
  "jobId": "62*****************9a",
  "canDeliver": true,
  "distance": 10,
  "pickupTimeETA": "2022-05-10T14:47:31.649000Z",
  "deliveryLocations": [
    {
      "deliveryId": "AB**67",
      "orderId": "62*******************37",
      "deliveryTimeETA": "2022-05-10T14:57:31.649000Z"
    }
  ],
  "price": {
    "price": 750,
    "taxRate": 10000
  }
}
{
  "jobId": "651******************22a",
  "canDeliver": false,
  "errors": [
    {
      "deliveryId": "J****FI",
      "orderId": "651******************215",
      "channelOrderDisplayId": "",
      "reason": 20,
      "description": "No drivers available at this time"
    }
  ]
}

Response Parameters

All parameters shown in the response payload are required. Missing out will result in the create call request not to be triggered, see full list delivery model in link below;

Body Params
string
string
date-time
string
integer
pickupLocation
object
deliveryLocations
array of objects
deliveryLocations
boolean
Responses

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