Skip to main content
PATCH
/
fleet
/
vehicles
/
{id}
Update a vehicle
curl --request PATCH \
  --url https://api.samsara.com/fleet/vehicles/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "attributes": [
    {
      "dateValues": [
        "<string>"
      ],
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "name": "License Certifications",
      "numberValues": [
        123
      ],
      "stringValues": [
        "<string>"
      ]
    }
  ],
  "auxInputType1": "boom",
  "auxInputType10": "boom",
  "auxInputType11": "boom",
  "auxInputType12": "boom",
  "auxInputType13": "boom",
  "auxInputType2": "boom",
  "auxInputType3": "boom",
  "auxInputType4": "boom",
  "auxInputType5": "boom",
  "auxInputType6": "boom",
  "auxInputType7": "boom",
  "auxInputType8": "boom",
  "auxInputType9": "boom",
  "engineHours": 10943,
  "externalIds": {
    "maintenanceId": "250020",
    "payrollId": "ABFS18600"
  },
  "gatewaySerial": "ABCD-123-XYZ",
  "grossVehicleWeight": {
    "unit": "lb",
    "weight": 1000
  },
  "harshAccelerationSettingType": "off",
  "licensePlate": "XHK1234",
  "name": "Truck A7",
  "notes": "These are notes about this given vehicle.",
  "odometerMeters": 9182,
  "staticAssignedDriverId": "123",
  "tagIds": [
    "321"
  ],
  "vehicleRegulationMode": "regulated",
  "vehicleType": "truck",
  "vin": "1FUJA6BD31LJ09646"
}
'
{
  "data": {
    "id": "112",
    "attributes": [
      {
        "dateValues": [
          "<string>"
        ],
        "id": "123e4567-e89b-12d3-a456-426614174000",
        "name": "License Certifications",
        "numberValues": [
          123
        ],
        "stringValues": [
          "<string>"
        ]
      }
    ],
    "auxInputType1": "boom",
    "auxInputType10": "boom",
    "auxInputType11": "boom",
    "auxInputType12": "boom",
    "auxInputType13": "boom",
    "auxInputType2": "boom",
    "auxInputType3": "boom",
    "auxInputType4": "boom",
    "auxInputType5": "boom",
    "auxInputType6": "boom",
    "auxInputType7": "boom",
    "auxInputType8": "boom",
    "auxInputType9": "boom",
    "cameraSerial": "CNCK-VT8-XA8",
    "esn": "11223344",
    "externalIds": {
      "maintenanceId": "250020",
      "payrollId": "ABFS18600"
    },
    "gateway": {
      "model": "VG34",
      "serial": "ABCD-123-XYZ"
    },
    "grossVehicleWeight": {
      "unit": "lb",
      "weight": 1000
    },
    "harshAccelerationSettingType": "off",
    "licensePlate": "XHK1234",
    "make": "Ford",
    "model": "F150",
    "name": "Truck A7",
    "notes": "These are notes about this given vehicle.",
    "sensorConfiguration": {
      "areas": [
        {
          "cargoSensors": [
            {
              "id": "<string>",
              "mac": "<string>",
              "name": "<string>"
            }
          ],
          "humiditySensors": [
            {
              "id": "<string>",
              "mac": "<string>",
              "name": "<string>"
            }
          ],
          "position": "",
          "temperatureSensors": [
            {
              "id": "<string>",
              "mac": "<string>",
              "name": "<string>"
            }
          ]
        }
      ],
      "doors": [
        {
          "position": "",
          "sensor": {
            "id": "<string>",
            "mac": "<string>",
            "name": "<string>"
          }
        }
      ]
    },
    "serial": "VG12345",
    "staticAssignedDriver": {
      "id": "88668",
      "name": "Susan Bob"
    },
    "tags": [
      {
        "id": "3914",
        "name": "East Coast",
        "parentTagId": "4815"
      }
    ],
    "vehicleRegulationMode": "regulated",
    "vehicleType": "truck",
    "vin": "1FUJA6BD31LJ09646",
    "year": "2008"
  }
}

Documentation Index

Fetch the complete documentation index at: https://samsara-showcase.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
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

application/json

Fields that can be patched on a vehicle.

All the editable portions of the vehicle object.

attributes
object[]
auxInputType1
enum<string>

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.

Available options:
none,
emergencyLights,
emergencyAlarm,
stopPaddle,
powerTakeOff,
plow,
sweeper,
salter,
reefer,
door,
boom,
auxiliaryEngine,
generator,
eightWayLights,
panicButton,
privacyButton,
frontAxleDrive,
weightSensor,
other,
secondaryFuelSource,
ecuPowerTakeOff
Example:

"boom"

auxInputType10
enum<string>

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.

Available options:
none,
emergencyLights,
emergencyAlarm,
stopPaddle,
powerTakeOff,
plow,
sweeper,
salter,
reefer,
door,
boom,
auxiliaryEngine,
generator,
eightWayLights,
panicButton,
privacyButton,
frontAxleDrive,
weightSensor,
other,
secondaryFuelSource,
ecuPowerTakeOff
Example:

"boom"

auxInputType11
enum<string>

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.

Available options:
none,
emergencyLights,
emergencyAlarm,
stopPaddle,
powerTakeOff,
plow,
sweeper,
salter,
reefer,
door,
boom,
auxiliaryEngine,
generator,
eightWayLights,
panicButton,
privacyButton,
frontAxleDrive,
weightSensor,
other,
secondaryFuelSource,
ecuPowerTakeOff
Example:

