The Samsara API allows you to manage hours of service and records of duty status. The following is a summary of the API endpoints and types of compliance use cases they can help you address.
The Drivers API endpoints allow you to create, retrieve, update, and deactivate drivers.
These endpoints allow you to manage general driver data such as Driver App credentials, name and contact info, and license information.
Additionally, these endpoints also allow you to manage ELD settings:
|ELD Setting Type||Field Name(s)||API Capabilities|
|ELD day start hour||Read/Write|
|ELD rulesets for US State, cycle, restarts, and break||Read-only. Must be set in the cloud dashboard. Attempts to write to this field via the API will be ignored.|
See the Drivers API reference documentation for full details.
The Get HOS clocks endpoint allows you to retrieve the current duty status of all your drivers.
Each call to this endpoint returns current values for:
- Current duty status
- Time until break
- Driving time remaining
- Shift time remaining
- Cycle time remaining
See the Get HOS clocks reference documentation for full details.
The Get all driver HOS daily logs endpoint allows you to retrieve a summarized report of daily activity for each driver.
The report will include:
- Time spent in each duty status per day
- Distance driven per day, broken up into personal conveyance and yard moves if enabled
- Vehicles assignments for the day
- Trailer assignments for the day
- Shipping doc assignments for the day
- Log certification information
See the Daily Duty Status Summaries guide for some sample code.
The Get HOS logs endpoint allows you to retrieve duty status logs for all drivers between a given start time and end time.
A driver's log will contain their sequence of duty statuses throughout the given time period, including the start and end time of each duty status, the associated vehicle if relevant, and the start location of the log entry.
The data returned by this endpoint reflects the current state of the logs including any driver or carrier edits. This means that if a log is edited by a carrier or driver, you may need to pull the log again to receive the latest version of the log.
See the Get HOS logs reference docs for full details.
Updated over 1 year ago