How to identify VIN mismatch using SDK

Related Questions

  • How to generate a VIN mismatch report 

Applies To

  • MyGeotab 
  • SDK 
  • VIN 

Procedure

  1. Go to API Runner and login 
  2. Run the following code 
var mismatchVehicles = []
var now = new Date().toISOString();
api.call("Get", {
    "typeName": "Device",
    "search":{"fromDate":now}
}, function(result) {
    for (var i in result) {
        if (result[i].engineVehicleIdentificationNumber != result[i].vehicleIdentificationNumber)
            mismatchVehicles.push(result[i].name+ "|" +result[i].serialNumber+ "|"
            + result[i].engineVehicleIdentificationNumber+ "|" +result[i].vehicleIdentificationNumber)
    }
    console.log(mismatchVehicles)
}, function(e) {
    console.error("Failed:", e);
});

The output includes: 
Vehicle name | Serial number | Engine reported VIN | Manually entered VIN