{
"opencollection": "1.0.0",
"info": {
"name": "Samsara Hos API",
"version": "2024-11-18"
},
"request": {
"auth": {
"type": "bearer",
"token": "{{bearerToken}}"
}
},
"items": [
{
"info": {
"name": "Hos",
"type": "folder"
},
"items": [
{
"info": {
"name": "Get HOS Clocks",
"type": "http"
},
"http": {
"method": "GET",
"url": "https://api.samsara.com/fleet/hos/clocks",
"params": [
{
"name": "tagIds",
"value": "",
"type": "query",
"description": "A filter on the data based on this comma-separated list of tag IDs. Example: `tagIds=1234,5678`"
},
{
"name": "parentTagIds",
"value": "",
"type": "query",
"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`"
},
{
"name": "driverIds",
"value": "",
"type": "query",
"description": "A filter on the data based on this comma-separated list of driver IDs. Example: `driverIds=1234,5678`"
},
{
"name": "after",
"value": "",
"type": "query",
"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."
},
{
"name": "limit",
"value": "",
"type": "query",
"description": "The limit for how many objects will be in the response. Default and max for this value is 512 objects."
}
]
},
"docs": "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 "
},
{
"info": {
"name": "Get All Driver HOS Daily Logs",
"type": "http"
},
"http": {
"method": "GET",
"url": "https://api.samsara.com/fleet/hos/daily-logs",
"params": [
{
"name": "driverIds",
"value": "",
"type": "query",
"description": " A filter on the data based on this comma-separated list of driver IDs and externalIds. Example: `driverIds=1234,5678,payroll:4841`"
},
{
"name": "startDate",
"value": "",
"type": "query",
"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"
},
{
"name": "endDate",
"value": "",
"type": "query",
"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"
},
{
"name": "tagIds",
"value": "",
"type": "query",
"description": " A filter on the data based on this comma-separated list of tag IDs. Example: `tagIds=1234,5678`"
},
{
"name": "parentTagIds",
"value": "",
"type": "query",
"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`"
},
{
"name": "driverActivationStatus",
"value": "",
"type": "query",
"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`"
},
{
"name": "after",
"value": "",
"type": "query",
"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."
},
{
"name": "expand",
"value": "",
"type": "query",
"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.\n\nValid value: `vehicle` Valid values: `vehicle`"
}
]
},
"docs": "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, "
},
{
"info": {
"name": "Get HOS Logs",
"type": "http"
},
"http": {
"method": "GET",
"url": "https://api.samsara.com/fleet/hos/logs",
"params": [
{
"name": "tagIds",
"value": "",
"type": "query",
"description": "A filter on the data based on this comma-separated list of tag IDs. Example: `tagIds=1234,5678`"
},
{
"name": "parentTagIds",
"value": "",
"type": "query",
"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`"
},
{
"name": "driverIds",
"value": "",
"type": "query",
"description": "A filter on the data based on this comma-separated list of driver IDs. Example: `driverIds=1234,5678`"
},
{
"name": "startTime",
"value": "",
"type": "query",
"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)."
},
{
"name": "endTime",
"value": "",
"type": "query",
"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)."
},
{
"name": "after",
"value": "",
"type": "query",
"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."
}
]
},
"docs": "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 befo"
},
{
"info": {
"name": "Get All Driver HOS Violations",
"type": "http"
},
"http": {
"method": "GET",
"url": "https://api.samsara.com/fleet/hos/violations",
"params": [
{
"name": "driverIds",
"value": "",
"type": "query",
"description": " A filter on the data based on this comma-separated list of driver IDs and externalIds. Example: `driverIds=1234,5678,payroll:4841`"
},
{
"name": "startTime",
"value": "",
"type": "query",
"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)."
},
{
"name": "endTime",
"value": "",
"type": "query",
"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)."
},
{
"name": "tagIds",
"value": "",
"type": "query",
"description": " A filter on the data based on this comma-separated list of tag IDs. Example: `tagIds=1234,5678`"
},
{
"name": "parentTagIds",
"value": "",
"type": "query",
"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`"
},
{
"name": "types",
"value": "",
"type": "query",
"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`"
},
{
"name": "after",
"value": "",
"type": "query",
"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."
}
]
},
"docs": "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 sho"
},
{
"info": {
"name": "Set a Duty Status for a Specific Driver",
"type": "http"
},
"http": {
"method": "POST",
"url": "https://api.samsara.com/v1/fleet/drivers/:driver_id/hos/duty_status",
"params": [
{
"name": "driver_id",
"value": "",
"type": "path",
"description": "ID of the driver for whom the duty status is being set."
}
],
"body": {
"type": "json",
"data": "{}"
}
},
"docs": "\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 que"
},
{
"info": {
"name": "Get HOS Signin and Signout",
"type": "http"
},
"http": {
"method": "GET",
"url": "https://api.samsara.com/v1/fleet/hos_authentication_logs",
"params": [
{
"name": "driverId",
"value": "",
"type": "query",
"description": "Driver ID to query."
},
{
"name": "startMs",
"value": "",
"type": "query",
"description": "Beginning of the time range, specified in milliseconds UNIX time."
},
{
"name": "endMs",
"value": "",
"type": "query",
"description": "End of the time range, specified in milliseconds UNIX time."
}
]
},
"docs": "\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 da"
}
]
}
],
"bundled": true
}