"boom"

auxInputType12
enum<string>

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.

Available options:
none,
emergencyLights,
emergencyAlarm,
stopPaddle,
powerTakeOff,
plow,
sweeper,
salter,
reefer,
door,
boom,
auxiliaryEngine,
generator,
eightWayLights,
panicButton,
privacyButton,
frontAxleDrive,
weightSensor,
other,
secondaryFuelSource,
ecuPowerTakeOff
Example:

"boom"

auxInputType13
enum<string>

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.

Available options:
none,
emergencyLights,
emergencyAlarm,
stopPaddle,
powerTakeOff,
plow,
sweeper,
salter,
reefer,
door,
boom,
auxiliaryEngine,
generator,
eightWayLights,
panicButton,
privacyButton,
frontAxleDrive,
weightSensor,
other,
secondaryFuelSource,
ecuPowerTakeOff
Example:

"boom"

auxInputType2
enum<string>

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.

Available options:
none,
emergencyLights,
emergencyAlarm,
stopPaddle,
powerTakeOff,
plow,
sweeper,
salter,
reefer,
door,
boom,
auxiliaryEngine,
generator,
eightWayLights,
panicButton,
privacyButton,
frontAxleDrive,
weightSensor,
other,
secondaryFuelSource,
ecuPowerTakeOff
Example:

"boom"

auxInputType3
enum<string>

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.

Available options:
none,
emergencyLights,
emergencyAlarm,
stopPaddle,
powerTakeOff,
plow,
sweeper,
salter,
reefer,
door,
boom,
auxiliaryEngine,
generator,
eightWayLights,
panicButton,
privacyButton,
frontAxleDrive,
weightSensor,
other,
secondaryFuelSource,
ecuPowerTakeOff
Example:

"boom"

auxInputType4
enum<string>

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.

Available options:
none,
emergencyLights,
emergencyAlarm,
stopPaddle,
powerTakeOff,
plow,
sweeper,
salter,
reefer,
door,
boom,
auxiliaryEngine,
generator,
eightWayLights,
panicButton,
privacyButton,
frontAxleDrive,
weightSensor,
other,
secondaryFuelSource,
ecuPowerTakeOff
Example:

"boom"

auxInputType5
enum<string>

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.

Available options:
none,
emergencyLights,
emergencyAlarm,
stopPaddle,
powerTakeOff,
plow,
sweeper,
salter,
reefer,
door,
boom,
auxiliaryEngine,
generator,
eightWayLights,
panicButton,
privacyButton,
frontAxleDrive,
weightSensor,
other,
secondaryFuelSource,
ecuPowerTakeOff
Example:

"boom"

auxInputType6
enum<string>

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.

Available options:
none,
emergencyLights,
emergencyAlarm,
stopPaddle,
powerTakeOff,
plow,
sweeper,
salter,
reefer,
door,
boom,
auxiliaryEngine,
generator,
eightWayLights,
panicButton,
privacyButton,
frontAxleDrive,
weightSensor,
other,
secondaryFuelSource,
ecuPowerTakeOff
Example:

"boom"

auxInputType7
enum<string>

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.

Available options:
none,
emergencyLights,
emergencyAlarm,
stopPaddle,
powerTakeOff,
plow,
sweeper,
salter,
reefer,
door,
boom,
auxiliaryEngine,
generator,
eightWayLights,
panicButton,
privacyButton,
frontAxleDrive,
weightSensor,
other,
secondaryFuelSource,
ecuPowerTakeOff
Example:

"boom"

auxInputType8
enum<string>

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.

Available options:
none,
emergencyLights,
emergencyAlarm,
stopPaddle,
powerTakeOff,
plow,
sweeper,
salter,
reefer,
door,
boom,
auxiliaryEngine,
generator,
eightWayLights,
panicButton,
privacyButton,
frontAxleDrive,
weightSensor,
other,
secondaryFuelSource,
ecuPowerTakeOff
Example:

"boom"

auxInputType9
enum<string>

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.

Available options:
none,
emergencyLights,
emergencyAlarm,
stopPaddle,
powerTakeOff,
plow,
sweeper,
salter,
reefer,
door,
boom,
auxiliaryEngine,
generator,
eightWayLights,
panicButton,
privacyButton,
frontAxleDrive,
weightSensor,
other,
secondaryFuelSource,
ecuPowerTakeOff
Example:

"boom"

engineHours
integer<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.

Example:

10943

externalIds
object

The external IDs for the given object.

Example:
{
"maintenanceId": "250020",
"payrollId": "ABFS18600"
}
gatewaySerial
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.

Example:

"ABCD-123-XYZ"

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.

harshAccelerationSettingType
enum<string>

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.

Available options:
passengerCar,
lightTruck,
heavyDuty,
off,
automatic
Example:

"off"

licensePlate
string

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

Maximum string length: 12
Example:

"XHK1234"

name
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.

Example:

"Truck A7"

notes
string

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.

Maximum string length: 255
Example:

"These are notes about this given vehicle."

odometerMeters
integer<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.

Example:

9182

staticAssignedDriverId
string

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

Example:

"123"

tagIds
string[]

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.

vehicleRegulationMode
enum<string>

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

Available options:
regulated,
unregulated,
mixed
Example:

"regulated"

vehicleType
string

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

Example:

"truck"

vin
string

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.

Required string length: 11 - 17
Example:

"1FUJA6BD31LJ09646"

Response

Returns the specified vehicle object.

A single vehicle.

data
object
required

The vehicle object.