Assets

Update an existing asset.

Update an existing asset.

<b>Rate limit:</b> 100 requests/min (learn more about rate limits <a href="https://developers.samsara.com/docs/rate-limits" target="_blank">here</a>).

To use this endpoint, select Write Assets under the Assets category when creating or editing an API token. <a href="https://developers.samsara.com/docs/authentication#scopes-for-api-tokens" target="_blank">Learn More.</a>

Submit Feedback: Likes, dislikes, and API feature requests should be filed as feedback in our <a href="https://forms.gle/zkD4NCH7HjKb7mm69" target="_blank">API feedback form</a>. If you encountered an issue or noticed inaccuracies in the API documentation, please <a href="https://www.samsara.com/help" target="_blank">submit a case</a> to our support team.

patch/assets

Request

  • Base URL
    https://api.samsara.com
  • Auth
    HTTP bearer

Query parameters

idstring required

ID of the asset to update. Can be either a unique Samsara ID or an external ID for the asset.

Request body

externalIdsobject

A map of external ids

licensePlatestring

The license plate of the asset.

makestring

The OEM/manufacturer of the asset. Updates to this field are restricted.

modelstring

The model of the asset. Updates to this field are restricted.

namestring

The human-readable name of the asset. 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.

notesstring

These are generic notes about the asset. Can be set or updated through the Samsara Dashboard or the API at any time.

readingsIngestionEnabledboolean

Indicates whether the asset is expected to have data ingested using the Readings API. Do not set this to true for an asset that has, or is intended to have, a connected gateway.

regulationMode'mixed' | 'regulated' | 'unregulated'

Whether or not the asset is regulated, unregulated (non-CMV), or a mixed use unregulated asset. Primarily used with vehicles. Valid values: mixed, regulated, unregulated

serialNumberstring

The serial number of the asset. This can be an internal serial number or used to hold legacy VIN/PIN numbers such as ones of shorter lengths.

tagIdsstring[]

An array of IDs of tags to associate with this asset. If provided, this replaces the asset's entire set of tag associations with exactly this list; omit this field to leave existing tag associations unchanged, or pass an empty array to clear them. If your access to the API is scoped by one or more tags, this field is required to pass in.

type'uncategorized' | 'trailer' | 'equipment' | 'unpowered' | 'vehicle'

The operational context in which the asset interacts with the Samsara system. Examples: Vehicle (eg: truck, bus...), Trailer (eg: dry van, reefer, flatbed...), Powered Equipment (eg: dozer, crane...), Unpowered Equipment (eg: container, dumpster...), or Uncategorized. Valid values: uncategorized, trailer, equipment, unpowered, vehicle

vinstring

The unique 17-digit VIN (Vehicle Identification Number) or PIN (Product Identification Number) of the asset.

yearinteger

The model year of the asset. Updates to this field are restricted.

Example request

{
  "attributes": [
    {
      "dateValues": [
        "2024-01-15",
        "2024-12-31"
      ],
      "id": "494123",
      "name": "Compliance/ELD",
      "numberValues": [
        867,
        5309
      ],
      "stringValues": [
        "HQ",
        "Leased"
      ]
    }
  ],
  "licensePlate": "XHK1234",
  "make": "Bobcat",
  "model": "S630 T4",
  "name": "MyAsset-1234",
  "notes": "These are notes.",
  "regulationMode": "mixed",
  "serialNumber": "LN016251",
  "tagIds": [
    "Illo reiciendis repudiandae aut possimus enim.",
    "Voluptates consectetur alias voluptates aspernatur.",
    "Id est."
  ],
  "type": "trailer",
  "vin": "1FUJBBCKXCLBZ1234",
  "year": 2015
}

Response

OK response.

Example response

{
  "data": {
    "attributes": [
      {
        "dateValues": [
          "2024-01-15",
          "2024-12-31"
        ],
        "id": "494123",
        "name": "Compliance/ELD",
        "numberValues": [
          867,
          5309
        ],
        "stringValues": [
          "HQ",
          "Leased"
        ]
      }
    ],
    "createdAtTime": "2020-01-27T07:06:25Z",
    "id": "12345",
    "licensePlate": "XHK1234",
    "make": "Bobcat",
    "model": "S630 T4",
    "name": "MyAsset-1234",
    "notes": "These are notes.",
    "regulationMode": "mixed",
    "serialNumber": "LN016251",
    "tags": [
      {
        "id": "3914",
        "name": "East Coast",
        "parentTagId": "4815"
      }
    ],
    "type": "trailer",
    "updatedAtTime": "2020-01-27T07:06:25Z",
    "vin": "1FUJBBCKXCLBZ1234",
    "year": 2015
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.