Samsara Developer Portal

Integrate your data with the Samsara API, customize the Samsara experience, and join a community of developers building with Samsara.

Get Started

Compliance & ELD

Manage hours of service and records of duty status

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.

Managing Driver Info and ELD Rulesets

The /fleet/drivers 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 TypeField Name(s)API Capabilities
ELD exemptionseldAdverseWeatherExemptionEnabled, eldBigDayExemptionEnabled, eldExempt, eldExemptReasonRead/Write
ELD day start houreldDayStartHourRead/Write
Personal conveyanceeldPcEnabledRead/Write
Yard moveseldYmEnabledRead/Write
ELD rulesets for US State, cycle, restarts, and breakeldSettingsRead-only. Must be set in the cloud dashboard. Attempts to write to this field via the API will be ignored.

See the /fleet/drivers reference documentation for full details.

Real-time Duty Status

The /fleet/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 /fleet/hos-clocks reference documentation for full details.

Daily Duty Status Summaries

The /v1/fleet/drivers/{driver_id}/hos_daily_logs endpoint allows you to retrieve a summarized report of daily activity for a given driver. The startMs and endMs parameters allow you to request a desired time period (a single day, a week, a month, etc.), and the report will include summarized activity for each day of the given period.

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
  • Certification information

See the Daily Duty Status Summaries guide for some sample code.

Historical Log Retrieval

The /fleet/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 /fleet/hos-logs reference docs for full details.

Updated 2 months ago



Compliance & ELD


Manage hours of service and records of duty status

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.