Skip to main content
PATCH
Update trailer
The Update Trailer endpoint applies a partial update to an existing trailer. Send only the fields you want to change. A field that is absent from the body keeps its stored value. An empty string clears a free-text field. For more information on how versioning works and how to include it in your requests, please refer to the Versioning page.
This endpoint requires the trailer:update scope. See Authentication.

If-Match is required

This endpoint uses optimistic concurrency. Send the trailer’s current ETag in the If-Match header. The ETag response header of Get trailer, Create trailer, and every successful update carries it.
  • If you omit If-Match, the request is rejected with 428 Precondition Required.
  • If the trailer changed after you read it, the request is rejected with 412 Precondition Failed. Get the trailer again and retry with the new ETag.

Fields that are replaced whole

Dimensions, Reefer, EldProviders, and References are replaced whole: send the complete value you want stored. For EldProviders and References, null clears the list.
  • EldProviders: moving the trailer off an ELD link stops its location updates from that provider. Omit SensorId, or send null, to keep the sensor id stored on the same link.
  • References: include the Id of each reference already on the trailer that you want to keep or edit. Omit Id for a new reference. A reference identical to one already stored is kept as it is.

Trailer number and VIN must stay unique

If you change TrailerNum or VinNum to a value another trailer in your company already has, the request is rejected with 409 Conflict. The problem type is https://api.alvys.com/errors/Conflict/DuplicateAssetNumber for the trailer number and https://api.alvys.com/errors/Conflict/DuplicateVin for the VIN.

Status and owner operator

Status is shown in the dispatch planner. It does not by itself block dispatch. A maintenance work order started in Alvys moves the trailer to In Shop, and back to Active when the work order completes, so a status you write can be overwritten. OwnerOperatorId set to null unassigns the trailer: it goes back to the carrier of its subsidiary.

Request parameters

The following parameters are required in the URL path: The following header is required:

Request body

All fields are optional, including EquipmentType and EquipmentSize. The fields are the same as in Create trailer, with these differences:

Example cURL request

Replace YOUR_ACCESS_TOKEN with your actual Bearer token and the If-Match value with the trailer’s current ETag.

Response fields

A successful request returns 200 OK with the updated trailer, in the same shape as Get trailer. The new ETag is in the ETag response header.

Status codes

Why a request is refused with 422

The problem type is https://api.alvys.com/errors/UnprocessableEntity/ followed by the reason:

Rate limits

All endpoints are subject to rate limits to protect the API from traffic spikes. For detailed information on rate limits, please refer to the Rate Limits section. This page is interactive, allowing you to try a request by completing the fields for the parameters below. As you fill out the parameters, the CURL command on the right side of the page will be automatically updated.

Authorizations

Authorization
string
header
required

OAuth 2.0 client-credentials access token. Obtain one from https://auth.alvys.com/oauth/token (grant_type=client_credentials, audience=https://api.alvys.com/public/), then paste it here. The playground sends it as Authorization: Bearer <token>.

Headers

If-Match
string
required

The trailer's current ETag (the ETag response header of your most recent GET, POST or PATCH), for optimistic concurrency. Required; if omitted the request is rejected with 428.

Path Parameters

id
string
required
version
string
default:1.0
required

API version (e.g., 1.0)

Example:

"1.0"

Body

TrailerNum
string | null
EquipmentType
string | null

Alvys equipment type, e.g. "Van", "Reefer", "Flatbed". Matched case-insensitively.

EquipmentSize
string | null

Length in feet, e.g. "53" or "53'".

VinNum
string | null
Year
integer<int32> | null
Make
string | null
LicenseNum
string | null
LicenseState
string | null
LicenseCountry
string | null
LicenseExpiresAt
string<date> | null

Plate registration expiration ("License Expiration" in the app). Date only (yyyy-MM-dd), stored as 00:00 UTC.

PlatesExpire
boolean | null

Whether the plates expire ("Plates Expire" in the app).

Status
string | null

