{
  "opencollection": "1.0.0",
  "info": {
    "name": "Samsara Driver API",
    "version": "2024-11-18"
  },
  "request": {
    "auth": {
      "type": "bearer",
      "token": "{{bearerToken}}"
    }
  },
  "items": [
    {
      "info": {
        "name": "Driver",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "Get Driver Coach Assignments.",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.samsara.com/coaching/driver-coach-assignments",
            "params": [
              {
                "name": "driverIds",
                "value": "",
                "type": "query",
                "description": "Optional string of comma separated IDs of the drivers. This can be either a unique Samsara driver ID or an external ID for the driver."
              },
              {
                "name": "coachIds",
                "value": "",
                "type": "query",
                "description": "Optional string of comma separated IDs of the coaches."
              },
              {
                "name": "includeExternalIds",
                "value": "",
                "type": "query",
                "description": "Optional boolean indicating whether to return external IDs on supported entities"
              },
              {
                "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 coach assignments for your organization based on the parameters passed in. Results are paginated.\n\n <b>Rate limit:</b> 10 requests/sec (learn more about rate limits <a href=\"https://developers.samsara.com/docs/rate-limits\" target=\"_blank\">here</a>).\n\nTo use this endpoint, select **Read Coaching** under the Coaching category when creating or editing an API token. <a href=\"https://developers.samsara.com/docs/authentication#scopes-for-api-tokens\" target=\"_blank\">Learn More"
        },
        {
          "info": {
            "name": "Put Driver Coach Assignments.",
            "type": "http"
          },
          "http": {
            "method": "PUT",
            "url": "https://api.samsara.com/coaching/driver-coach-assignments",
            "params": [
              {
                "name": "driverId",
                "value": "",
                "type": "query",
                "description": "Required string ID of the driver. This is a unique Samsara ID of a driver."
              },
              {
                "name": "coachId",
                "value": "",
                "type": "query",
                "description": "Optional string ID of the coach. This is a unique Samsara user ID. If not provided, existing coach assignment will be removed."
              }
            ]
          },
          "docs": "This endpoint will update an existing or create a new coach-to-driver assignment for your organization based on the parameters passed in. This endpoint should only be used for existing Coach to Driver assignments. In order to remove a driver-coach-assignment for a given driver, set coachId to null\n\n <b>Rate limit:</b> 10 requests/sec (learn more about rate limits <a href=\"https://developers.samsara.com/docs/rate-limits\" target=\"_blank\">here</a>).\n\nTo use this endpoint, select **Write Coaching** "
        },
        {
          "info": {
            "name": "Get All Driver-vehicle Assignments",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.samsara.com/fleet/driver-vehicle-assignments",
            "params": [
              {
                "name": "filterBy",
                "value": "",
                "type": "query",
                "description": "Option to filter by drivers or vehicles.  Valid values: `drivers`, `vehicles`"
              },
              {
                "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": "vehicleIds",
                "value": "",
                "type": "query",
                "description": "ID of the vehicle. 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, \"maintenanceId:250020\"."
              },
              {
                "name": "driverTagIds",
                "value": "",
                "type": "query",
                "description": " A filter on the data based on this comma-separated list of driver tag IDs. Example: `tagIds=1234,5678`"
              },
              {
                "name": "vehicleTagIds",
                "value": "",
                "type": "query",
                "description": " A filter on the data based on this comma-separated list of vehicle tag IDs. Example: `tagIds=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": "assignmentType",
                "value": "",
                "type": "query",
                "description": "Specifies which assignment type to filter by.  Valid values: `HOS`, `idCard`, `static`, `faceId`, `tachograph`, `safetyManual`, `RFID`, `trailer`, `external`, `qrCode`"
              }
            ]
          },
          "docs": "Get all driver-vehicle assignments for the requested drivers or vehicles in the requested time range. To fetch driver-vehicle assignments out of the vehicle trips' time ranges, assignmentType needs to be specified. Note: this endpoint replaces past endpoints to fetch assignments by driver or by vehicle. Visit [this migration guide](https://developers.samsara.com/docs/migrating-from-driver-vehicle-assignment-or-vehicle-driver-assignment-endpoints) for more information.\n\n <b>Rate limit:</b> 5 requ"
        },
        {
          "info": {
            "name": "Create a New Driver-vehicle Assignment",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.samsara.com/fleet/driver-vehicle-assignments",
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Assign vehicle drive-time to a driver via API. For a step-by-step instruction on how to leverage this endpoint, see [this guide](https://developers.samsara.com/docs/creating-driver-vehicle-assignments)\n\n <b>Rate limit:</b> 100 requests/min (learn more about rate limits <a href=\"https://developers.samsara.com/docs/rate-limits\" target=\"_blank\">here</a>).\n\nTo use this endpoint, select **Write Assignments** under the Assignments category when creating or editing an API token. <a href=\"https://develo"
        },
        {
          "info": {
            "name": "Update API Generated Driver-vehicle Assignments",
            "type": "http"
          },
          "http": {
            "method": "PATCH",
            "url": "https://api.samsara.com/fleet/driver-vehicle-assignments",
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Update driver assignments that were created using the `POST fleet/driver-vehicle-assignments`. Vehicle Id, Driver Id, and Start Time must match an existing assignment.\n\n <b>Rate limit:</b> 100 requests/min (learn more about rate limits <a href=\"https://developers.samsara.com/docs/rate-limits\" target=\"_blank\">here</a>).\n\nTo use this endpoint, select **Write Assignments** under the Assignments category when creating or editing an API token. <a href=\"https://developers.samsara.com/docs/authenticati"
        },
        {
          "info": {
            "name": "Delete API Generated Driver-vehicle Assignments",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "https://api.samsara.com/fleet/driver-vehicle-assignments",
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Delete driver assignments that were created using the `POST fleet/driver-vehicle-assignments` endpoint for the requested vehicle in the requested time range.\n\n <b>Rate limit:</b> 100 requests/min (learn more about rate limits <a href=\"https://developers.samsara.com/docs/rate-limits\" target=\"_blank\">here</a>).\n\nTo use this endpoint, select **Write Assignments** under the Assignments category when creating or editing an API token. <a href=\"https://developers.samsara.com/docs/authentication#scopes-"
        },
        {
          "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 <b>Rate limit:</b> 10 requests/sec (learn more about rate limits <a href=\"https://developers.samsara.com/docs/rate-limits\" target=\"_blank\">here</a>).\n\nTo use this endpoint, select **Read Driver Efficiency** under the Closed Beta category when creating or editing an API token. <a href=\"https://developers.samsara.com/"
        },
        {
          "info": {
            "name": "[preview] Get Driver Efficiency Data Grouped by Vehicles.",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.samsara.com/preview/driver-efficiency/vehicles",
            "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": "vehicleIds",
                "value": "",
                "type": "query",
                "description": " A filter on the data based on this comma-separated list of vehicle IDs and externalIds. Example: `vehicleIds=1234,5678,samsara.vin:1HGBH41JXMN109186`"
              },
              {
                "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 vehicle drivers used based on the time parameters passed in. Results are paginated.\n\n <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>).\n\nTo use this endpoint, select **Read Driver Efficiency** under the Closed Beta category when creating or editing an API token. <a href=\"https://developers."
        }
      ]
    }
  ],
  "bundled": true
}