What is the difference between adding a device via the SDK and the MyGeotab user interface?

Related Questions

  • How does the activeFrom date affect adding devices through the SDK versus within MyGeotab?

Applies To

  • MyGeotab SDK
  • Add devices
  • activeFrom

Answer

If you are adding devices through the SDK then you will need to specify the activeFrom date. If the device was added through the MyGeotab user interface (UI) then it will pull the current date and set that as the device's activeFrom field.

Additional Information

Example on adding a new device and setting the activeFrom field using the current datetime:

let newDevice = {
name: "<desired device name>",
serialNumber: "<GO device serial number>",
activeFrom: new Date().toISOString
};

api.call("Add", {
"typeName": "Device",
"entity" : newDevice
});