One of Active, Planned, Temporary, Repair, In Shop, Leased Out, Crashed, Inactive (case-insensitive). Shown in the dispatch planner; does not by itself block dispatch. In Shop and Active are also written by the maintenance work-order sync. Crashed and Inactive remove the trailer from the ELD live map and from trailer pickers. A maintenance work order started in Alvys moves the trailer to In Shop and back to Active on its own.

SubsidiaryId
string | null

Subsidiary id from GET /subsidiaries. Must be one this credential may write to. May be omitted only when the credential can write to exactly one subsidiary.

FleetId
string | null

Fleet id, as returned in Fleet.Id by GET /trailers. Must be an active fleet of your account.

Capacity
object | null

Load capacity: pallets and weight in pounds.

ReeferMake
string | null
NumberOfAxles
integer<int32> | null
EmptyWeight
object | null

Empty (tare) weight, with its unit (Pounds, Kilograms, ...). Stored and returned in pounds.

Dimensions
object | null

Outside dimensions for the routing vehicle profile: Height, Width and Length, each with its unit (Feet, Inches, Meters, ...). Replaced whole.

GrossVehicleWeightRating
object | null

Gross vehicle weight rating, with its unit (Pounds, Kilograms, ...). Max payload stays on Capacity.Weight.

TireCount
integer<int32> | null
Reefer
object | null

Reefer unit fuel use: FuelBurnPerHour (gallons) and TankCapacity (with its unit). Replaced whole.

InsuranceCompany
string | null
InsurancePolicyNumber
string | null
InsuranceExpiresAt
string<date> | null

Date only (yyyy-MM-dd), stored as 00:00 UTC.

InspectionExpiresAt
string<date> | null

Annual inspection expiration. Date only (yyyy-MM-dd), stored as 00:00 UTC.

InsuranceValue
number<double> | null
LeasedFrom
object | null
LeasedTo
object | null
StartDate
string<date> | null

Date the trailer entered service. Date only (yyyy-MM-dd), stored as 00:00 UTC.

EndDate
string<date> | null

Date the trailer left service. Date only (yyyy-MM-dd), stored as 00:00 UTC.

OwnerOperatorId
string | null

Driver id of the owner operator the asset belongs to ("Assigned to Owner Operator" in the app). The driver must exist in your account with contractor type Owner Operator. null unassigns the asset: it goes back to its subsidiary's carrier. On a truck, fuel cards with Deduct Fuel follow the change in the same write: they stop deducting when the truck leaves its owner operator, and deduct from the new one when it moves.

TireSize
string | null

Tire size, free text (e.g. 295/75R22.5).

EldProviders
object[] | null

ELD links, replaced whole. Moving an asset off a link stops its location updates from that provider. null clears.

References
object[] | null

Custom references, replaced whole. Each new or changed reference must name a definition the tenant set up for this asset type; type, access and visibility come from the definition. null clears.

Response

OK

Id
string
required
TrailerNum
string
required
Status
string
required
Notes
object[]
required
CreatedAt
string<date-time>
required
Fleet
object | null
Year
integer<int32> | null
Make
string | null
LicenseNum
string | null
LicenseState
string | null
LicenseCountry
string | null
PlateExpiresAt
string<date> | null
LicenseExpiresAt
string<date> | null
VinNum
string | null
SubsidiaryId
string | null
EquipmentType
string | null
EquipmentSize
string | null
Capacity
object | null
InsuranceCompany
string | null
InsurancePolicyNumber
string | null
InsuranceExpiresAt
string<date> | null
InspectionExpiresAt
string<date> | null
References
object[] | null
CompanyOwnedAsset
boolean | null

Whether this trailer is part of the company's own fleet. true is a company-owned trailer. false is an external trailer — a carrier's equipment recorded against a trip rather than an asset this tenant manages. The field is also absent or null on a small number of older external records, so treat anything other than true as external.

PlatesExpire
boolean | null
ReeferMake
string | null
InsuranceValue
number<double> | null
LeasedFrom
object | null
LeasedTo
object | null
StartDate
string<date> | null
EndDate
string<date> | null
NumberOfAxles
integer<int32> | null
EmptyWeight
object | null
Dimensions
object | null
GrossVehicleWeightRating
object | null
TireCount
integer<int32> | null
Reefer
object | null