Update a vehicle

Updates the given Vehicle object.

Note: Vehicle objects are automatically created when Samsara Vehicle Gateways are installed. You cannot create a Vehicle object via API.

You are able to update many of the fields of a Vehicle.

Note: There are no required fields in the request body, and you only need to provide the fields you wish to update.

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.

To use this endpoint, select Write Vehicles under the Vehicles category when creating or editing an API token. Learn More.

Path Params
string
required

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, or automatically populated by fields on the vehicle. To specify an external ID as part of a path parameter, use the following format: key:value. For example, maintenanceId:250020. Automatically populated external IDs are prefixed with samsara.. For example, samsara.vin:1HGBH41JXMN109186.

Body Params

Fields that can be patched on a vehicle.

attributes
array of objects
attributes
string
enum

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-13 are only available on gateways with an attached aux expander. Valid values: None, Emergency Lights, Emergency Alarm, Stop Paddle, Power Take-Off, Plow, Sweeper, Salter, Reefer, Door, Boom, Auxiliary Engine, Generator, Eight-Way Lights, Panic Button, Privacy Button, Front Axle Drive, Weight Sensor, Other, Secondary Fuel Source, (ECU) Power Take-Off.

string
enum

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-13 are only available on gateways with an attached aux expander. Valid values: None, Emergency Lights, Emergency Alarm, Stop Paddle, Power Take-Off, Plow, Sweeper, Salter, Reefer, Door, Boom, Auxiliary Engine, Generator, Eight-Way Lights, Panic Button, Privacy Button, Front Axle Drive, Weight Sensor, Other, Secondary Fuel Source, (ECU) Power Take-Off.

string
enum

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-13 are only available on gateways with an attached aux expander. Valid values: None, Emergency Lights, Emergency Alarm, Stop Paddle, Power Take-Off, Plow, Sweeper, Salter, Reefer, Door, Boom, Auxiliary Engine, Generator, Eight-Way Lights, Panic Button, Privacy Button, Front Axle Drive, Weight Sensor, Other, Secondary Fuel Source, (ECU) Power Take-Off.

string
enum

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-13 are only available on gateways with an attached aux expander. Valid values: None, Emergency Lights, Emergency Alarm, Stop Paddle, Power Take-Off, Plow, Sweeper, Salter, Reefer, Door, Boom, Auxiliary Engine, Generator, Eight-Way Lights, Panic Button, Privacy Button, Front Axle Drive, Weight Sensor, Other, Secondary Fuel Source, (ECU) Power Take-Off.

string
enum

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-13 are only available on gateways with an attached aux expander. Valid values: None, Emergency Lights, Emergency Alarm, Stop Paddle, Power Take-Off, Plow, Sweeper, Salter, Reefer, Door, Boom, Auxiliary Engine, Generator, Eight-Way Lights, Panic Button, Privacy Button, Front Axle Drive, Weight Sensor, Other, Secondary Fuel Source, (ECU) Power Take-Off.

string
enum

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-13 are only available on gateways with an attached aux expander. Valid values: None, Emergency Lights, Emergency Alarm, Stop Paddle, Power Take-Off, Plow, Sweeper, Salter, Reefer, Door, Boom, Auxiliary Engine, Generator, Eight-Way Lights, Panic Button, Privacy Button, Front Axle Drive, Weight Sensor, Other, Secondary Fuel Source, (ECU) Power Take-Off.

string
enum

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-13 are only available on gateways with an attached aux expander. Valid values: None, Emergency Lights, Emergency Alarm, Stop Paddle, Power Take-Off, Plow, Sweeper, Salter, Reefer, Door, Boom, Auxiliary Engine, Generator, Eight-Way Lights, Panic Button, Privacy Button, Front Axle Drive, Weight Sensor, Other, Secondary Fuel Source, (ECU) Power Take-Off.

string
enum

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-13 are only available on gateways with an attached aux expander. Valid values: None, Emergency Lights, Emergency Alarm, Stop Paddle, Power Take-Off, Plow, Sweeper, Salter, Reefer, Door, Boom, Auxiliary Engine, Generator, Eight-Way Lights, Panic Button, Privacy Button, Front Axle Drive, Weight Sensor, Other, Secondary Fuel Source, (ECU) Power Take-Off.

string
enum

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-13 are only available on gateways with an attached aux expander. Valid values: None, Emergency Lights, Emergency Alarm, Stop Paddle, Power Take-Off, Plow, Sweeper, Salter, Reefer, Door, Boom, Auxiliary Engine, Generator, Eight-Way Lights, Panic Button, Privacy Button, Front Axle Drive, Weight Sensor, Other, Secondary Fuel Source, (ECU) Power Take-Off.

