openapi: 3.0.1 info: description: Gain greater visibility by connecting your fleets, equipment, sites, and people. title: Samsara Hos API version: '2024-11-18' servers: - url: https://api.samsara.com/ - url: https://api.eu.samsara.com/ security: - AccessTokenHeader: [] tags: - name: Hos paths: /fleet/hos/clocks: get: description: "Get the current HOS status for all drivers. Note that this includes inactive as well as active drivers. The legacy version of this endpoint can be found at [samsara.com/api-legacy](https://www.samsara.com/api-legacy#operation/getFleetHosLogsSummary). \n\n **Submit Feedback**: Likes, dislikes, and API feature requests should be filed as feedback in our API feedback form. If you encountered an issue or noticed inaccuracies in the API documentation, please submit a case to our support team.\n\nTo use this endpoint, select **Read ELD Compliance Settings (US)** under the Compliance category when creating or editing an API token. Learn More." operationId: getHosClocks parameters: - description: 'A filter on the data based on this comma-separated list of tag IDs. Example: `tagIds=1234,5678`' explode: false in: query name: tagIds schema: items: type: string type: array style: form - description: 'A filter on the data based on this comma-separated list of parent tag IDs, for use by orgs with tag hierarchies. Specifying a parent tag will implicitly include all descendent tags of the parent tag. Example: `parentTagIds=345,678`' explode: false in: query name: parentTagIds schema: items: type: string type: array style: form - description: 'A filter on the data based on this comma-separated list of driver IDs. Example: `driverIds=1234,5678`' explode: false in: query name: driverIds schema: items: type: string type: array style: form - description: If specified, this should be the endCursor value from the previous page of results. When present, this request will return the next page of results that occur immediately after the previous page of results. in: query name: after schema: type: string - description: The limit for how many objects will be in the response. Default and max for this value is 512 objects. in: query name: limit schema: format: int64 maximum: 512 minimum: 1 type: integer responses: '200': content: application/json: schema: $ref: '#/components/schemas/HosClocksResponse' description: List of current HOS clock information for the specified drivers. default: content: application/json: schema: $ref: '#/components/schemas/standardErrorResponse' description: Error response summary: Get HOS Clocks tags: - Hos /fleet/hos/daily-logs: get: description: "Get summarized daily Hours of Service charts for the specified drivers.\n\nThe time range for a log is defined by the `driver`'s `eldDayStartHour`. This value is configurable per driver.\n\nThe `startDate` and `endDate` parameters indicate the date range you'd like to retrieve daily logs for. A daily log will be returned if its `startTime` is on any of the days within in this date range (inclusive of `startDate` and `endDate`).\n\n**Note:** If data is still being uploaded from the Samsara Driver App, it may not be completely reflected in the response from this endpoint. The best practice is to wait a couple of days before querying this endpoint to make sure that all data from the Samsara Driver App has been uploaded.\n\nIf you are using the legacy version of this endpoint and looking for its documentation, you can find it [here](https://www.samsara.com/api-legacy#operation/getFleetDriversHosDailyLogs).\n\n Rate limit: 5 requests/sec (learn more about rate limits here).\n\nTo use this endpoint, select **Read ELD Compliance Settings (US)** under the Compliance category when creating or editing an API token. Learn More.\n \n\n **Submit Feedback**: Likes, dislikes, and API feature requests should be filed as feedback in our API feedback form. If you encountered an issue or noticed inaccuracies in the API documentation, please submit a case to our support team." operationId: getHosDailyLogs parameters: - description: ' A filter on the data based on this comma-separated list of driver IDs and externalIds. Example: `driverIds=1234,5678,payroll:4841`' explode: false in: query name: driverIds schema: items: type: string type: array style: form - description: ' A start date in YYYY-MM-DD. This is a date only without an associated time. Example: `2019-06-13`. This is a required field' in: query name: startDate schema: type: string - description: ' An end date in YYYY-MM-DD. This is a date only without an associated time. Must be greater than or equal to the start date. Example: `2019-07-21`. This is a required field' in: query name: endDate schema: type: string - description: ' A filter on the data based on this comma-separated list of tag IDs. Example: `tagIds=1234,5678`' in: query name: tagIds schema: type: string - description: ' A filter on the data based on this comma-separated list of parent tag IDs, for use by orgs with tag hierarchies. Specifying a parent tag will implicitly include all descendent tags of the parent tag. Example: `parentTagIds=345,678`' in: query name: parentTagIds schema: type: string - description: 'If value is `deactivated`, only drivers that are deactivated will appear in the response. This parameter will default to `active` if not provided (fetching only active drivers). Valid values: `active`, `deactivated`' in: query name: driverActivationStatus schema: default: active enum: - active - deactivated type: string - description: ' If specified, this should be the endCursor value from the previous page of results. When present, this request will return the next page of results that occur immediately after the previous page of results.' in: query name: after schema: type: string - description: 'Expands the specified value(s) in the response object. Expansion populates additional fields in an object, if supported. Unsupported fields are ignored. To expand multiple fields, input a comma-separated list. Valid value: `vehicle` Valid values: `vehicle`' in: query name: expand schema: enum: - vehicle type: string responses: '200': content: application/json: schema: $ref: '#/components/schemas/HosDailyLogsGetHosDailyLogsResponseBody' description: OK response. '401': content: application/json: schema: $ref: '#/components/schemas/HosDailyLogsGetHosDailyLogsUnauthorizedErrorResponseBody' description: Unauthorized response. '404': content: application/json: schema: $ref: '#/components/schemas/HosDailyLogsGetHosDailyLogsNotFoundErrorResponseBody' description: Not Found response. '405': content: application/json: schema: $ref: '#/components/schemas/HosDailyLogsGetHosDailyLogsMethodNotAllowedErrorResponseBody' description: Method Not Allowed response. '429': content: application/json: schema: $ref: '#/components/schemas/HosDailyLogsGetHosDailyLogsTooManyRequestsErrorResponseBody' description: Too Many Requests response. '500': content: application/json: schema: $ref: '#/components/schemas/HosDailyLogsGetHosDailyLogsInternalServerErrorResponseBody' description: Internal Server Error response. '501': content: application/json: schema: $ref: '#/components/schemas/HosDailyLogsGetHosDailyLogsNotImplementedErrorResponseBody' description: Not Implemented response. '502': content: application/json: schema: $ref: '#/components/schemas/HosDailyLogsGetHosDailyLogsBadGatewayErrorResponseBody' description: Bad Gateway response. '503': content: application/json: schema: $ref: '#/components/schemas/HosDailyLogsGetHosDailyLogsServiceUnavailableErrorResponseBody' description: Service Unavailable response. '504': content: application/json: schema: $ref: '#/components/schemas/HosDailyLogsGetHosDailyLogsGatewayTimeoutErrorResponseBody' description: Gateway Timeout response. default: content: application/json: schema: $ref: '#/components/schemas/HosDailyLogsGetHosDailyLogsBadRequestErrorResponseBody' description: Bad Request response. summary: Get All Driver HOS Daily Logs tags: - Hos /fleet/hos/logs: get: description: "Returns HOS logs between a given `startTime` and `endTime`. The logs can be further filtered using tags or by providing a list of driver IDs (including external IDs). The legacy version of this endpoint can be found at [samsara.com/api-legacy](https://www.samsara.com/api-legacy#operation/getFleetHosLogs).\n\n**Note:** If data is still being uploaded from the Samsara Driver App, it may not be completely reflected in the response from this endpoint. The best practice is to wait a couple of days before querying this endpoint to make sure that all data from the Samsara Driver App has been uploaded. \n\n Rate limit: 5 requests/sec (learn more about rate limits here). \n\n **Submit Feedback**: Likes, dislikes, and API feature requests should be filed as feedback in our API feedback form. If you encountered an issue or noticed inaccuracies in the API documentation, please submit a case to our support team.\n\nTo use this endpoint, select **Read ELD Compliance Settings (US)** under the Compliance category when creating or editing an API token. Learn More." operationId: getHosLogs parameters: - description: 'A filter on the data based on this comma-separated list of tag IDs. Example: `tagIds=1234,5678`' explode: false in: query name: tagIds schema: items: type: string type: array style: form - description: 'A filter on the data based on this comma-separated list of parent tag IDs, for use by orgs with tag hierarchies. Specifying a parent tag will implicitly include all descendent tags of the parent tag. Example: `parentTagIds=345,678`' explode: false in: query name: parentTagIds schema: items: type: string type: array style: form - description: 'A filter on the data based on this comma-separated list of driver IDs. Example: `driverIds=1234,5678`' explode: false in: query name: driverIds schema: items: type: string type: array style: form - description: 'A start time in RFC 3339 format. Defaults to now if not provided. Millisecond precision and timezones are supported. (Examples: 2019-06-13T19:08:25Z, 2019-06-13T19:08:25.455Z, OR 2015-09-15T14:00:12-04:00).' in: query name: startTime schema: type: string - description: 'An end time in RFC 3339 format. Defaults to now if not provided. Millisecond precision and timezones are supported. (Examples: 2019-06-13T19:08:25Z, 2019-06-13T19:08:25.455Z, OR 2015-09-15T14:00:12-04:00).' in: query name: endTime schema: type: string - description: If specified, this should be the endCursor value from the previous page of results. When present, this request will return the next page of results that occur immediately after the previous page of results. in: query name: after schema: type: string responses: '200': content: application/json: schema: $ref: '#/components/schemas/HosLogsResponse' description: List of the last known HOS log entries for the specified drivers. default: content: application/json: schema: $ref: '#/components/schemas/standardErrorResponse' description: Error response summary: Get HOS Logs tags: - Hos /fleet/hos/violations: get: description: "Get active Hours of Service violations for the specified drivers.\n\nThe day object time range for a violation is defined by the `driver`'s `eldDayStartHour`. This value is configurable per driver.\n\nThe `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`) \n\n**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)\n\n Rate limit: 5 requests/sec (learn more about rate limits here).\n\nTo use this endpoint, select **Read ELD Compliance Settings (US)** under the Compliance category when creating or editing an API token. Learn More.\n \n\n **Submit Feedback**: Likes, dislikes, and API feature requests should be filed as feedback in our API feedback form. If you encountered an issue or noticed inaccuracies in the API documentation, please submit a case to our support team." operationId: getHosViolations parameters: - description: ' A filter on the data based on this comma-separated list of driver IDs and externalIds. Example: `driverIds=1234,5678,payroll:4841`' explode: false in: query name: driverIds schema: items: type: string type: array style: form - description: ' A start time in RFC 3339 format. Defaults to now if not provided. Millisecond precision and timezones are supported. (Examples: 2019-06-13T19:08:25Z, 2019-06-13T19:08:25.455Z, OR 2015-09-15T14:00:12-04:00).' in: query name: startTime schema: type: string - description: ' An end time in RFC 3339 format. Defaults to now if not provided. Millisecond precision and timezones are supported. (Examples: 2019-06-13T19:08:25Z, 2019-06-13T19:08:25.455Z, OR 2015-09-15T14:00:12-04:00).' in: query name: endTime schema: type: string - description: ' A filter on the data based on this comma-separated list of tag IDs. Example: `tagIds=1234,5678`' in: query name: tagIds schema: type: string - description: ' A filter on the data based on this comma-separated list of parent tag IDs, for use by orgs with tag hierarchies. Specifying a parent tag will implicitly include all descendent tags of the parent tag. Example: `parentTagIds=345,678`' in: query name: parentTagIds schema: type: string - description: 'A filter on violations data based on the violation type enum. Supported types: `NONE, californiaMealbreakMissed, cycleHoursOn, cycleOffHoursAfterOnDutyHours, dailyDrivingHours, dailyOffDutyDeferralAddToDay2Consecutive, dailyOffDutyDeferralNotPartMandatory, dailyOffDutyDeferralTwoDayDrivingLimit, dailyOffDutyDeferralTwoDayOffDuty, dailyOffDutyNonResetHours, dailyOffDutyTotalHours, dailyOnDutyHours, mandatory24HoursOffDuty, restbreakMissed, shiftDrivingHours, shiftHours, shiftOnDutyHours, unsubmittedLogs`' explode: false in: query name: types schema: items: type: string type: array style: form - description: ' If specified, this should be the endCursor value from the previous page of results. When present, this request will return the next page of results that occur immediately after the previous page of results.' in: query name: after schema: type: string responses: '200': content: application/json: schema: $ref: '#/components/schemas/HosViolationsGetHosViolationsResponseBody' description: OK response. '401': content: application/json: schema: $ref: '#/components/schemas/HosViolationsGetHosViolationsUnauthorizedErrorResponseBody' description: Unauthorized response. '404': content: application/json: schema: $ref: '#/components/schemas/HosViolationsGetHosViolationsNotFoundErrorResponseBody' description: Not Found response. '405': content: application/json: schema: $ref: '#/components/schemas/HosViolationsGetHosViolationsMethodNotAllowedErrorResponseBody' description: Method Not Allowed response. '429': content: application/json: schema: $ref: '#/components/schemas/HosViolationsGetHosViolationsTooManyRequestsErrorResponseBody' description: Too Many Requests response. '500': content: application/json: schema: $ref: '#/components/schemas/HosViolationsGetHosViolationsInternalServerErrorResponseBody' description: Internal Server Error response. '501': content: application/json: schema: $ref: '#/components/schemas/HosViolationsGetHosViolationsNotImplementedErrorResponseBody' description: Not Implemented response. '502': content: application/json: schema: $ref: '#/components/schemas/HosViolationsGetHosViolationsBadGatewayErrorResponseBody' description: Bad Gateway response. '503': content: application/json: schema: $ref: '#/components/schemas/HosViolationsGetHosViolationsServiceUnavailableErrorResponseBody' description: Service Unavailable response. '504': content: application/json: schema: $ref: '#/components/schemas/HosViolationsGetHosViolationsGatewayTimeoutErrorResponseBody' description: Gateway Timeout response. default: content: application/json: schema: $ref: '#/components/schemas/HosViolationsGetHosViolationsBadRequestErrorResponseBody' description: Bad Request response. summary: Get All Driver HOS Violations tags: - Hos /v1/fleet/drivers/{driver_id}/hos/duty_status: post: description: "\n\n\nThis endpoint is still on our legacy API.\n\n\n\nSet an individual drivers current duty status to 'On Duty' or 'Off Duty'.\n\n 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 drivers 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. \n\n **Submit Feedback**: Likes, dislikes, and API feature requests should be filed as feedback in our API feedback form. If you encountered an issue or noticed inaccuracies in the API documentation, please submit a case to our support team.\n\nTo use this endpoint, select **Write ELD Hours of Service (US)** under the Compliance category when creating or editing an API token. Learn More." operationId: setCurrentDutyStatus parameters: - description: ID of the driver for whom the duty status is being set. in: path name: driver_id required: true schema: format: int64 type: integer requestBody: $ref: '#/components/requestBodies/inline_object_1' content: application/json: schema: properties: duty_status: description: Duty status to set the driver to. The only supported values are 'ON_DUTY' and 'OFF_DUTY'. example: ON_DUTY type: string location: description: Location to associate the duty status change with. example: Loading dock type: string remark: description: Remark to associate the duty status change with. example: Beginning On Duty Shift type: string status_change_at_ms: description: 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. example: 1580834793568 format: int64 type: number vehicle_id: description: Vehicle ID to associate the duty status change with. example: 1234 format: int64 type: number required: - duty_status type: object required: false responses: '200': content: {} description: Successfully changed duty status. No response body is returned. default: content: application/json: schema: $ref: '#/components/schemas/V1ErrorResponse' description: Unexpected error. summary: Set a Duty Status for a Specific Driver tags: - Hos x-codegen-request-body-name: dutyStatusParams /v1/fleet/hos_authentication_logs: get: description: "\n\n\nThis endpoint is still on our legacy API.\n\n\n\nGet the HOS (hours of service) signin and signout logs for the specified driver. The response includes 4 fields that are now deprecated.\n\n**Note:** If data is still being uploaded from the Samsara Driver App, it may not be completely reflected in the response from this endpoint. The best practice is to wait a couple of days before querying this endpoint to make sure that all data from the Samsara Driver App has been uploaded. \n\n **Submit Feedback**: Likes, dislikes, and API feature requests should be filed as feedback in our API feedback form. If you encountered an issue or noticed inaccuracies in the API documentation, please submit a case to our support team.\n\nTo use this endpoint, select **Read ELD Hours of Service (US)** under the Compliance category when creating or editing an API token. Learn More." operationId: V1getFleetHosAuthenticationLogs parameters: - description: Driver ID to query. in: query name: driverId required: true schema: format: int64 type: integer - description: Beginning of the time range, specified in milliseconds UNIX time. in: query name: startMs required: true schema: format: int64 type: integer - description: End of the time range, specified in milliseconds UNIX time. in: query name: endMs required: true schema: format: int64 type: integer responses: '200': content: application/json: schema: $ref: '#/components/schemas/V1HosAuthenticationLogsResponse' description: HOS authentication logs for the specified driver. default: content: application/json: schema: $ref: '#/components/schemas/V1ErrorResponse' description: Unexpected error. summary: Get HOS Signin and Signout tags: - Hos components: schemas: V1ErrorResponse: description: Error message describing why the request failed. type: string LogMetaDataObjectResponseBody: description: The metadata of the log. properties: adverseDrivingClaimed: description: Whether the driver has claimed the [Adverse Driving Exemption](https://kb.samsara.com/hc/en-us/articles/360047336792-Adverse-Driving-Exemption) for this HOS day chart. example: true type: boolean bigDayClaimed: description: Whether the driver has claimed the [Big Day Exemption](https://kb.samsara.com/hc/en-us/articles/360057113891-16-Hour-Short-Haul-Exemption-Big-Day-) for this HOS day chart. example: true type: boolean carrierFormattedAddress: description: The address of the carrier used for this HOS chart. example: 1990 Alameda Street, San Francisco, CA 94103 type: string carrierName: description: The name of the carrier used for this HOS chart. example: Carrier Name type: string carrierUsDotNumber: description: The US DOT number of the carrier used for this HOS chart. example: 1234 format: int64 type: integer certifiedAtTime: description: The time this log was certified in RFC 3339 format. example: '2020-01-01T06:00:00Z' type: string homeTerminalFormattedAddress: description: The address of the Home Terminal used for this HOS chart. example: 1990 Alameda Street, San Francisco, CA 94103 type: string homeTerminalName: description: The name of the Home Terminal used for this HOS chart. example: Home Terminal Name type: string isCertified: description: Whether this HOS day chart was certified by the driver. example: false type: boolean isUsShortHaulActive: description: Whether the driver has the 150 air-mile Short Haul Exemption active for this HOS day chart. example: true type: boolean shippingDocs: description: List of shipping document names associated with the driver for the day. This field maps to Shipping ID in the dashboard. example: Delivery 123, chips and soda type: string trailerNames: description: List of trailer names associated with the driver for the day. If a trailer was associated with a log through the driver app the trailer name will be the trailer ID. example: - '10293' - Trailer ID 1 items: example: Quo assumenda a atque aut. type: string type: array vehicles: description: List of vehicles associated with the driver for the day. items: $ref: '#/components/schemas/VehicleResponseResponseBody' type: array type: object HosLogsResponse: description: HOS logs and pagination info. properties: data: $ref: '#/components/schemas/HosLogsForDrivers' pagination: $ref: '#/components/schemas/paginationResponse' required: - data - pagination type: object HosDailyLogsGetHosDailyLogsBadGatewayErrorResponseBody: description: Bad Gateway properties: message: description: Message of error example: 'rpc error: code = Unknown desc = connection refused' type: string requestId: description: The request ID; used when reaching out to support for issues with requests. example: 8916e1c1 type: string required: - message - requestId type: object HosDrive: description: Remaining durations for the HOS driving shift limits. properties: driveRemainingDurationMs: description: Remaining driving time the driver has in the current shift in milliseconds. For property-carrying drivers, this is the amount of time the driver can drive before hitting the 11-hour limit. example: 39600000 type: number type: object HosBreak: description: Remaining durations for the HOS rest break requirement. properties: timeUntilBreakDurationMs: description: Time until the driver has a required break in milliseconds. example: 28800000 type: number type: object time: description: 'UTC timestamp in RFC 3339 format. Example: `2020-01-27T07:06:25Z`.' example: '2020-01-27T07:06:25Z' type: string vehicleTinyResponse: description: A minified vehicle object. properties: ExternalIds: additionalProperties: type: string description: The [external IDs](https://developers.samsara.com/docs/external-ids) for the given object. example: maintenanceId: '250020' payrollId: ABFS18600 type: object id: description: ID of the vehicle. example: '123456789' type: string name: description: Name of the vehicle. example: 'Midwest Truck #4' type: string type: object HosViolationsGetHosViolationsGatewayTimeoutErrorResponseBody: description: Gateway timeout properties: message: description: Message of error example: context deadline exceeded type: string requestId: description: The request ID; used when reaching out to support for issues with requests. example: 8916e1c1 type: string required: - message - requestId type: object HosDailyLogsGetHosDailyLogsNotFoundErrorResponseBody: description: Resource not found properties: message: description: Message of error example: Object not found. type: string requestId: description: The request ID; used when reaching out to support for issues with requests. example: 8916e1c1 type: string required: - message - requestId type: object HosViolationDayObjectResponseBody: properties: endTime: description: 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) example: '2019-06-14T12:00:00Z' type: string startTime: description: 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) example: '2019-06-13T12:00:00Z' type: string required: - endTime - startTime type: object VehicleResponseResponseBody: description: A vehicle object properties: assetType: description: 'The type of the asset. Valid values: `uncategorized`, `trailer`, `equipment`, `unpowered`, `vehicle`' enum: - uncategorized - trailer - equipment - unpowered - vehicle example: vehicle type: string externalIds: additionalProperties: type: string description: A map of external ids type: object id: description: ID of the vehicle example: '494123' type: string licensePlate: description: The license plate of the vehicle. example: 6SAM123 type: string name: description: Name of the vehicle example: 'Fleet Truck #1' type: string vehicleVin: description: The VIN of the vehicle. example: 1GBJ6P1B2HV112765 type: string type: object HosDailyLogsGetHosDailyLogsTooManyRequestsErrorResponseBody: description: Too many requests properties: message: description: Message of error example: Exceeded rate limit. type: string requestId: description: The request ID; used when reaching out to support for issues with requests. example: 8916e1c1 type: string required: - message - requestId type: object HosDailyLogsGetHosDailyLogsNotImplementedErrorResponseBody: description: Requested endpoint is not yet implemented properties: message: description: Message of error example: Not implemented. type: string requestId: description: The request ID; used when reaching out to support for issues with requests. example: 8916e1c1 type: string required: - message - requestId type: object HosDailyLogsGetHosDailyLogsResponseBody: properties: data: description: List of drivers and their HOS daily logs data. items: $ref: '#/components/schemas/HosDailyLogsObjectResponseBody' type: array pagination: $ref: '#/components/schemas/GoaPaginationResponseResponseBody' required: - data - pagination type: object DriverWithTimezoneEldSettingsObjectResponseBody: description: The driver the log applies to. properties: eldSettings: $ref: '#/components/schemas/EldSettingsObjectResponseBody' externalIds: additionalProperties: type: string description: A map of external ids type: object id: description: ID of the driver example: '45646' type: string name: description: Name of the driver example: Driver Bob type: string timezone: default: America/Los_Angeles description: Home terminal timezone, in order to indicate what time zone should be used to calculate the ELD logs. Driver timezones use [IANA timezone database](https://www.iana.org/time-zones) keys (e.g. `America/Los_Angeles`, `America/New_York`, `Europe/London`, etc.). You can find a mapping of common timezone formats to IANA timezone keys [here](https://unicode.org/cldr/charts/latest/supplemental/zone_tzid.html). example: America/Los_Angeles type: string required: - id - name type: object HosClocksForDriver: description: HOS clock values for a specific driver, including remaining times and violations. properties: clocks: $ref: '#/components/schemas/HosClocks' currentDutyStatus: $ref: '#/components/schemas/CurrentDutyStatus' currentVehicle: $ref: '#/components/schemas/vehicleTinyResponse' driver: $ref: '#/components/schemas/driverTinyResponse' violations: $ref: '#/components/schemas/HosViolations' type: object HosShift: description: Remaining durations and start time for the HOS on duty shift limits. properties: shiftRemainingDurationMs: description: Remaining on duty or driving time the driver in the current shift in milliseconds. For property-carrying drivers, this is the amount of time the driver can be on duty or driving before hitting the 14-hour limit. example: 50400000 type: number type: object GoaPaginationResponseResponseBody: description: Pagination parameters. properties: endCursor: description: 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. example: MjkY type: string hasNextPage: description: True if there are more pages of results immediately available after this endCursor. example: true type: boolean required: - endCursor - hasNextPage type: object standardErrorResponse: description: Error response properties: message: description: The message of the error. example: An error has occurred. type: string requestId: description: The ID of the request. example: 8916e1c1 type: string type: object HosLogsForDrivers: description: List of HOS logs for the specified drivers. items: $ref: '#/components/schemas/HosLogsForDriver' type: array HosDailyLogsGetHosDailyLogsInternalServerErrorResponseBody: description: An internal server error occurred properties: message: description: Message of error example: Failed to execute GraphQL query. type: string requestId: description: The request ID; used when reaching out to support for issues with requests. example: 8916e1c1 type: string required: - message - requestId type: object HosViolationsGetHosViolationsBadGatewayErrorResponseBody: description: Bad Gateway properties: message: description: Message of error example: 'rpc error: code = Unknown desc = connection refused' type: string requestId: description: The request ID; used when reaching out to support for issues with requests. example: 8916e1c1 type: string required: - message - requestId type: object V1HosAuthenticationLogsResponse_authenticationLogs: properties: actionType: description: The log type - one of 'signin' or 'signout' example: signin type: string address: description: 'DEPRECATED: THIS FIELD MAY NOT BE POPULATED' example: THIS FIELD MAY NOT BE POPULATED type: string addressName: description: 'DEPRECATED: THIS FIELD MAY NOT BE POPULATED' example: THIS FIELD MAY NOT BE POPULATED type: string city: description: 'DEPRECATED: THIS FIELD MAY NOT BE POPULATED' example: THIS FIELD MAY NOT BE POPULATED type: string happenedAtMs: description: The time at which the event was recorded in UNIX milliseconds. example: 1462881998034 format: int64 type: integer state: description: 'DEPRECATED: THIS FIELD MAY NOT BE POPULATED' example: THIS FIELD MAY NOT BE POPULATED type: string type: object HosViolationsGetHosViolationsServiceUnavailableErrorResponseBody: description: Service unavailable properties: message: description: Message of error example: context deadline exceeded type: string requestId: description: The request ID; used when reaching out to support for issues with requests. example: 8916e1c1 type: string required: - message - requestId type: object DistanceTraveledObjectResponseBody: description: The distance traveled information of the log. properties: driveDistanceMeters: description: Distance driven in meters, rounded to two decimal places. example: 796625 format: int64 type: integer personalConveyanceDistanceMeters: description: Distance driven for personal conveyance, rounded to two decimal places. example: 27358 format: int64 type: integer yardMoveDistanceMeters: description: Distance driven for yard moves, rounded to two decimal places. example: 1287 format: int64 type: integer type: object HosLogLocation: description: Location associated with the duty status change properties: latitude: description: GPS latitude represented in degrees example: 122.142 format: double type: number longitude: description: GPS longitude represented in degrees example: -93.343 format: double type: number required: - latitude - longitude type: object HosViolationsGetHosViolationsUnauthorizedErrorResponseBody: description: Unauthorized properties: message: description: Message of error example: Invalid token. type: string requestId: description: The request ID; used when reaching out to support for issues with requests. example: 8916e1c1 type: string required: - message - requestId type: object HosViolations: description: Durations the driver has been in violation of HOS rules. See [this page](https://www.samsara.com/fleet/eld-compliance/hours-of-service) for more information on HOS rules. properties: cycleViolationDurationMs: description: Time since the driver has surpassed the driving cycle duration limit in milliseconds. For property-carrying drivers, this is the amount of time the driver has been on duty or driving past the 60/70-hour limit in 7/8 days. example: 39600000 type: number shiftDrivingViolationDurationMs: description: Time since the driver has surpassed the driving shift duration limit in milliseconds. For property-carrying drivers, this is the amount of time the driver has been driving past the 11-hour limit. example: 39600000 type: number type: object HosLogsList: description: List of HOS log entries. items: $ref: '#/components/schemas/HosLogEntry' type: array HosViolationsObjectResponseBody: properties: violations: description: List of violations and their associated drivers items: $ref: '#/components/schemas/HosViolationObjectResponseBody' type: array required: - violations type: object HosClocksForDrivers: description: List of HOS clocks for the specified drivers. items: $ref: '#/components/schemas/HosClocksForDriver' type: array HosViolationObjectResponseBody: properties: day: $ref: '#/components/schemas/HosViolationDayObjectResponseBody' description: description: '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"' example: Daily Off-Duty Time (Canada South-10 hours) type: string driver: $ref: '#/components/schemas/GoaDriverTinyResponseResponseBody' durationMs: description: 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`). example: 31970000 format: int64 type: integer type: description: '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`' enum: - NONE - californiaMealbreakMissed - cycleHoursOn - cycleOffHoursAfterOnDutyHours - dailyDrivingHours - dailyOffDutyDeferralAddToDay2Consecutive - dailyOffDutyDeferralNotPartMandatory - dailyOffDutyDeferralTwoDayDrivingLimit - dailyOffDutyDeferralTwoDayOffDuty - dailyOffDutyNonResetHours - dailyOffDutyTotalHours - dailyOnDutyHours - mandatory24HoursOffDuty - restbreakMissed - shiftDrivingHours - shiftHours - shiftOnDutyHours - unsubmittedLogs example: shiftHours type: string violationStartTime: description: The start time of the violation in RFC 3339 format. example: '2019-06-13T19:08:25Z' type: string required: - day - description - driver - durationMs - type - violationStartTime type: object HosClocksResponse: description: Drivers HOS clocks and pagination info. properties: data: $ref: '#/components/schemas/HosClocksForDrivers' pagination: $ref: '#/components/schemas/paginationResponse' required: - data - pagination type: object HosDailyLogsGetHosDailyLogsServiceUnavailableErrorResponseBody: description: Service unavailable properties: message: description: Message of error example: context deadline exceeded type: string requestId: description: The request ID; used when reaching out to support for issues with requests. example: 8916e1c1 type: string required: - message - requestId type: object HosViolationsGetHosViolationsBadRequestErrorResponseBody: description: Bad Request parameters properties: message: description: Message of error example: Invalid value for parameter. type: string requestId: description: The request ID; used when reaching out to support for issues with requests. example: 8916e1c1 type: string required: - message - requestId type: object HosLogEntry: description: A single HOS log entry. properties: codrivers: description: The codriver information. items: $ref: '#/components/schemas/driverTinyResponse' type: array hosStatusType: description: 'The Hours of Service status type. Valid values: `offDuty`, `sleeperBed`, `driving`, `onDuty`, `yardMove`, `personalConveyance`.' enum: - offDuty - sleeperBed - driving - onDuty - yardMove - personalConveyance example: offDuty type: string logEndTime: $ref: '#/components/schemas/time' logRecordedLocation: $ref: '#/components/schemas/HosLogLocation' logStartTime: $ref: '#/components/schemas/time' remark: description: Remark associated with the log entry. example: Lunch Break type: string vehicle: $ref: '#/components/schemas/vehicleTinyResponse' required: - logStartTime type: object HosDailyLogsGetHosDailyLogsBadRequestErrorResponseBody: description: Bad Request parameters properties: message: description: Message of error example: Invalid value for parameter. type: string requestId: description: The request ID; used when reaching out to support for issues with requests. example: 8916e1c1 type: string required: - message - requestId type: object driverTinyResponse: description: A minified driver object. properties: id: description: ID of the driver. example: '88668' type: string name: description: Name of the driver. example: Susan Bob type: string type: object HosDailyLogsGetHosDailyLogsGatewayTimeoutErrorResponseBody: description: Gateway timeout properties: message: description: Message of error example: context deadline exceeded type: string requestId: description: The request ID; used when reaching out to support for issues with requests. example: 8916e1c1 type: string required: - message - requestId type: object V1HosAuthenticationLogsResponse: properties: authenticationLogs: items: $ref: '#/components/schemas/V1HosAuthenticationLogsResponse_authenticationLogs' type: array type: object HosViolationsGetHosViolationsNotFoundErrorResponseBody: description: Resource not found properties: message: description: Message of error example: Object not found. type: string requestId: description: The request ID; used when reaching out to support for issues with requests. example: 8916e1c1 type: string required: - message - requestId type: object PendingDutyStatusDurationsObjectResponseBody: description: What the duty status durations on the drivers log would be if all pending carrier edits are accepted by the driver. properties: activeDurationMs: description: Duration the driver was active for in the log period in milliseconds. example: 38825000 format: int64 type: integer driveDurationMs: description: Duration the driver was driving for in the log period in milliseconds. example: 31970000 format: int64 type: integer offDutyDurationMs: description: Duration the driver was off duty for in the log period in milliseconds. example: 20555000 format: int64 type: integer onDutyDurationMs: description: Duration the driver was on duty for in the log period in milliseconds. example: 5423000 format: int64 type: integer personalConveyanceDurationMs: description: Duration the driver was driving for personal conveyance for in the log period in milliseconds. example: 4358000 format: int64 type: integer sleeperBerthDurationMs: description: Duration the driver was in their sleeper berth for in the log period in milliseconds. example: 27020000 format: int64 type: integer waitingTimeDurationMs: description: Duration the driver was waiting for in the log period in milliseconds. example: 1560000 format: int64 type: integer yardMoveDurationMs: description: Duration the driver was driving for yard moves for in the log period in milliseconds. example: 1432000 format: int64 type: integer type: object HosCycle: description: Remaining durations and start time for the HOS driving cycle. properties: cycleRemainingDurationMs: description: Remaining on duty or driving time the driver has in the current cycle in milliseconds. For property-carrying drivers, this is the amount of time the driver can be on duty or driving before hitting the 60/70-hour limit in 7/8 days. example: 252000000 type: number cycleStartedAtTime: $ref: '#/components/schemas/time' cycleTomorrowDurationMs: description: Remaining on duty or driving time the driver has available tomorrow in milliseconds. For property-carrying drivers this is calculated based on the 60/70-hour limit in 7/8 days rule. example: 252000000 type: number type: object paginationResponse: description: Pagination parameters. properties: endCursor: description: 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. example: MjkY format: string type: string hasNextPage: description: True if there are more pages of results immediately available after this endCursor. example: true type: boolean required: - endCursor - hasNextPage type: object HosClocks: description: Remaining durations and start times (where applicable) for various HOS rules. See [this page](https://www.samsara.com/fleet/eld-compliance/hours-of-service) for more information on HOS rules. properties: break: $ref: '#/components/schemas/HosBreak' cycle: $ref: '#/components/schemas/HosCycle' drive: $ref: '#/components/schemas/HosDrive' shift: $ref: '#/components/schemas/HosShift' type: object EldSettingsObjectResponseBody: description: The driver's ELD settings. properties: rulesets: description: The driver's ELD rulesets and overrides. items: $ref: '#/components/schemas/DriverRulesetObjectResponseBody' type: array type: object GoaDriverTinyResponseResponseBody: description: A minified driver object. This object is only returned if the route is assigned to the driver. properties: externalIds: additionalProperties: type: string description: A map of external ids type: object id: description: ID of the driver example: '45646' type: string name: description: Name of the driver example: Driver Bob type: string required: - id type: object HosViolationsGetHosViolationsInternalServerErrorResponseBody: description: An internal server error occurred properties: message: description: Message of error example: Failed to execute GraphQL query. type: string requestId: description: The request ID; used when reaching out to support for issues with requests. example: 8916e1c1 type: string required: - message - requestId type: object DutyStatusDurationObjectResponseBody: description: The currently applied duty status durations on the driver's log. properties: activeDurationMs: description: Duration the driver was active for in the log period in milliseconds. example: 38825000 format: int64 type: integer driveDurationMs: description: Duration the driver was driving for in the log period in milliseconds. example: 31970000 format: int64 type: integer offDutyDurationMs: description: Duration the driver was off duty for in the log period in milliseconds. example: 20555000 format: int64 type: integer onDutyDurationMs: description: Duration the driver was on duty for in the log period in milliseconds. example: 5423000 format: int64 type: integer personalConveyanceDurationMs: description: Duration the driver was driving for personal conveyance for in the log period in milliseconds. example: 4358000 format: int64 type: integer sleeperBerthDurationMs: description: Duration the driver was in their sleeper berth for in the log period in milliseconds. example: 27020000 format: int64 type: integer waitingTimeDurationMs: description: Duration the driver was waiting for in the log period in milliseconds. example: 1560000 format: int64 type: integer yardMoveDurationMs: description: Duration the driver was driving for yard moves for in the log period in milliseconds. example: 1432000 format: int64 type: integer type: object DriverRulesetObjectResponseBody: properties: break: description: 'The rest break required setting of the ELD ruleset applied to this driver. Valid values: `Property (off-duty/sleeper)`, `Explosives/HazMat (on-duty)`' enum: - Property (off-duty/sleeper) - Explosives/HazMat (on-duty) example: Explosives/HazMat (on-duty) type: string cycle: description: 'The cycle of the ELD ruleset applied to this driver. Valid values: `USA 60 hour / 7 day`, `USA 70 hour / 8 day`, `AK 80 hour / 8 day`, `AK 70 hour / 7 day`, `CA 80 hour / 8 day`, `CA 112 hour / 8 day`, `FL 80 hour / 8 day`, `FL 70 hour / 7 day`, `NE 80 hour / 8 day`, `NE 70 hour / 7 day`, `NC 80 hour / 8 day`, `NC 70 hour / 7 day`, `OK 70 hour / 8 day`, `OK 60 hour / 7 day`, `OR 80 hour / 8 day`, `OR 70 hour / 7 day`, `SC 80 hour / 8 day`, `SC 70 hour / 7 day`, `TX 70 hour / 7 day`, `WI 80 hour / 8 day`, `WI 70 hour / 7 day`, `Canada South Cycle 1 (70 hour / 7 day)`, `Canada South Cycle 2 (120 hour / 14 day)`, `Canada North Cycle 1 (80 hour / 7 day)`, `Canada North Cycle 2 (120 hour / 14 day)`' enum: - USA 60 hour / 7 day - USA 70 hour / 8 day - AK 80 hour / 8 day - AK 70 hour / 7 day - CA 80 hour / 8 day - CA 112 hour / 8 day - FL 80 hour / 8 day - FL 70 hour / 7 day - NE 80 hour / 8 day - NE 70 hour / 7 day - NC 80 hour / 8 day - NC 70 hour / 7 day - OK 70 hour / 8 day - OK 60 hour / 7 day - OR 80 hour / 8 day - OR 70 hour / 7 day - SC 80 hour / 8 day - SC 70 hour / 7 day - TX 70 hour / 7 day - WI 80 hour / 8 day - WI 70 hour / 7 day - Canada South Cycle 1 (70 hour / 7 day) - Canada South Cycle 2 (120 hour / 14 day) - Canada North Cycle 1 (80 hour / 7 day) - Canada North Cycle 2 (120 hour / 14 day) example: USA 60 hour / 7 day type: string jurisdiction: description: The jurisdiction of the ELD ruleset applied to this driver. These are specified by either `CS` or `CN` for Canada South and Canada North, respectively, or the ISO 3166-2 postal code for the supported state or territory. example: AR type: string restart: description: 'The restart of the ELD ruleset applied to this driver. Valid values: `34-hour Restart`, `24-hour Restart`, `36-hour Restart`, `72-hour Restart`' enum: - 34-hour Restart - 24-hour Restart - 36-hour Restart - 72-hour Restart example: 34-hour Restart type: string shift: description: 'The shift of the ELD ruleset applied to this driver. Valid values: `US Interstate Property`, `US Interstate Passenger`' enum: - US Interstate Property - US Interstate Passenger example: US Interstate Property type: string type: object CurrentDutyStatus: description: The current HOS status type and time the driver started being in this status. properties: hosStatusType: description: 'The Hours of Service status type. If the driver app is disconnected, an empty string will be returned. To reconnect the app and return updated values, drivers should have the app open with good cell service. Valid values: `offDuty`, `sleeperBed`, `driving`, `onDuty`, `yardMove`, `personalConveyance`.' enum: - offDuty - sleeperBed - driving - onDuty - yardMove - personalConveyance example: offDuty type: string type: object HosLogsForDriver: description: List of HOS logs for a driver. properties: driver: $ref: '#/components/schemas/driverTinyResponse' hosLogs: $ref: '#/components/schemas/HosLogsList' type: object HosViolationsGetHosViolationsNotImplementedErrorResponseBody: description: Requested endpoint is not yet implemented properties: message: description: Message of error example: Not implemented. type: string requestId: description: The request ID; used when reaching out to support for issues with requests. example: 8916e1c1 type: string required: - message - requestId type: object HosViolationsGetHosViolationsTooManyRequestsErrorResponseBody: description: Too many requests properties: message: description: Message of error example: Exceeded rate limit. type: string requestId: description: The request ID; used when reaching out to support for issues with requests. example: 8916e1c1 type: string required: - message - requestId type: object HosDailyLogsGetHosDailyLogsMethodNotAllowedErrorResponseBody: description: Method not allowed properties: message: description: Message of error example: DELETE not allowed on /endpoint. type: string requestId: description: The request ID; used when reaching out to support for issues with requests. example: 8916e1c1 type: string required: - message - requestId type: object HosViolationsGetHosViolationsResponseBody: properties: data: description: List of violations data items: $ref: '#/components/schemas/HosViolationsObjectResponseBody' type: array pagination: $ref: '#/components/schemas/GoaPaginationResponseResponseBody' required: - data - pagination type: object inline_object_1: properties: duty_status: description: Duty status to set the driver to. The only supported values are 'ON_DUTY' and 'OFF_DUTY'. example: ON_DUTY type: string location: description: Location to associate the duty status change with. example: Loading dock type: string remark: description: Remark to associate the duty status change with. example: Beginning On Duty Shift type: string status_change_at_ms: description: 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. example: 1580834793568 format: int64 type: number vehicle_id: description: Vehicle ID to associate the duty status change with. example: 1234 format: int64 type: number required: - duty_status type: object HosViolationsGetHosViolationsMethodNotAllowedErrorResponseBody: description: Method not allowed properties: message: description: Message of error example: DELETE not allowed on /endpoint. type: string requestId: description: The request ID; used when reaching out to support for issues with requests. example: 8916e1c1 type: string required: - message - requestId type: object HosDailyLogsGetHosDailyLogsUnauthorizedErrorResponseBody: description: Unauthorized properties: message: description: Message of error example: Invalid token. type: string requestId: description: The request ID; used when reaching out to support for issues with requests. example: 8916e1c1 type: string required: - message - requestId type: object HosDailyLogsObjectResponseBody: properties: distanceTraveled: $ref: '#/components/schemas/DistanceTraveledObjectResponseBody' driver: $ref: '#/components/schemas/DriverWithTimezoneEldSettingsObjectResponseBody' dutyStatusDurations: $ref: '#/components/schemas/DutyStatusDurationObjectResponseBody' endTime: description: The end time of the daily log in RFC 3339 format. This will be calculated using timezone of the driver. example: '2019-06-20T19:08:25Z' type: string logMetaData: $ref: '#/components/schemas/LogMetaDataObjectResponseBody' pendingDutyStatusDurations: $ref: '#/components/schemas/PendingDutyStatusDurationsObjectResponseBody' startTime: description: The start time of the daily log in RFC 3339 format. This will be calculated using timezone of the driver. example: '2019-06-13T19:08:25Z' type: string required: - driver - endTime - startTime type: object requestBodies: inline_object_1: content: application/json: schema: $ref: '#/components/schemas/inline_object_1' required: false securitySchemes: AccessTokenHeader: type: http scheme: bearer x-original-swagger-version: '2.0' x-readme: explorer-enabled: true proxy-enabled: true