{ "opencollection": "1.0.0", "info": { "name": "Samsara Drivers API", "version": "2024-11-18" }, "request": { "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "items": [ { "info": { "name": "Drivers", "type": "folder" }, "items": [ { "info": { "name": "[beta] Get Driver HOS ELD Events", "type": "http" }, "http": { "method": "GET", "url": "https://api.samsara.com/beta/fleet/hos/drivers/eld-events", "params": [ { "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": "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": "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": "limit", "value": "", "type": "query", "description": "The limit for how many objects will be in the response. Default and max for this value is 25 objects." } ] }, "docs": "Get all HOS ELD events in a time range, grouped by driver. Attributes will be populated depending on which ELD Event Type is being returned.\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. 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 Drivers** under the Drivers category when creating or editing an " }, { "info": { "name": "Create a Driver", "type": "http" }, "http": { "method": "POST", "url": "https://api.samsara.com/fleet/drivers", "body": { "type": "json", "data": "{}" } }, "docs": "Add a driver to the organization. \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 Drivers** under the Drivers category when creating or editing a" }, { "info": { "name": "Get Driver Tachograph Activity", "type": "http" }, "http": { "method": "GET", "url": "https://api.samsara.com/fleet/drivers/tachograph-activity/history", "params": [ { "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": "startTime", "value": "", "type": "query", "description": "A start time in RFC 3339 format. 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. It can't be more than 30 days past startTime. 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": "driverIds", "value": "", "type": "query", "description": "A filter on the data based on this comma-separated list of driver IDs. Example: `driverIds=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": "tagIds", "value": "", "type": "query", "description": "A filter on the data based on this comma-separated list of tag IDs. Example: `tagIds=1234,5678`" } ] }, "docs": "Returns all known tachograph activity for all specified drivers in the time range. \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 Tachograph (EU)" }, { "info": { "name": "Get Tachograph Driver Files", "type": "http" }, "http": { "method": "GET", "url": "https://api.samsara.com/fleet/drivers/tachograph-files/history", "params": [ { "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": "startTime", "value": "", "type": "query", "description": "A start time in RFC 3339 format. 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. 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": "driverIds", "value": "", "type": "query", "description": "A filter on the data based on this comma-separated list of driver IDs. Example: `driverIds=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": "tagIds", "value": "", "type": "query", "description": "A filter on the data based on this comma-separated list of tag IDs. Example: `tagIds=1234,5678`" } ] }, "docs": "Returns all known tachograph files for all specified drivers in the time range. \n\n Rate limit: 50 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, ple" }, { "info": { "name": "[legacy] Get All Vehicles Assigned to a Set of Drivers", "type": "http" }, "http": { "method": "GET", "url": "https://api.samsara.com/fleet/drivers/vehicle-assignments", "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). The maximum allowed startTime-endTime range is 7 days." }, { "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). The maximum allowed startTime-endTime range is 7 days." }, { "name": "tagIds", "value": "", "type": "query", "description": " A filter on the data based on this comma-separated list of driver tag IDs. Example: `tagIds=1234,5678`" }, { "name": "parentTagIds", "value": "", "type": "query", "description": " A filter on the data based on this comma-separated list of driver 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." } ] }, "docs": "**Note: This is a legacy endpoint, consider using [this endpoint](https://developers.samsara.com/reference/getdrivervehicleassignments) instead. The endpoint will continue to function as documented.** Get all vehicle assignments for the requested drivers in the requested time range. The only type of assignment supported right now are assignments created through the driver app.\n\n Rate limit: 25 requests/sec (learn more about rate limits 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 Drivers** under the Drivers category when creating or editing an A" }, { "info": { "name": "Update a Driver", "type": "http" }, "http": { "method": "PATCH", "url": "https://api.samsara.com/fleet/drivers/:id", "params": [ { "name": "id", "value": "", "type": "path", "description": "ID of the driver. This can either be the Samsara-specified ID, or an external ID. External IDs are customer specified key-value pairs created in the POST or PATCH requests of this resource. To specify an external ID as part of a path parameter, use the following format: `key:value`. For example, `payrollId:ABFS18600`" } ], "body": { "type": "json", "data": "{}" } }, "docs": "Update a specific driver's information. This can also be used to activate or de-activate a given driver by setting the driverActivationStatus field. If the driverActivationStatus field is 'deactivated' then the user can also specify the deactivatedAtTime. The deactivatedAtTime cannot be more than 6 months in the past and must not come before the dirver's latest active HOS log. It will be considered an error if deactivatedAtTime is provided with a driverActivationStatus of active. \n\n **Submit Fee" }, { "info": { "name": "[preview] Get Driver Efficiency Data Grouped by Drivers.", "type": "http" }, "http": { "method": "GET", "url": "https://api.samsara.com/preview/driver-efficiency/drivers", "params": [ { "name": "startTime", "value": "", "type": "query", "description": "A start time in RFC 3339 format. Must be in multiple of hours and at least 1 day before endTime. Timezones are supported. Note that the most recent 72 hours of data may still be processing and is subject to change and latency, so it is not recommended to request data for the most recent 72 hours. (Examples: 2019-06-11T19:00:00Z, 2015-09-12T14:00:00-04:00)." }, { "name": "endTime", "value": "", "type": "query", "description": "An end time in RFC 3339 format. Must be in multiple of hours and no later than 3 hours before the current time. Timezones are supported. Note that the most recent 72 hours of data may still be processing and is subject to change and latency, so it is not recommended to request data for the most recent 72 hours. (Examples: 2019-06-13T19:00:00Z, 2015-09-15T14:00:00-04:00)." }, { "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": "dataFormats", "value": "", "type": "query", "description": "A comma-separated list of data formats you want to fetch. Valid values: `score`, `raw` and `percentage`. The default data format is `score`. Example: `dataFormats=raw,score`" }, { "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": "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": "This endpoint will return driver efficiency data that has been collected for your organization and grouped by drivers based on the time parameters passed in. Results are paginated.\n\n Rate limit: 10 requests/sec (learn more about rate limits here).\n\nTo use this endpoint, select **Read Driver Efficiency** under the Closed Beta category when creating or editing an API token. \n\n\nThis endpoint is still on our legacy API.\n\n\n\nFetch the safety score for the driver.\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 y" }, { "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" } ] } ], "bundled": true }