string
enum

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-13 are only available on gateways with an attached aux expander. Valid values: None, Emergency Lights, Emergency Alarm, Stop Paddle, Power Take-Off, Plow, Sweeper, Salter, Reefer, Door, Boom, Auxiliary Engine, Generator, Eight-Way Lights, Panic Button, Privacy Button, Front Axle Drive, Weight Sensor, Other, Secondary Fuel Source, (ECU) Power Take-Off.

string
enum

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-13 are only available on gateways with an attached aux expander. Valid values: None, Emergency Lights, Emergency Alarm, Stop Paddle, Power Take-Off, Plow, Sweeper, Salter, Reefer, Door, Boom, Auxiliary Engine, Generator, Eight-Way Lights, Panic Button, Privacy Button, Front Axle Drive, Weight Sensor, Other, Secondary Fuel Source, (ECU) Power Take-Off.

string
enum

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-13 are only available on gateways with an attached aux expander. Valid values: None, Emergency Lights, Emergency Alarm, Stop Paddle, Power Take-Off, Plow, Sweeper, Salter, Reefer, Door, Boom, Auxiliary Engine, Generator, Eight-Way Lights, Panic Button, Privacy Button, Front Axle Drive, Weight Sensor, Other, Secondary Fuel Source, (ECU) Power Take-Off.

string
enum

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-13 are only available on gateways with an attached aux expander. Valid values: None, Emergency Lights, Emergency Alarm, Stop Paddle, Power Take-Off, Plow, Sweeper, Salter, Reefer, Door, Boom, Auxiliary Engine, Generator, Eight-Way Lights, Panic Button, Privacy Button, Front Axle Drive, Weight Sensor, Other, Secondary Fuel Source, (ECU) Power Take-Off.

int64

A manual override for the vehicle's engine hours. You may only override a vehicle's engine hours if it cannot be read from on-board diagnostics. When you provide a manual engine hours override, Samsara will begin updating a vehicle's engine hours based on when the Samsara Vehicle Gateway is recieving power or not. Setting the value to 0 will unset the manual engine hours.

externalIds
object

The external IDs for the given object.

string

The serial number of the gateway. By default: empty. This can be set to a different gateway's serial number to pair this vehicle with a different gateway.

grossVehicleWeight
object

The gross weight of the vehicle in either pounds (lb) or kilograms (kg). Only returned for customers with commercial speed limits (CSL) enabled.

string
enum

The harsh acceleration setting type. This setting influences the acceleration sensitivity from which a harsh event is triggered. By default, this setting is inferred by the Samsara Vehicle Gateway from the engine computer, but it may be set or updated through the Samsara Dashboard or the API at any time. If set to off, then no acceleration based harsh events are triggered for the vehicle. Valid values: passengerCar, lightTruck, heavyDuty, off, automatic.

Allowed:
string
length ≤ 12

The license plate of the Vehicle. By default: empty. Can be set or updated through the Samsara Dashboard or the API at any time.

string

The human-readable name of the Vehicle. 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 Vehicle Gateway. It can be set or updated through the Samsara Dashboard or through the API at any time.

string
length ≤ 255

These are generic notes about the Vehicle. Empty by default. Can be set or updated through the Samsara Dashboard or the API at any time.

int64

A manual override for the vehicle's odometer. You may only override a vehicle's odometer if it cannot be read from on-board diagnostics. When you provide a manual odometer override, Samsara will begin updating a vehicle's odometer using GPS distance traveled since this override was set. See here for more details.

string

ID for the static assigned driver of the vehicle. Setting the value to 0 will unassign the current driver.

tagIds
array of strings

An array of IDs of tags to associate with this vehicle. If your access to the API is scoped by one or more tags, this field is required to pass in.

tagIds
string
enum

Whether or not the vehicle is regulated, unregulated (non-CMV), or a mixed use unregulated vehicle. Valid values: regulated, unregulated, mixed.

Allowed:
string

The type of the vehicle. Only returned for customers with commercial speed limits (CSL) enabled.

string
length between 11 and 17

The VIN of the Vehicle. Most of the time, this will be automatically read from the engine computer by the Samsara Vehicle Gateway. It will be empty if it cannot be read. It can be set or updated through the Samsara Dashboard or the API at any time.

Responses

Language
Credentials
Bearer
URL
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json