Hours of Service

Set a duty status for a specific driver

🚧 This endpoint is still on our legacy API.

Set an individual driver’s current duty status to 'On Duty' or 'Off Duty'.

To ensure compliance with the ELD Mandate, only authenticated drivers can make direct duty status changes on their own logbook. Any system external to the Samsara Driver App using this endpoint to trigger duty status changes must ensure that such changes are only triggered directly by the driver in question and that the driver has been properly authenticated. This endpoint should not be used to algorithmically trigger duty status changes nor should it be used by personnel besides the driver to trigger duty status changes on the driver’s behalf. Carriers and their drivers are ultimately responsible for maintaining accurate logs and should confirm that their use of the endpoint is compliant with the ELD Mandate.

Submit Feedback: Likes, dislikes, and API feature requests should be filed as feedback in our <a href="https://forms.gle/zkD4NCH7HjKb7mm69" target="_blank">API feedback form</a>. If you encountered an issue or noticed inaccuracies in the API documentation, please <a href="https://www.samsara.com/help" target="_blank">submit a case</a> to our support team.

To use this endpoint, select Write ELD Hours of Service (US) under the Compliance category when creating or editing an API token. <a href="https://developers.samsara.com/docs/authentication#scopes-for-api-tokens" target="_blank">Learn More.</a>

post/v1/fleet/drivers/{driver_id}/hos/duty_status

Request

  • Base URL
    https://api.samsara.com
  • Auth
    HTTP bearer

Path parameters

driver_idinteger required

ID of the driver for whom the duty status is being set.

Request body

duty_statusstring required

Duty status to set the driver to. The only supported values are 'ON_DUTY' and 'OFF_DUTY'.

locationstring

Location to associate the duty status change with.

remarkstring

Remark to associate the duty status change with.

status_change_at_msnumber

Timestamp that the duty status will begin at specified in milliseconds UNIX time. Defaults to the current time if left blank. This can only be set to up to 8 hours in the past.

vehicle_idnumber

Vehicle ID to associate the duty status change with.

Example request

{
  "duty_status": "ON_DUTY",
  "location": "Loading dock",
  "remark": "Beginning On Duty Shift",
  "status_change_at_ms": 1580834793568,
  "vehicle_id": 1234
}

Response

Successfully changed duty status. No response body is returned.

Changes

No recorded changes to this operation across all 1 revision of this API.