Skip to main content
PATCH
/
fleet
/
trailers
/
{id}
Update a trailer
curl --request PATCH \
  --url https://api.samsara.com/fleet/trailers/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "attributes": [
    {
      "dateValues": [
        "2024-01-15",
        "2024-12-31"
      ],
      "id": "494123",
      "name": "Compliance/ELD",
      "numberValues": [
        867,
        5309
      ],
      "stringValues": [
        "HQ",
        "Leased"
      ]
    }
  ],
  "enabledForMobile": true,
  "externalIds": {},
  "licensePlate": "7TYP290",
  "name": "Trailer-123",
  "notes": "These are my trailer notes",
  "odometerMeters": 1234,
  "tagIds": [
    "Qui quia quam quam vel voluptas.",
    "Nihil vitae modi accusamus est.",
    "Eos dolor magni mollitia.",
    "A sequi."
  ],
  "trailerSerialNumber": "8V8WD530FLN016251"
}
'
{
  "data": {
    "id": "494123",
    "attributes": [
      {
        "dateValues": [
          "2024-01-15",
          "2024-12-31"
        ],
        "id": "494123",
        "name": "Compliance/ELD",
        "numberValues": [
          867,
          5309
        ],
        "stringValues": [
          "HQ",
          "Leased"
        ]
      }
    ],
    "enabledForMobile": true,
    "externalIds": {},
    "installedGateway": {
      "model": "VG34",
      "serial": "GFRV-43N-VGX"
    },
    "licensePlate": "7TYP290",
    "name": "Trailer-123",
    "notes": "These are my trailer notes",
    "tags": [
      {
        "id": "3914",
        "name": "East Coast",
        "parentTagId": "4815"
      }
    ],
    "trailerSerialNumber": "8V8WD530FLN016251"
  }
}

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 trailer. Can be either unique Samsara ID or an external ID for the trailer.

Body

application/json
attributes
object[]

A list of attributes to assign to the trailer.

enabledForMobile
boolean

Indicates if the trailer is visible on the Samsara mobile apps.

Example:

true

externalIds
object

A map of external ids

licensePlate
string

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

Maximum string length: 12
Example:

"7TYP290"

name
string

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.

Example:

"Trailer-123"

notes
string

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.

Maximum string length: 255
Example:

"These are my trailer notes"

odometerMeters
integer<int64>

When you provide a manual odometer override, Samsara will begin updating a trailer's odometer using GPS distance traveled since this override was set. Only applies to trailers installed with Samsara gateways.

Example:

1234

tagIds
string[]

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

Example:
[
"Qui quia quam quam vel voluptas.",
"Nihil vitae modi accusamus est.",
"Eos dolor magni mollitia.",
"A sequi."
]
trailerSerialNumber
string

The serial number of the trailer.

Example:

"8V8WD530FLN016251"

Response

OK response.

data
object
required