Creating Driver-Vehicle Assignments
Step-by-step guide to assigning drivers to vehicle drive-time in Samsara
In order to assign a Driver to a Vehicle in Samsara using our Driver-Vehicle Assignment API, both must exist in Samsara and you must pass an identifier for each in your API call. This identifier can be the Samsara ID or an External ID that you associate with a Driver or a Vehicle.
Matching Drivers
You’ll need to match drivers in Samsara with the third party system where you manage drivers. You could fetch all Drivers in an organization using this endpoint, and match on a unique value that a Driver shares between the two systems. Some suggestions might be:
name
: driver’s namelicenseNumber
: the license number of the driverphone
: the phone number of the driver
Note: be sure the identifier you choose to match drivers between systems is unique to the driver.
Once you find the driver in Samsara, you could optionally assign the unique value you used to match as an External ID for the Driver using this endpoint, which would simplify future assignments by allowing you to use that unique value as the driverID
parameter in the Driver-Vehicle Assignment API.
If a driver isn’t yet created in Samsara, you can use this API to create one.
Matching Vehicles
The Driver Assignment API accepts a Vehicle's VIN as a valid vehicleID
as long as the VIN is provided during Samsara VG installation because it is automatically designated as an External ID. We recommend you use this value in your API requests to assign Drivers. Vehicles must exist in Samsara.
Updated about 3 years ago