Order tracking

This webhook will be called when there are a tracking update on a vehicle. It will list all the orders that the vehicle have on it's task list, also them which have not been picked up yet, or have been delivered.

{
  "name": "orderTracking",
  "sent": "2018-04-13T12:38:07.064Z",
  "data": [
    {
      "vehicleId": "58c136a30f72205b78f70c6e",
      "nickname": "Wuxus Vehicle",
      "registryNumber": "WX 12 345",
      "vehicleType": "van",
      "driverId": "57c9417d5a32cb00119b83db",
      "driverName": "John Doe",
      "phone": {
        "prefix": 45,
        "number": 12345678
      },
      "position": {
        "lat": 55.738773,
        "lng": 12.398563,
        "updated": "2018-04-13T12:38:07.041Z"
      },
      "orders": [
        {
          "orderId": "5ad066886a9deecd679e6ac5",
          "orderNumber": "WUX-123-45678901",
          "requisition": "this-is-requisition-1",
          "tntKey": "dccd286c-8a17-4729-a499-6934d46930c1",
        },
        {
          "orderId": "5ad08f776a9deecd679e6c86",
          "orderNumber": "WUX-124-45678901",
          "requisition": "this-is-requisition-2",
          "tntKey": "dccd286c-8a17-4729-a499-6934d46930c2",
        }
      ]
    }
  ]
}

The data contains:

Key

Description

vehicleId

The id of the vehicle.

nickname

The nickname of the vehicle.

registryNumber

The registry number of the vehicle.

vehicleType

The type of the vehicle. Can be:
bicycle, motorcycle, car, pickup, van, boxvan, truck, largetruck, flatbed, largeflatbed.

driverId

The id of the driver

driverName

The name of the driver.

  • *phone** (May not exist)

The phone number of the driver. This may not exist, if there are no phone number on the driver.

position.lat

The latitude coordinate where the vehicle was.

position.lng

The longitude coordinate where the vehicle was.

position.updated

The time the vehicle send it's tracking update.

orders

The list of orders on the vehicle, including those that have not yet been picked up or delivered.