How To Setup Webhooks In Detrack – V2

This webhook feature is for Detrack to POST a notification to the specified Webhook URL whenever a status update is available for the job.

This feature is used in the integration process to send information to your downstream third-party applications / systems.

Our PUSH notification will be posted from 34.213.132.189. If necessary, kindly whitelist this I.P. address.

List of available Trigger for sending the Webhook notifications.

Trigger Description
In Transit New job is added, with the primary status set to “In Transit”.
Info Received New job is added, with the primary status set to “Info Received”.
Scheduled Tracking widget status changed to “Scheduled”. When the job has an assigned driver, and that date of the job is of a future date.
In Progress Occurs when the job has an assigned driver, and is of the current date.
Heading To Driver tap “Head To Location” on Driver App.
Partially Completed The job is partially completed, i.e. the job has at least 1 item being rejected in the Item Details.
Failed The job is not completed.
Return The job is set to the “Returned” status.
On Hold The job is set to the “On Hold” status.

To receive the webhook notification, you will need a small web application that can accept the HTTP requests by adding a webhook URL to your application.

Example frameworks of server-side programming languages:

Language Framework
C#
  1. ASP.NET MVC
Java
  1. Servlets
  2. Spark
Node.js
  1. Express
Python
  1. Django
  2. Flask
Ruby
  1. Rails
  2. Sinatra
PHP
  1. Laravel
  2. Symfony
  3. Yii

For more information on the payload of the push notifications, kindly refer to:

To set up the webhook for both Delivery and Collection jobs,

  1. Navigate to Settings > Webhook.
  1. You may select the required triggers (based on job status) to push the information over to the designated URL.

Alternatively, if you wish to separate the webhooks into Delivery and Collection jobs, you may enter the Webhook URL separately under Delivery or Collection.

  1. Navigate to Settings > Delivery or Collection
  1. You may enter the URL into the field.

Checking Of Webhook Status And Re-posting

1. For checking of webhook status, navigate to Settings > Job > Fields.

2. Enable the “Webhook URL” field.

3. Click Save when done.

4. Create a dummy job.

5. Click the icon under the “Webhook Status” to open a pop-up.

6. You may refer to the various HTTP statuses for troubleshooting, and re-post the PUSH notification by clicking on the icon under the “Repost” column.