---
title: "Get all driver HOS violations"
method: GET
path: "/fleet/hos/violations"
tags: ["Hours of Service"]
---

# Get all driver HOS violations

`GET /fleet/hos/violations`

## Request

- Base URL: `https://api.samsara.com`
- URL: `https://api.samsara.com/fleet/hos/violations`
- Auth: HTTP bearer

Get active Hours of Service violations for the specified drivers.

The day object time range for a violation is defined by the `driver`'s `eldDayStartHour`. This value is configurable per driver.

The `startTime` and `endTime` parameters indicate the datetime range you'd like to retrieve violations for. A violation will be returned if its `violationStartTime` falls within this datetime range (inclusive of `startTime` and `endTime`) 

**Note:** The following are all the violation types with a short explanation about what each of them means: `californiaMealbreakMissed` (Missed California Meal Break), `cycleHoursOn` (Cycle Limit), `cycleOffHoursAfterOnDutyHours` (Cycle 2 Limit), `dailyDrivingHours` (Daily Driving Limit), `dailyOffDutyDeferralAddToDay2Consecutive` (Daily Off-Duty Deferral: Add To Day2 Consecutive), `dailyOffDutyDeferralNotPartMandatory` (Daily Off-Duty Deferral: Not Part Of Mandatory), `dailyOffDutyDeferralTwoDayDrivingLimit` (Daily Off-Duty Deferral: 2 Day Driving Limit), `dailyOffDutyDeferralTwoDayOffDuty` (Daily Off-Duty Deferral: 2 Day Off Duty), `dailyOffDutyNonResetHours` (Daily Off-Duty Time: Non-Reset), `dailyOffDutyTotalHours` (Daily Off-Duty Time), `dailyOnDutyHours` (Daily On-Duty Limit), `mandatory24HoursOffDuty` (24 Hours of Off Duty required), `restbreakMissed` (Missed Rest Break), `shiftDrivingHours` (Shift Driving Limit), `shiftHours` (Shift Duty Limit), `shiftOnDutyHours` (Shift On-Duty Limit), `unsubmittedLogs` (Missing Driver Certification)

 <b>Rate limit:</b> 5 requests/sec (learn more about rate limits <a href="https://developers.samsara.com/docs/rate-limits" target="_blank">here</a>).

To use this endpoint, select **Read ELD Compliance Settings (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>
 

 **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.

## Query parameters

- `driverIds` string[]
- `startTime` string
- `endTime` string
- `tagIds` string
- `parentTagIds` string
- `types` string[]
- `after` string

## Response `200`

OK response.

- HosViolationsGetHosViolationsResponseBody
  - `data` HosViolationsObjectResponseBody[], required: List of violations data
    - `violations` HosViolationObjectResponseBody[], required: List of violations and their associated drivers
      - `day` HosViolationDayObjectResponseBody, required
        - `endTime` string, required: The end time of the day on which the violation occurred in RFC 3339 format. This is determined by the driver's ELD start hour (00:00 or 12:00)
        - `startTime` string, required: The start time of the day on which the violation occurred in RFC 3339 format. This is determined by the driver's ELD start hour (00:00 or 12:00)
      - `description` string, required: Description containing violation type, region, and other metadata. This field can assume the following formats for the following types: californiaMealbreakMissed, restbreakMissed: "[description] ([max on duty hours] hours)" cycleHoursOn, dailyDrivingHours, dailyOffDutyNonResetHours, dailyOffDutyTotalHours, dailyOnDutyHours, shiftDrivingHours, shiftHours, shiftOnDutyHours: "[description] ([region]-[max hours in duty status] hours)" cycleOffHoursAfterOnDutyHours: "[description] ([region]): [minimum hours consecutive rest] hours off duty required after [max hours before consecutive rest] hours on-duty time" dailyOffDutyDeferralAddToDay2Consecutive, dailyOffDutyDeferralNotPartMandatory, dailyOffDutyDeferralTwoDayDrivingLimit, dailyOffDutyDeferralTwoDayOffDuty, mandatory24HoursOffDuty: "[description] ([region])" unsubmittedLogs: "Missing Driver Certification"
      - `driver` GoaDriverTinyResponseResponseBody, required: A minified driver object. This object is only returned if the route is assigned to the driver.
        - `externalIds` object: A map of external ids
        - `id` string, required: ID of the driver
        - `name` string: Name of the driver
      - `durationMs` integer, required: Duration the driver was in violation in milliseconds. This is the time between the time the driver starts being in violation until the end of the time window for violations that have one (e.g. `shiftDrivingHours`) or until the end of the day. The duration of some violations may cover the whole day (e.g. `unsubmittedLogs`).
      - `type` 'NONE' | 'californiaMealbreakMissed' | 'cycleHoursOn' | 'cycleOffHoursAfterOnDutyHours' | 'dailyDrivingHours' | 'dailyOffDutyDeferralAddToDay2Consecutive' | 'dailyOffDutyDeferralNotPartMandatory' | 'dailyOffDutyDeferralTwoDayDrivingLimit' | 'dailyOffDutyDeferralTwoDayOffDuty' | 'dailyOffDutyNonResetHours' | 'dailyOffDutyTotalHours' | 'dailyOnDutyHours' | 'mandatory24HoursOffDuty' | 'restbreakMissed' | 'shiftDrivingHours' | 'shiftHours' | 'shiftOnDutyHours' | 'unsubmittedLogs', required: The string value of the violation type. Valid values: `NONE`, `californiaMealbreakMissed`, `cycleHoursOn`, `cycleOffHoursAfterOnDutyHours`, `dailyDrivingHours`, `dailyOffDutyDeferralAddToDay2Consecutive`, `dailyOffDutyDeferralNotPartMandatory`, `dailyOffDutyDeferralTwoDayDrivingLimit`, `dailyOffDutyDeferralTwoDayOffDuty`, `dailyOffDutyNonResetHours`, `dailyOffDutyTotalHours`, `dailyOnDutyHours`, `mandatory24HoursOffDuty`, `restbreakMissed`, `shiftDrivingHours`, `shiftHours`, `shiftOnDutyHours`, `unsubmittedLogs`
      - `violationStartTime` string, required: The start time of the violation in RFC 3339 format.
  - `pagination` GoaPaginationResponseResponseBody, required: Pagination parameters.
    - `endCursor` string, required: Cursor identifier representing the last element in the response. This value should be used in conjunction with a subsequent request's 'after' query parameter. This may be an empty string if there are no more pages left to view.
    - `hasNextPage` boolean, required: True if there are more pages of results immediately available after this endCursor.

## Other responses

- `401`: Unauthorized response.
- `404`: Not Found response.
- `405`: Method Not Allowed response.
- `413`: Content Too Large response.
- `429`: Too Many Requests response.
- `500`: Internal Server Error response.
- `501`: Not Implemented response.
- `502`: Bad Gateway response.
- `503`: Service Unavailable response.
- `504`: Gateway Timeout response.
- `default`: Bad Request response.

---

[API](https://skmtc.dev/samsara/apis/samsara-api.md) - [All operations](https://skmtc.dev/samsara/apis/samsara-api/llms.txt) - [OpenAPI document](https://skmtc.dev/samsara/apis/samsara-api/revisions/a9e35d4999be?raw)
