Import Users Example
Skill level:

This example demonstrates a tool that can be built with an advanced-level knowledge of the MyGeotab system. It is suitable for those who have a well-versed understanding of the entire Geotab ecosystem and are confident with the MyGeotab SDK and leveraging the MyGeotab APIs within their projects.

This SDK example assists with importing users to your database using comma separated values (CSV). Use the form to add new users with optional NFC or GO driver keys. You can also use the text box to paste in users from another source.
In this example
API Methods: Add
API Entities: Driver HosRuleSet

Step 1: Click Add user (can view the inputted information in the input container below)

Step 2: Click Import users (to import the user to the database)

  

Template

This SDK example assists with importing users to your database using comma separated values (CSV).

Use the form to add new users with optional NFC or GO driver keys. You can also use the text box to paste in users from another source.

Value Example Notes Required
Email john.smith@geotab.com Can be email or user name. Spaces are not allowed. Yes
First name John Spaces are not allowed. Yes
Last name Smith Yes
Password Minimum of 6 characters. Yes
Groups Drivers|West|Garmin Names of groups separated by the | character. Yes
Reporting Groups Drivers|West|Garmin Names of reporting groups separated by the | character. No
Security clearance ID b28A7 Found in the URL when viewing a security clearance in MyGeotab.

Example:
my.geotab.com/DATABASE/#clearance,id:b28A7
Yes
NFC key number T1234S Found on the NFC key fob. No
Custom NFC key number 12345678 Found on the Custom NFC key fob. No
Country Code CA The user two symbols country ISO code (https://www.iso.org/iso-3166-country-codes.html) No
Phone number +1 5555555555 The user's phone number with space separated country phone code. No
Phone number extension 1234 The user's phone number extension. No
Designation "" The user's designation No
Employee number 63-221-44 The user's employee number. No
Fuel economy measurement LitersPer100Km Choose how to display fuel economy. There are four different measurements: liters per 100 kilometers, kilometers per liter, miles per US gallon, or miles per imperial gallon. You may need to refresh your browser for the change to take effect. Yes
Distance measurement system Metric (true) Choose how to display speeds and distances. This can be Metric or US/Imperial. You may need to refresh your browser to see the change take effect. Yes
Feature preview On or Off (true or false) Toggle feature preview. Yes
Time zone America/New_York The time zone offset from UTC for your location. All data will be displayed in this time zone. Yes
Authority name National Express The motor carrier that the driver works for. No
Authority address 5000 Explorer Drive The motor carrier's main office address. No
Carrier number 8Z88 In the United States, this is the motor carrier's USDOT number. In Canada, this is the Canadian Carrier code. No
Home terminal Stark Tower The motor carrier's place of business where the driver ordinarily reports for work. This can include a temporary work site designated by the motor carrier. No
Home terminal address 200 Park Avenue The motor carrier's address where the driver ordinarily reports for work. No
Driver license number YEET Driver's license number and License state/province must be set at the same time. No
License state/province Ontario (ON) Selecting North America will show a dropdown menu; selecting Other will display a text box. No
Ruleset California Property Intrastate (HosRuleSetCaliforniaProperty) This is the ruleset the user will follow when using hours of service. No
Yard move allowed On or Off (true or false) Toggling this setting to ON allows the driver to apply the yard move exemption. Yes
Personal conveyance allowed On of Off (true or false) Toggling this setting to ON allows the driver to apply the personal conveyance exemption. Yes

To make things easier, we've provided you with an excel template. Please follow the input requirements outlined in the Help menu.

Keep in mind that Time Zone is a required input and if a license plate is entered, it must be unique to the database. License state is required only if a license plate is provided. You may enter a state other than those provided.

NFC and Custom NFC keys must be unique to the database; no duplicates can exist.

If you want to import any reporting groups - the user groups cannot include the "CompanyGroupId", otherwise all reporting groups wiil be ignored.

Email1,FirstName,LastName,Password,GroupName1|GroupName2|...|GroupNameN,ReportingGroupName1|ReportingGroupName2|...|ReportingGroupNameN,SecurityClearanceId,NfcKey,CustomNfcKey,EmployeeNumber,FuelEconomyMeasurement,DistanceMeasurementSystem,FeaturePreview,TimeZone,AuthorityName,AuthorityAddress,CarrierNumber,HomeTerminal,HomeTerminalAddress,DriverLicenseNumber,LicenseState,Ruleset,YardMoveAllowed,PersonalConveyanceAllowed
Email2,FirstName,LastName,Password,GroupName1|GroupName2|...|GroupNameN,ReportingGroupName1|ReportingGroupName2|...|ReportingGroupNameN,SecurityClearanceId,NfcKey,,EmployeeNumber,,,,TimeZone,AuthorityName,AuthorityAddress,CarrierNumber,HomeTerminal,HomeTerminalAddress,DriverLicenseNumber,LicenseState,Ruleset,YardMoveAllowed,PersonalConveyanceAllowed
Email3,FirstName,LastName,Password,GroupName1|GroupName2|...|GroupNameN,ReportingGroupName1|ReportingGroupName2|...|ReportingGroupNameN,SecurityClearanceId,NfcKey,,,,,,,,,,,,,,Ruleset,,