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.
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.
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
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.
Fields that can be patched on a vehicle.
All the editable portions of the vehicle object.
Show child attributes
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.
none, emergencyLights, emergencyAlarm, stopPaddle, powerTakeOff, plow, sweeper, salter, reefer, door, boom, auxiliaryEngine, generator, eightWayLights, panicButton, privacyButton, frontAxleDrive, weightSensor, other, secondaryFuelSource, ecuPowerTakeOff "boom"
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.
none, emergencyLights, emergencyAlarm, stopPaddle, powerTakeOff, plow, sweeper, salter, reefer, door, boom, auxiliaryEngine, generator, eightWayLights, panicButton, privacyButton, frontAxleDrive, weightSensor, other, secondaryFuelSource, ecuPowerTakeOff "boom"
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.
none, emergencyLights, emergencyAlarm, stopPaddle, powerTakeOff, plow, sweeper, salter, reefer, door, boom, auxiliaryEngine, generator, eightWayLights, panicButton, privacyButton, frontAxleDrive, weightSensor, other, secondaryFuelSource, ecuPowerTakeOff "boom"
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.
none, emergencyLights, emergencyAlarm, stopPaddle, powerTakeOff, plow, sweeper, salter, reefer, door, boom, auxiliaryEngine, generator, eightWayLights, panicButton, privacyButton, frontAxleDrive, weightSensor, other, secondaryFuelSource, ecuPowerTakeOff "boom"
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.
none, emergencyLights, emergencyAlarm, stopPaddle, powerTakeOff, plow, sweeper, salter, reefer, door, boom, auxiliaryEngine, generator, eightWayLights, panicButton, privacyButton, frontAxleDrive, weightSensor, other, secondaryFuelSource, ecuPowerTakeOff "boom"
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.
none, emergencyLights, emergencyAlarm, stopPaddle, powerTakeOff, plow, sweeper, salter, reefer, door, boom, auxiliaryEngine, generator, eightWayLights, panicButton, privacyButton, frontAxleDrive, weightSensor, other, secondaryFuelSource, ecuPowerTakeOff "boom"
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.
none, emergencyLights, emergencyAlarm, stopPaddle, powerTakeOff, plow, sweeper, salter, reefer, door, boom, auxiliaryEngine, generator, eightWayLights, panicButton, privacyButton, frontAxleDrive, weightSensor, other, secondaryFuelSource, ecuPowerTakeOff "boom"
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.
none, emergencyLights, emergencyAlarm, stopPaddle, powerTakeOff, plow, sweeper, salter, reefer, door, boom, auxiliaryEngine, generator, eightWayLights, panicButton, privacyButton, frontAxleDrive, weightSensor, other, secondaryFuelSource, ecuPowerTakeOff "boom"
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.
none, emergencyLights, emergencyAlarm, stopPaddle, powerTakeOff, plow, sweeper, salter, reefer, door, boom, auxiliaryEngine, generator, eightWayLights, panicButton, privacyButton, frontAxleDrive, weightSensor, other, secondaryFuelSource, ecuPowerTakeOff "boom"
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.
none, emergencyLights, emergencyAlarm, stopPaddle, powerTakeOff, plow, sweeper, salter, reefer, door, boom, auxiliaryEngine, generator, eightWayLights, panicButton, privacyButton, frontAxleDrive, weightSensor, other, secondaryFuelSource, ecuPowerTakeOff "boom"
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.
none, emergencyLights, emergencyAlarm, stopPaddle, powerTakeOff, plow, sweeper, salter, reefer, door, boom, auxiliaryEngine, generator, eightWayLights, panicButton, privacyButton, frontAxleDrive, weightSensor, other, secondaryFuelSource, ecuPowerTakeOff "boom"
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.
none, emergencyLights, emergencyAlarm, stopPaddle, powerTakeOff, plow, sweeper, salter, reefer, door, boom, auxiliaryEngine, generator, eightWayLights, panicButton, privacyButton, frontAxleDrive, weightSensor, other, secondaryFuelSource, ecuPowerTakeOff "boom"
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.
none, emergencyLights, emergencyAlarm, stopPaddle, powerTakeOff, plow, sweeper, salter, reefer, door, boom, auxiliaryEngine, generator, eightWayLights, panicButton, privacyButton, frontAxleDrive, weightSensor, other, secondaryFuelSource, ecuPowerTakeOff "boom"
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.
10943
The external IDs for the given object.
Show child attributes
{
"maintenanceId": "250020",
"payrollId": "ABFS18600"
}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.
"ABCD-123-XYZ"
The gross weight of the vehicle in either pounds (lb) or kilograms (kg). Only returned for customers with commercial speed limits (CSL) enabled.
Show child attributes
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.
passengerCar, lightTruck, heavyDuty, off, automatic "off"
The license plate of the Vehicle. By default: empty. Can be set or updated through the Samsara Dashboard or the API at any time.
12"XHK1234"
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.
"Truck A7"
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.
255"These are notes about this given vehicle."
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.
9182
ID for the static assigned driver of the vehicle. Setting the value to 0 will unassign the current driver.
"123"
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.
Whether or not the vehicle is regulated, unregulated (non-CMV), or a mixed use unregulated vehicle. Valid values: regulated, unregulated, mixed.
regulated, unregulated, mixed "regulated"
The type of the vehicle. Only returned for customers with commercial speed limits (CSL) enabled.
"truck"
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.
11 - 17"1FUJA6BD31LJ09646"
Returns the specified vehicle object.
A single vehicle.
The vehicle object.
Show child attributes
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"
}
}