entityChange Webhook

Print Friendly and PDF

The entityChange webhook can be used to notify changes in the properties of an entity. In the current implementation, the webhook is invoked when a vehicle’s properties (VIN, License Plate Number, and Vehicle Number) are changed. The webhook can be used in future to notify change events for other entities.  

The following table describes the parameters for the entityChange event. 

Parameter 

Description 

tenantName 

The unique name of the Fleet. 

propertiesChanged

Contains the name, old value, and new value of the properties that have changed.

Property

Description 

name

Name of the property that has changed. Possible values are vin, licencePlateNumber, and vehicleNumber. 

newValue 

New value of the property. 

currentValue 

Existing value of the property. 

updatedOn

Time when the entity property was updated. 

entity 

 

The entity whose property changed.  

webhookType 

The event corresponding to the webhook, in this case “entityChanged 

The following are the Webhook sample payloads for the entityChange event.  

 

Scenario 1: One property changed 

{ 

  "tenantName": "N371818071473182", 

  "propertiesChanged": [ 

    { 

      "name": "vehicleNumber", 

      "newValue": "VehNum15", 

      "currentValue": " VehNum19" 

    } 

  ], 

  "updatedOn": 1612380493492, 

  "entity": "vehicle", 

  "webhookType": "entityChange" 

} 

 

Scenario 2: Two properties changed

{ 

  "tenantName": "N371818071473182", 

  "propertiesChanged": [ 

    { 

      "name": "vin", 

      "newValue": "WBXPC93487WF32148", 

       "currentValue":  5NPEB4AC2BH235831" 

    }, 

    { 

     "name": "licensePlateNumber", 

      "newValue": "ABC 12345", 

      "currentValue": "XYZ 123409" 

    } 

  ], 

  "updatedOn": 1612380550376, 

  "entity": "vehicle", 

  "webhookType": "entityChange" 

} 

 

Scenario 3: Three properties changed 

{ 

  "tenantName": "N371818071473182", 

  "propertiesChanged": [ 

    { 

      "name": "vin", 

      "newValue": "1G2HY52K134158002", 

       "currentValue":  2D4GV58265H121057" 

    }, 

    { 

      "name": "licensePlateNumber", 

      "newValue": "MNO 12345", 

      "currentValue": "KLM 123409" 

    }, 

    { 

      "name": "vehicleNumber", 

      "newValue": "VehNum 20", 

      "currentValue": " VehNum 35" 

    } 

  ], 

  "updatedOn": 1612380572983, 

  "entity": "vehicle", 

  "webhookType": "entityChange" 

} 

 

Was this article helpful?

We're sorry to hear that!

Please tell us why.
0 out of 0 found this helpful