POST https://webhook.example.com

Webhook called to validate if drivers are available and check if it's possible to deliver one or multiple orders. You will receive this request for every order that is placed for delivery.

application/json

Body

Responses

  • 200 application/json

    200

    One of:
  • 422 application/json

    422

POST /validate_job
Request example
{
  "jobId": "627a6f4c2*****3fbc79a",
  "account": "60f15a8***069643633",
  "pickupTime": "2022-05-10T14:12:31.649000Z",
  "transportType": "unknown",
  "driverTip": 500,
  "pickupLocation": {
    "location": "60f15a8e9****ddceb6a7b1",
    "name": "Location 1",
    "remarks": "",
    "street": "Van Slingelandtstraat",
    "streetNumber": "32",
    "postalCode": "1051CH",
    "city": "Amsterdam",
    "latitude": "52.3842918",
    "longitude": "4.8662024"
  },
  "deliveryLocations": [
    {
      "orderId": "627a6f*****5c09221a9837",
      "channelOrderDisplayId": "T191051",
      "deliveryTime": "2022-05-10T14:27:31.649000Z",
      "packageSize": "unknown",
      "orderDescription": "This is a test order",
      "company": "",
      "name": "",
      "street": "4 The Krook",
      "postalCode": "8888KL",
      "city": "Gent",
      "phone": "",
      "phoneAccessCode": "43121212",
      "latitude": "29.37045479999999",
      "longitude": "47.9787778",
      "deliveryRemarks": "",
      "payment": {
        "orderIsAlreadyPaid": true,
        "amount": 800,
        "paymentType": 0
      }
    }
  ],
  "ageCheck": false
}
Response examples (200)
{
  "jobId": "627a6f4c2*****3fbc79a",
  "canDeliver": true,
  "distance": 10,
  "pickupTimeETA": "2022-05-10T14:47:31.649000Z",
  "deliveryLocations": [
    {
      "deliveryId": "",
      "orderId": "627a6f*****5c09221a9837",
      "deliveryTimeETA": "2022-05-10T14:57:31.649000Z"
    }
  ],
  "price": {
    "price": 750,
    "taxRate": 10000
  }
}
{
  "jobId": "651******************22a",
  "canDeliver": false,
  "errors": [
    {
      "deliveryId": "J****FI",
      "orderId": "651******************215",
      "chaelOrderDisplayId": "T1***51",
      "reaso": 20,
      "descriptio": "No drivers available at this time"
    }
  ]
}
Response examples (422)
{
  "error": "Unprocessable Content"
}