### 200 Response Schema for Equipment Object Source: https://github.com/samsarahq/api-docs/blob/master/markdown/readme/patchequipment.md Defines the complete structure of the JSON payload returned for a successful equipment query. It includes top-level equipment properties and deeply nested objects for attributes, installed gateway details, and tags, specifying data types and detailed descriptions for each field. ```APIDOC 200 Response Schema: data: type: object description: The equipment object. properties: attributes: type: object array description: List of attributes associated with the entity properties: id: type: string description: Id of the attribute name: type: string description: Name of the attribute numberValues: type: number array description: List of number values associated with the attribute stringValues: type: string array description: List of string values associated with the attribute. equipmentSerialNumber: type: string description: The serial number of the equipment. externalIds: type: object description: A map of external ids id: type: string description: The unique Samsara ID of the Equipment. This is automatically generated when the Equipment object is created. It cannot be changed. installedGateway: type: object description: A minified gateway object properties: asset: type: object description: An objecting containing information about the asset the gateway is installed on properties: externalIds: type: object description: A map of external ids id: type: string description: The unique Samsara ID of the asset where the gateway is installed. This is automatically generated when the asset is created and cannot be changed. Use this ID on PATCH vehicle, equipment, or trailer endpoints to update the asset model: type: string description: The model of the gateway installed on the asset. Valid values: `none`, `AG45`, `AG41`, `AG46EU`, `IG41`, `VG34`, `IG15`, `EM22`, `PM7`, `VG54NA`, `OEMP`, `ACCCRGO`, `EM01`, `Baxter`, `IGMAO`, `EKM`, `DM1`, `VG54EU`, `IG11`, `CM12`, `AG41EU`, `IM32`, `AG46P`, `EM12`, `EM21`, `CM31`, `AG46`, `IG61`, `OEMV`, `Trailer`, `IM31`, `VG33`, `AG24`, `HM21`, `EM23`, `VG34EU`, `AG26EU`, `IG20`, `HM11`, `NVR10`, `VG34FN`, `IG21`, `IGMAI`, `AG15`, `OEM`, `AG26`, `SG1`, `VS25C`, `PM20`, `ACCBDH`, `AG24EU`, `CMVR`, `ACCHMI10`, `OEMR`, `VG32`, `PM10`, `VS2C`, `EM02`, `EM11`, `IM33`, `ACCDM11`, `CM52`, `CM11`, `GW22`, `VS25`, `CM22`, `CM32`, `PM8`, `WM11`, `AG45EU`. serial: type: string description: The serial number of the gateway installed on the asset. name: type: string description: The human-readable name of the Equipment. This is set by a fleet administrator and will appear in both Samsara’s cloud dashboard as well as the Samsara Driver mobile app. By default, this name is the serial number of the Samsara Asset Gateway. It can be set or updated through the Samsara Dashboard or through the API at any time. notes: type: string description: These are generic notes about the Equipment. Empty by default. Can be set or updated through the Samsara Dashboard or the API at any time. tags: type: object array description: The list of [tags](https://kb.samsara.com/hc/en-us/articles/360026674631-Using-Tags-and-Tag-Nesting) associated with the Equipment. properties: id: type: string description: ID of the tag name: type: string description: Name of the tag. parentTagId: type: string description: If this tag is part a hierarchical tag tree, this is the ID of the parent tag, otherwise this will be omitted. ``` -------------------------------- ### Equipment Object 200 Response Schema Source: https://github.com/samsarahq/api-docs/blob/master/markdown/getequipment.md This API documentation snippet details the expected structure of a successful HTTP 200 response when retrieving an equipment object. It describes all top-level and nested properties, their data types, and their purpose, providing a comprehensive guide for parsing the API response. ```APIDOC 200 Response Schema: data: object An equipment object. assetSerial: string An equipment identification number. externalIds: object The external IDs for the given object. id: string Unique Samsara ID for the equipment. installedGateway: object model: string The model of the installed Samsara gateway. serial: string The serial of the installed Samsara gateway. name: string Name of the equipment. notes: string Notes about a piece of equipment. Samsara supports a maximum of 255 chars. tags: object array An array of all tag mini-objects that are associated with the given equipment. id: string ID of the tag. name: string Name of the tag. parentTagId: string If this tag is part a hierarchical tag tree, this is the ID of the parent tag, otherwise this will be omitted. ``` -------------------------------- ### Samsara Equipment 200 Response Schema Definition Source: https://github.com/samsarahq/api-docs/blob/master/markdown/patchequipment.md Defines the complete structure of the JSON response body for a successful GET request to the Samsara Equipment API endpoint. It includes top-level properties like 'data', and nested objects such as 'attributes', 'installedGateway', and 'tags', specifying their types and detailed descriptions. ```APIDOC data: object # The equipment object. attributes: object array # List of attributes associated with the entity id: string # Id of the attribute name: string # Name of the attribute numberValues: number array # List of number values associated with the attribute stringValues: string array # List of string values associated with the attribute. equipmentSerialNumber: string # The serial number of the equipment. externalIds: object # A map of external ids id: string # The unique Samsara ID of the Equipment. This is automatically generated when the Equipment object is created. It cannot be changed. installedGateway: object # A minified gateway object model: string # The model of the gateway installed on the asset. Valid values: AG15, AG24, AG24EU, AG26, AG26EU, AG41, AG41EU, AG45, AG45EU, AG46, AG46EU, AG46P, IG15, IG21, IG41, IG61, SG1, VG32, VG33, VG34, VG34EU, VG34FN, VG54EU, VG54NA. serial: string # The serial number of the gateway installed on the asset. name: string # The human-readable name of the Equipment. This is set by a fleet administrator and will appear in both Samsara’s cloud dashboard as well as the Samsara Driver mobile app. By default, this name is the serial number of the Samsara Asset Gateway. It can be set or updated through the Samsara Dashboard or through the API at any time. notes: string # These are generic notes about the Equipment. Empty by default. Can be set or updated through the Samsara Dashboard or the API at any time. tags: object array # The list of tags associated with the Equipment. id: string # ID of the tag name: string # Name of the tag. parentTagId: string # If this tag is part a hierarchical tag tree, this is the ID of the parent tag, otherwise this will be omitted. ``` -------------------------------- ### Samsara Trailer API 200 Response Schema Definition Source: https://github.com/samsarahq/api-docs/blob/master/markdown/gettrailer.md Defines the structure of the JSON payload returned for a successful GET request to the Samsara Trailer API endpoint. This schema includes top-level data properties and nested objects for attributes, installed gateway details, and associated tags, providing comprehensive information about a trailer asset. ```APIDOC 200 Response Schema: data: object attributes: object array id: string Description: Id of the attribute name: string Description: Name of the attribute numberValues: number array Description: List of number values associated with the attribute stringValues: string array Description: List of string values associated with the attribute. enabledForMobile: boolean Description: Indicates if the trailer is visible on the Samsara mobile apps. externalIds: object Description: A map of external ids id: string Description: The unique Samsara ID of the Trailer. This is automatically generated when the Trailer object is created. It cannot be changed. installedGateway: object Description: A minified gateway object. This field will be omitted if the trailer does not have a gateway installed. model: string Description: The model of the gateway installed on the asset. Valid values: `AG15`, `AG24`, `AG24EU`, `AG26`, `AG26EU`, `AG41`, `AG41EU`, `AG45`, `AG45EU`, `AG46`, `AG46EU`, `AG46P`, `IG15`, `IG21`, `IG41`, `IG61`, `SG1`, `VG32`, `VG33`, `VG34`, `VG34EU`, `VG34FN`, `VG54EU`, `VG54NA`. serial: string Description: The serial number of the gateway installed on the asset. licensePlate: string Description: The license plate of the Trailer. **By default**: empty. Can be set or updated through the Samsara Dashboard or the API at any time. name: string Description: The human-readable name of the Trailer. This is set by a fleet administrator and will appear in both Samsara’s cloud dashboard as well as the Samsara Driver mobile app. By default, this name is the serial number of the Samsara Asset Gateway. It can be set or updated through the Samsara Dashboard or through the API at any time. notes: string Description: These are generic notes about the Trailer. Empty by default. Can be set or updated through the Samsara Dashboard or the API at any time. tags: object array Description: The list of [tags](https://kb.samsara.com/hc/en-us/articles/360026674631-Using-Tags-and-Tag-Nesting) associated with the Trailer. id: string Description: ID of the tag name: string Description: Name of the tag. parentTagId: string Description: If this tag is part a hierarchical tag tree, this is the ID of the parent tag, otherwise this will be omitted. trailerSerialNumber: string Description: The serial number of the trailer. ``` -------------------------------- ### Samsara API Dispatch Route Properties Source: https://github.com/samsarahq/api-docs/blob/master/markdown/v1getdispatchroutehistory.md Defines the properties of a Samsara dispatch route object. This includes driver and route identifiers, external IDs, descriptive name, notes, and odometer readings at the start and end of the route. ```APIDOC driver_id: integer ID of the driver assigned to the dispatch route. Note that driver_id and vehicle_id are mutually exclusive. If neither is specified, then the route is unassigned. externalIds: object The [external IDs](https://developers.samsara.com/docs/external-ids) for the given object. group_id: integer Deprecated. id: integer ID of the Samsara dispatch route. name: string Descriptive name of this route. notes: string Notes regarding the details of this route; maximum of 2000 characters; newline characters ('\n')can be used for formatting. odometer_end_meters: integer Odometer reading at the end of the route. Will not be returned if Route is not completed or if Odometer information is not available for the relevant vehicle. odometer_start_meters: integer Odometer reading at the start of the route. Will not be returned if Route has not started or if Odometer information is not available for the relevant vehicle. ``` -------------------------------- ### Samsara API Driver and Pagination Parameter Reference Source: https://github.com/samsarahq/api-docs/blob/master/markdown/listdrivers.md Detailed reference for various API parameters, including their types, descriptions, and valid values for nested objects like `usDriverRulesetOverride` and `vehicleGroupTag`, as well as `pagination`. ```APIDOC timezone (string): 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). updatedAtTime (string): The date and time this driver was last updated in RFC 3339 format. usDriverRulesetOverride (object): US Driver Ruleset override for a given driver. If the driver is operating under a ruleset different from the organization default, the override is used. Updating this value only updates the override setting for this driver. Explicitly setting this field to 'null' will delete driver's ruleset override. If the driver does not have an override ruleset set, the response will not include any usDriverRulesetOverride information. cycle (string): The driver's working cycle. Valid values: `USA Property (8/70)`, `USA Property (7/60)`, `USA Passenger (8/70)`, `USA Passenger (7/60)`, `Alaska Property (8/80)`, `Alaska Property (7/70)`, `Alaska Passenger (8/80)`, `Alaska Passenger (7/70)`, `California School/FLV (8/80)`, `California Farm (8/112)`, `California Property (8/80)`, `California Flammable Liquid (8/80)`, `California Passenger (8/80)`, `California Motion Picture (8/80)`, `Florida (8/80)`, `Florida (7/70)`, `Nebraska (8/80)`, `Nebraska (7/70)`, `North Carolina (8/80)`, `North Carolina (7/70)`, `Oklahoma (8/70)`, `Oklahoma (7/60)`, `Oregon (8/80)`, `Oregon (7/70)`, `South Carolina (8/80)`, `South Carolina (7/70)`, `Texas (7/70)`, `Wisconsin (8/80)`, `Wisconsin (7/70)`. restart (string): Amount of time necessary for the driver to be resting in order to restart their cycle. Valid values: `34-hour Restart`, `24-hour Restart`, `36-hour Restart`, `72-hour Restart`, `None`. restbreak (string): The restbreak required for this driver. Valid values: `Property (off-duty/sleeper)`, `California Mealbreak (off-duty/sleeper)`, `None`. usStateToOverride (string): The jurisdiction of the ruleset applied to this driver. These are specified by either the ISO 3166-2 postal code for the supported US states, or empty string '' for US Federal Ruleset jurisdiction. Valid values: ``, `AK`, `CA`, `FL`, `NE`, `NC`, `OK`, `OR`, `SC`, `TX`, `WI`. username (string): Driver's login username into the driver app. The username may not contain spaces or the '@' symbol. The username must be unique. vehicleGroupTag (object): Tag which determines which vehicles a driver will see when selecting vehicles. id (string): ID of the tag. name (string): Name of the tag. parentTagId (string): If this tag is part a hierarchical tag tree, this is the ID of the parent tag, otherwise this will be omitted. pagination (object): Pagination parameters. endCursor (string): 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. hasNextPage (boolean): True if there are more pages of results immediately available after this endCursor. ``` -------------------------------- ### 200 Response Schema Definition Source: https://github.com/samsarahq/api-docs/blob/master/markdown/readme/v1getfleettrailerassignments.md Defines the structure of the successful 200 OK response for a trailer API, including details about the trailer and its associated driver assignments. Each assignment includes driver ID, start time, and an optional end time. ```APIDOC 200 Response Schema: id: integer Description: ID of the trailer name: string Description: Assignment trailer name (given when creating trailer via the trailer portal) trailerAssignments: object array Description: Properties: driverId: integer Description: The ID of the driver associated with this trailer. endMs: integer Description: The time at which the driver ended the assignment. If the assignment is current, this value will be omitted. startMs: integer Description: The time at which the driver started the assignment ``` -------------------------------- ### Samsara Driver App Configuration Response Schema Source: https://github.com/samsarahq/api-docs/blob/master/markdown/patchdriverappsettings.md Defines the structure of the 200 OK response for retrieving Samsara Driver App configuration settings, including features like gamification, vehicle search, and trailer selection. Each property is detailed with its type and purpose. ```APIDOC data: object description: The configuration settings for the Samsara Driver App. Can be set or updated through the Samsara Settings page or the API at any time. properties: driverFleetId: string description: Login user name for the fleet driver app gamification: boolean description: Driver gamification feature. Enabling this will turn on the feature for all drivers using the mobile app. Drivers can be configured into peer groups within the Drivers Page. Unconfigured drivers will be grouped on an organization level. gamificationConfig: object description: Gamification configuration for the Driver App. properties: anonymizeDriverNames: boolean description: Hide the names of other drivers when viewing the driver leaderboard in the mobile app. orgVehicleSearch: boolean description: Allow drivers to search for vehicles outside of their selection tag when connected to the internet. trailerSelection: boolean description: Allow drivers to see and select trailers in the Samsara Driver app. trailerSelectionConfig: object description: Trailer selection setting configuration for the Driver App. properties: driverTrailerCreationEnabled: boolean description: Allow drivers to create new trailers in the Samsara Driver app. maxNumOfTrailersSelected: integer description: Trailer selection limit. orgTrailerSearch: boolean description: Allow drivers to search for trailers outside of their selection tag when connected to the internet ``` -------------------------------- ### Samsara Dispatch Route Object Properties Reference Source: https://github.com/samsarahq/api-docs/blob/master/markdown/v1getdispatchroutebyid.md Defines the comprehensive set of properties for a Samsara dispatch route, covering its unique identification, scheduling parameters, start and end location attributes, and assigned assets like vehicles, drivers, or trailers. ```APIDOC vehicle_id (integer): ID of the vehicle used for the dispatch job. driver_id (integer): ID of the driver assigned to the dispatch route. Note that driver_id and vehicle_id are mutually exclusive. If neither is specified, then the route is unassigned. externalIds (object): The [external IDs](https://developers.samsara.com/docs/external-ids) for the given object. group_id (integer): Deprecated. id (integer): ID of the Samsara dispatch route. name (string): Descriptive name of this route. notes (string): Notes regarding the details of this route; maximum of 2000 characters; newline characters ('\n')can be used for formatting. odometer_end_meters (integer): Odometer reading at the end of the route. Will not be returned if Route is not completed or if Odometer information is not available for the relevant vehicle. odometer_start_meters (integer): Odometer reading at the start of the route. Will not be returned if Route has not started or if Odometer information is not available for the relevant vehicle. scheduled_end_ms (integer): The time in Unix epoch milliseconds that the last job in the route is scheduled to end. scheduled_meters (integer): The distance expected to be traveled for this route in meters. scheduled_start_ms (integer): The time in Unix epoch milliseconds that the route is scheduled to start. start_location_address (string): The address of the route's starting location, as it would be recognized if provided to maps.google.com. Optional if a valid start location address ID is provided. start_location_address_id (integer): ID of the start location associated with an address book entry. Optional if valid values are provided for start location address and latitude/longitude. If a valid start location address ID is provided, address/latitude/longitude will be used from the address book entry. Name of the address book entry will only be used if the start location name is not provided. start_location_lat (number): Latitude of the start location in decimal degrees. Optional if a valid start location address ID is provided. start_location_lng (number): Longitude of the start location in decimal degrees. Optional if a valid start location address ID is provided. start_location_name (string): The name of the route's starting location. If provided, it will take precedence over the name of the address book entry. trailer_id (integer): ID of the trailer assigned to the dispatch route. Note that trailers can only be assigned to routes that have a Vehicle or Driver assigned to them. vehicle_id (integer): ID of the vehicle assigned to the dispatch route. Note that vehicle_id and driver_id are mutually exclusive. If neither is specified, then the route is unassigned. ``` -------------------------------- ### API Reference: Image Analysis and Object Detection Properties Source: https://github.com/samsarahq/api-docs/blob/master/markdown/readme/v1getvisionrunsbycameraandprogram.md This section details the structure and meaning of various properties related to image analysis, such as contrast, sharpness, straightness, and object detection parameters like shape finding and fixture coordinates. Each property includes its data type and a brief description of its purpose. ```APIDOC contrastPercent: integer (The detected contrast percentage) contrastRange: object (The configured contrast allowance range) high: integer low: integer filterPolarity: string (The configured polarity for finding edges) sharpnessPercent: integer (The detected sharpness percentage) sharpnessRange: object (The configured sharpness allowance range) high: integer low: integer straightnessFound: integer (The detected straightness percentage) straightnessRange: object (The configured straightness allowance range) high: integer low: integer findShapes: object foundCount: integer maxCount: integer minCount: integer fixture: object coordinates: object x: integer y: integer found: boolean rotationDegrees: integer labelMatch: object score: integer ``` -------------------------------- ### Vehicle Object 200 Response Schema Source: https://github.com/samsarahq/api-docs/blob/master/markdown/updatevehicle.md Defines the structure of the JSON payload returned for a successful GET request for a vehicle object. It includes the main 'data' object, its 'attributes' (id, name, values), and various 'auxInputType' properties with their descriptions and types. ```APIDOC data: object Description: The vehicle object. Properties: attributes: object array Description: [beta] A minified attribute Properties: id: string Description: The samsara id of the attribute object. name: string Description: Name of attribute. numberValues: number array Description: Number values that are associated with this attribute. stringValues: string array Description: String values that are associated with this attribute. auxInputType1: string Description: The type of auxiliary input configured for this Vehicle. Once configured, these inputs will generate dynamic, time-series data that will be available to view in the Samsara Dashboard. By default: empty. This can be set or updated through the Samsara Dashboard or the API at any time. Inputs 3-10 are only available on gateways with an attached aux expander. auxInputType10: string Description: The type of auxiliary input configured for this Vehicle. Once configured, these inputs will generate dynamic, time-series data that will be available to view in the Samsara Dashboard. By default: empty. This can be set or updated through the Samsara Dashboard or the API at any time. Inputs 3-10 are only available on gateways with an attached aux expander. auxInputType2: string Description: The type of auxiliary input configured for this Vehicle. Once configured, these inputs will generate dynamic, time-series data that will be available to view in the Samsara Dashboard. By default: empty. This can be set or updated through the Samsara Dashboard or the API at any time. Inputs 3-10 are only available on gateways with an attached aux expander. auxInputType3: string Description: The type of auxiliary input configured for this Vehicle. Once configured, these inputs will generate dynamic, time-series data that will be available to view in the Samsara Dashboard. By default: empty. This can be set or updated through the Samsara Dashboard or the API at any time. Inputs 3-10 are only available on gateways with an attached aux expander. auxInputType4: string Description: The type of auxiliary input configured for this Vehicle. Once configured, these inputs will generate dynamic, time-series data that will be available to view in the Samsara Dashboard. By default: empty. This can be set or updated through the Samsara Dashboard or the API at any time. Inputs 3-10 are only available on gateways with an attached aux expander. auxInputType5: string Description: The type of auxiliary input configured for this Vehicle. Once configured, these inputs will generate dynamic, time-series data that will be available to view in the Samsara Dashboard. By default: empty. This can be set or updated through the Samsara Dashboard or the API at any time. Inputs 3-10 are only available on gateways with an attached aux expander. auxInputType6: string Description: The type of auxiliary input configured for this Vehicle. Once configured, these inputs will generate dynamic, time-series data that will be available to view in the Samsara Dashboard. By default: empty. This can be set or updated through the Samsara Dashboard or the API at any time. Inputs 3-10 are only available on gateways with an attached aux expander. ``` -------------------------------- ### Samsara Trip Definition and Attributes Source: https://github.com/samsarahq/api-docs/blob/master/markdown/trips.md Defines what constitutes a 'trip' in the Samsara system, including the conditions for starting and ending a trip. It also enumerates the key data attributes associated with each trip, such as times, locations, distance, odometer readings, and fuel consumption. ```APIDOC Trip Object Definition: Description: Represents a segment of driving activity. Start Condition: Vehicle achieves speed of 5mph after being inactive. End Condition: - Vehicle speed remains below 5mph for 5 minutes. - Vehicle crosses a state or national boundary. Attributes: - start_time: Time when the trip began. - stop_time: Time when the trip ended. - start_location: Geographic coordinates of trip start. - end_location: Geographic coordinates of trip end. - start_address: Address of trip start. - end_address: Address of trip end. - distance: Total distance covered during the trip. - odometer_start: Odometer reading at the start of the trip. - odometer_end: Odometer reading at the end of the trip. - fuel_consumption: Total fuel consumed during the trip. ``` -------------------------------- ### API Data Structures and Pagination Parameters Source: https://github.com/samsarahq/api-docs/blob/master/markdown/readme/getequipmentstats.md This section details various data structures used in the API, including general data point properties, engine diagnostic states, and pagination metadata. It describes the properties, their types, and their purpose. ```APIDOC // General Data Point Properties (context-dependent) time: string - UTC timestamp of the time the data point was generated by the equipment, in RFC3339 format. value: integer - The number of seconds the engine has been running since it was new. This value is provided directly from on-board diagnostics. obdEngineState: object - Engine state reading from on-board diagnostics. time: string - UTC timestamp of the time the data point was generated by the equipment, in RFC3339 format. value: string - The state of the engine read from on-board diagnostics. Valid values: `Off`, `On`, `Idle`. pagination: object - Pagination parameters. endCursor: string - 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. hasNextPage: boolean - True if there are more pages of results immediately available after this endCursor. ``` -------------------------------- ### Samsara Dispatch Route Parameters Source: https://github.com/samsarahq/api-docs/blob/master/markdown/readme/v1getdispatchroutehistory.md This section outlines the parameters used to define and manage dispatch routes within the Samsara API. Parameters cover scheduling, start and end times, distance, location details, and assigned assets like vehicles or trailers. ```APIDOC scheduled_end_ms: integer The time in Unix epoch milliseconds that the last job in the route is scheduled to end. scheduled_meters: integer The distance expected to be traveled for this route in meters. scheduled_start_ms: integer The time in Unix epoch milliseconds that the route is scheduled to start. start_location_address: string The address of the route's starting location, as it would be recognized if provided to maps.google.com. Optional if a valid start location address ID is provided. start_location_address_id: integer ID of the start location associated with an address book entry. Optional if valid values are provided for start location address and latitude/longitude. If a valid start location address ID is provided, address/latitude/longitude will be used from the address book entry. Name of the address book entry will only be used if the start location name is not provided. start_location_lat: number Latitude of the start location in decimal degrees. Optional if a valid start location address ID is provided. start_location_lng: number Longitude of the start location in decimal degrees. Optional if a valid start location address ID is provided. start_location_name: string The name of the route's starting location. If provided, it will take precedence over the name of the address book entry. trailer_id: integer ID of the trailer assigned to the dispatch route. Note that trailers can only be assigned to routes that have a Vehicle or Driver assigned to them. vehicle_id: integer ID of the vehicle assigned to the dispatch route. Note that vehicle_id and driver_id are mutually exclusive. If neither is specified, then the route is unassigned. ``` -------------------------------- ### Samsara Dispatch Route Properties Reference Source: https://github.com/samsarahq/api-docs/blob/master/markdown/readme/v1fetchallroutejobupdates.md Detailed reference for properties associated with Samsara dispatch routes, including data types and descriptions for each field. ```APIDOC odometer_end_meters (integer): Odometer reading at the end of the route. Will not be returned if Route is not completed or if Odometer information is not available for the relevant vehicle. odometer_start_meters (integer): Odometer reading at the start of the route. Will not be returned if Route has not started or if Odometer information is not available for the relevant vehicle. scheduled_end_ms (integer): The time in Unix epoch milliseconds that the last job in the route is scheduled to end. scheduled_meters (integer): The distance expected to be traveled for this route in meters. scheduled_start_ms (integer): The time in Unix epoch milliseconds that the route is scheduled to start. start_location_address (string): The address of the route's starting location, as it would be recognized if provided to maps.google.com. Optional if a valid start location address ID is provided. start_location_address_id (integer): ID of the start location associated with an address book entry. Optional if valid values are provided for start location address and latitude/longitude. If a valid start location address ID is provided, address/latitude/longitude will be used from the address book entry. Name of the address book entry will only be used if the start location name is not provided. start_location_lat (number): Latitude of the start location in decimal degrees. Optional if a valid start location address ID is provided. start_location_lng (number): Longitude of the start location in decimal degrees. Optional if a valid start location address ID is provided. start_location_name (string): The name of the route's starting location. If provided, it will take precedence over the name of the address book entry. trailer_id (integer): ID of the trailer assigned to the dispatch route. Note that trailers can only be assigned to routes that have a Vehicle or Driver assigned to them. vehicle_id (integer): ID of the vehicle assigned to the dispatch route. Note that vehicle_id and driver_id are mutually exclusive. If neither is specified, then the route is unassigned. route_id (integer): ID of the Samsara dispatch route. sequence_id (string): Sequence ID of the last update returned in the response ``` -------------------------------- ### API Response Schema for Equipment List (200 OK) Source: https://github.com/samsarahq/api-docs/blob/master/markdown/readme/listequipment.md This schema defines the structure of a successful HTTP 200 response when querying for equipment data. It includes a 'data' array, where each element represents an equipment object with properties like serial number, external IDs, name, notes, and associated tags. It also includes a 'pagination' object to manage large result sets, providing cursors and indicators for subsequent pages. ```APIDOC 200 Response Schema: data: object array (List of equipment objects.) assetSerial: string (An equipment identification number.) externalIds: object (The external IDs for the given object.) id: string (Unique Samsara ID for the equipment.) installedGateway: object model: string (The model of the installed Samsara gateway.) serial: string (The serial of the installed Samsara gateway.) name: string (Name of the equipment.) notes: string (Notes about a piece of equipment. Samsara supports a maximum of 255 chars.) tags: object array (An array of all tag mini-objects that are associated with the given equipment.) id: string (ID of the tag.) name: string (Name of the tag.) parentTagId: string (If this tag is part a hierarchical tag tree, this is the ID of the parent tag, otherwise this will be omitted.) pagination: object (Pagination parameters.) endCursor: string (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.) hasNextPage: boolean (True if there are more pages of results immediately available after this endCursor.) ``` -------------------------------- ### Samsara Trailer Data API 200 Response Schema Source: https://github.com/samsarahq/api-docs/blob/master/markdown/listtrailers.md Defines the complete structure of the 200 OK response for retrieving trailer information, including details for each property, nested objects like installed gateways and tags, and pagination fields for navigating results. ```APIDOC 200 Response Schema: data: object array description: List of trailer objects. properties: enabledForMobile: boolean description: Indicates if the trailer is visible on the Samsara mobile apps. externalIds: object description: A map of external ids id: string description: The unique Samsara ID of the Trailer. This is automatically generated when the Trailer object is created. It cannot be changed. installedGateway: object description: A minified gateway object. This field will be omitted if the trailer does not have a gateway installed. properties: model: string description: The model of the gateway installed on the asset. Valid values: `AG15`, `AG24`, `AG24EU`, `AG26`, `AG26EU`, `AG41`, `AG41EU`, `AG45`, `AG45EU`, `AG46`, `AG46EU`, `AG46P`, `IG15`, `IG21`, `IG41`, `IG61`, `SG1`, `VG32`, `VG33`, `VG34`, `VG34EU`, `VG34FN`, `VG54EU`, `VG54NA`. serial: string description: The serial number of the gateway installed on the asset. licensePlate: string description: The license plate of the Trailer. **By default**: empty. Can be set or updated through the Samsara Dashboard or the API at any time. name: string description: The human-readable name of the Trailer. This is set by a fleet administrator and will appear in both Samsara’s cloud dashboard as well as the Samsara Driver mobile app. By default, this name is the serial number of the Samsara Asset Gateway. It can be set or updated through the Samsara Dashboard or through the API at any time. notes: string description: These are generic notes about the Trailer. Empty by default. Can be set or updated through the Samsara Dashboard or the API at any time. tags: object array description: The list of [tags](https://kb.samsara.com/hc/en-us/articles/360026674631-Using-Tags-and-Tag-Nesting) associated with the Trailer. properties: id: string description: ID of the tag name: string description: Name of the tag. parentTagId: string description: If this tag is part a hierarchical tag tree, this is the ID of the parent tag, otherwise this will be omitted. trailerSerialNumber: string description: The serial number of the trailer. pagination: object description: Pagination parameters. properties: endCursor: string 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. hasNextPage: boolean description: True if there are more pages of results immediately available after this endCursor. ``` -------------------------------- ### Samsara API Field Definitions Source: https://github.com/samsarahq/api-docs/blob/master/markdown/readme/gethosdailylogs.md Defines various fields used in Samsara API responses, including driver activity durations, daily log start times, and pagination object properties. This documentation specifies the field names, their data types, and a brief description of their purpose. ```APIDOC sleeperBerthDurationMs: integer Description: Duration the driver was in their sleeper berth for in the log period in milliseconds. waitingTimeDurationMs: integer Description: Duration the driver was waiting for in the log period in milliseconds. yardMoveDurationMs: integer Description: Duration the driver was driving for yard moves for in the log period in milliseconds. startTime: string Description: The start time of the daily log in RFC 3339 format. This will be calculated using timezone of the driver. pagination: object Description: Pagination parameters. endCursor: string 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. hasNextPage: boolean Description: True if there are more pages of results immediately available after this endCursor. ``` -------------------------------- ### 200 OK Response Schema for Equipment Locations Source: https://github.com/samsarahq/api-docs/blob/master/markdown/getequipmentlocationsfeed.md This API documentation details the structure of a successful (HTTP 200 OK) response when querying equipment location data. It outlines the 'data' array containing equipment details and their time-series locations, as well as the 'pagination' object for navigating through results. ```APIDOC 200 Response Schema: data: object array description: Time-series of locations for the specified units of equipment. properties: id: string description: Unique Samsara ID for the equipment. locations: object array description: A time-series of location events for the given unit of equipment. properties: heading: number description: Heading of the unit of equipment in degrees. latitude: number description: GPS latitude represented in degrees. longitude: number description: GPS longitude represented in degrees. speed: number description: GPS speed of the unit of equipment in miles per hour. time: string description: UTC timestamp in RFC 3339 format. Example: 2020-01-27T07:06:25Z. name: string description: Name of the equipment. pagination: object description: Pagination parameters. properties: endCursor: string 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. hasNextPage: boolean description: True if there are more pages of results immediately available after this endCursor. ``` -------------------------------- ### 200 OK Response Schema Source: https://github.com/samsarahq/api-docs/blob/master/markdown/listusers.md Detailed schema for the successful 200 OK response, outlining the structure of user data and pagination information returned by the API. ```APIDOC data: object array description: A list of users. properties: authType: string description: The authentication type the user uses to authenticate. To use SAML this organization must have a configured SAML integration. Valid values: `default`, `saml`. email: string description: The email address of this user. id: string description: ID of the user. name: string description: The first and last name of the user. roles: array description: The list of roles that applies to this user. A user may have "organizational" roles, which apply to the user at the organizational level, and "tag-specific" roles, which apply to the user for a given tag. items: type: object properties: role: object description: A user role object. properties: id: string description: The unique ID for the role. name: string description: The name of the role. tag: object description: A minified tag object properties: id: string description: ID of the tag. name: string description: Name of the tag. parentTagId: string description: If this tag is part a hierarchical tag tree, this is the ID of the parent tag, otherwise this will be omitted. pagination: object description: Pagination parameters. properties: endCursor: string 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. hasNextPage: boolean description: True if there are more pages of results immediately available after this endCursor. ```