/** * Samsara API * # Overview Something new! Welcome Samsara\'s new and improved API. Check out our FAQ [here](https://developers.samsara.com/docs/introducing-our-next-generation-api) to see what\'s changed and learn how to get started.

Want to access the legacy API docs? You can find them [here](https://www.samsara.com/api-legacy).

*Note: Because this is a new set of APIs, we have not transitioned all endpoints over to this standard. Endpoints that still use the legacy standards are indicated in the reference documentation. If you can\'t find an API that you\'re looking for, we encourage you to look for it in our [legacy API docs](https://www.samsara.com/api-legacy) as we continue to transition all endpoints over. Check back here for updates!*

Submit your feedback [here](https://forms.gle/r4bs6HQshQAvBuwv6)!
Samsara provides API endpoints so that you can build powerful applications and custom solutions with sensor data. Samsara has endpoints available to track and analyze sensors, vehicles, and entire fleets. The Samsara API is a [RESTful API](https://en.wikipedia.org/wiki/Representational_state_transfer). It uses standard [HTTP](https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol) authentication, verbs, and response codes, and it returns [JSON](http://www.json.org/) response bodies. If you\'re familiar with what you can build with a REST API, then this will be your go-to API reference. Visit [developers.samsara.com](https://developers.samsara.com) to find getting started guides and an API overview. If you have any questions, please visit https://samsara.com/help. ## Endpoints All our APIs can be accessed through HTTP requests to URLs like: ``` https://api.samsara.com/ ``` For EU customers, this URL will be: ``` https://api.eu.samsara.com/ ``` Note Legacy endpoints will have the URL: `https://api.samsara.com/v1/` or `https://api.eu.samsara.com/v1/` ## Authentication To authenticate your API request you will need to include your secret token. You can manage your API tokens in the [Dashboard](https://cloud.samsara.com). They are visible under `Settings->Organization->API Tokens`. Your API tokens carry many privileges, so be sure to keep them secure. Do not share your secret API tokens in publicly accessible areas such as GitHub, client-side code, and so on. Authentication to the API is performed via Bearer Token in the HTTP Authorization header. Provide your API token as the `access_token` value in an `Authorization: Bearer` header. You do not need to provide a password: ```curl Authorization: Bearer {access_token} ``` All API requests must be made over [HTTPS](https://en.wikipedia.org/wiki/HTTPS). Calls made over plain HTTP or without authentication will fail. ### OAuth2 If building an application for our marketplace, our API is accessible via. OAuth2 as well. | Type | Value | | ------------- |:-------------:| | Security scheme | OAuth2 | | OAuth2 Flow | accessCode | | Authorization URL | https://api.samsara.com/oauth2/authorize | | Token URL | https://api.samsara.com/oauth2/token | ## Common Patterns You can find more info about request methods, response codes, error codes, versioning, pagination, timestamps, and mini-objects [here](https://developers.samsara.com/docs/common-structures). * * The version of the OpenAPI document: 2024-11-18 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import { AttributeTiny } from './attribute-tiny'; import { DriverActivationStatus } from './driver-activation-status'; import { DriverCarrierSettings } from './driver-carrier-settings'; import { DriverEldSettings } from './driver-eld-settings'; import { DriverLocale } from './driver-locale'; import { DriverStaticAssignedVehicle } from './driver-static-assigned-vehicle'; import { DriverVehicleGroupTag } from './driver-vehicle-group-tag'; import { TagTinyResponse } from './tag-tiny-response'; import { UsDriverRulesetOverride } from './us-driver-ruleset-override'; /** * A driver object * @export * @interface Driver */ export interface Driver { /** * A minified attribute * @type {Array} * @memberof Driver */ 'attributes'?: Array; /** * * @type {DriverCarrierSettings} * @memberof Driver */ 'carrierSettings'?: DriverCarrierSettings; /** * The date and time this driver was created in RFC 3339 format. * @type {string} * @memberof Driver */ 'createdAtTime'?: string; /** * The ID Card Code on the back of the physical card assigned to the driver. Contact Samsara if you would like to enable this feature. * @type {string} * @memberof Driver */ 'currentIdCardCode'?: string; /** * * @type {DriverActivationStatus} * @memberof Driver */ 'driverActivationStatus'?: DriverActivationStatus; /** * Flag indicating this driver may use Adverse Weather exemptions in ELD logs. * @type {boolean} * @memberof Driver */ 'eldAdverseWeatherExemptionEnabled'?: boolean; /** * Flag indicating this driver may use Big Day exemption in ELD logs. * @type {boolean} * @memberof Driver */ 'eldBigDayExemptionEnabled'?: boolean; /** * `0` indicating midnight-to-midnight ELD driving hours, `12` to indicate noon-to-noon driving hours. * @type {number} * @memberof Driver */ 'eldDayStartHour'?: number; /** * Flag indicating this driver is exempt from the Electronic Logging Mandate. * @type {boolean} * @memberof Driver */ 'eldExempt'?: boolean; /** * Reason that this driver is exempt from the Electronic Logging Mandate (see eldExempt). * @type {string} * @memberof Driver */ 'eldExemptReason'?: string; /** * Flag indicating this driver may select the Personal Conveyance duty status in ELD logs. * @type {boolean} * @memberof Driver */ 'eldPcEnabled'?: boolean; /** * * @type {DriverEldSettings} * @memberof Driver */ 'eldSettings'?: DriverEldSettings; /** * Flag indicating this driver may select the Yard Move duty status in ELD logs. * @type {boolean} * @memberof Driver */ 'eldYmEnabled'?: boolean; /** * The [external IDs](https://developers.samsara.com/docs/external-ids) for the given object. * @type {object} * @memberof Driver */ 'externalIds'?: object; /** * A boolean indicating whether the driver has driving-related features hidden in the Driver App, including Vehicle selection, HOS, Routing, Team Driving, Documents, and Trip Logs. Default value is false if omitted. Note: only available to customers of Connected Forms. * @type {boolean} * @memberof Driver */ 'hasDrivingFeaturesHidden'?: boolean; /** * Samsara ID for the driver. * @type {string} * @memberof Driver */ 'id'?: string; /** * [DEPRECATED] A boolean indicating whether or not the driver is deactivated. Use `driverActivationStatus` instead. * @type {boolean} * @memberof Driver */ 'isDeactivated'?: boolean; /** * Driver\'s state issued license number. The combination of this number and `licenseState` must be unique. * @type {string} * @memberof Driver */ 'licenseNumber'?: string; /** * Abbreviation of US state, Canadian province, or US territory that issued driver\'s license. * @type {string} * @memberof Driver */ 'licenseState'?: string; /** * * @type {DriverLocale} * @memberof Driver */ 'locale'?: DriverLocale; /** * Driver\'s name. * @type {string} * @memberof Driver */ 'name'?: string; /** * Notes about the driver. * @type {string} * @memberof Driver */ 'notes'?: string; /** * * @type {TagTinyResponse} * @memberof Driver */ 'peerGroupTag'?: TagTinyResponse; /** * Phone number of the driver. * @type {string} * @memberof Driver */ 'phone'?: string; /** * * @type {DriverStaticAssignedVehicle} * @memberof Driver */ 'staticAssignedVehicle'?: DriverStaticAssignedVehicle; /** * Driver\'s assigned tachograph card number (Europe specific) * @type {string} * @memberof Driver */ 'tachographCardNumber'?: string; /** * The tags this driver belongs to. * @type {Array} * @memberof Driver */ 'tags'?: Array; /** * 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). * @type {string} * @memberof Driver */ 'timezone'?: string; /** * The date and time this driver was last updated in RFC 3339 format. * @type {string} * @memberof Driver */ 'updatedAtTime'?: string; /** * * @type {UsDriverRulesetOverride} * @memberof Driver */ 'usDriverRulesetOverride'?: UsDriverRulesetOverride; /** * Driver\'s login username into the driver app. The username may not contain spaces or the \'@\' symbol. The username must be unique. * @type {string} * @memberof Driver */ 'username'?: string; /** * * @type {DriverVehicleGroupTag} * @memberof Driver */ 'vehicleGroupTag'?: DriverVehicleGroupTag; /** * Flag indicating this driver may select waiting time duty status in ELD logs. * @type {boolean} * @memberof Driver */ 'waitingTimeDutyStatusEnabled'?: boolean; }