Skip to main content
POST
Create trailer
The Create Trailer endpoint registers a company-owned trailer. On success it returns the new trailer and its optimistic-concurrency token in the ETag response header. Send that value in the If-Match header of a later Update trailer request. 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:create scope. See Authentication.

Equipment type and size are required

EquipmentType and EquipmentSize are required. A trailer without them never matches the equipment requirement of a load. EquipmentType is an Alvys equipment type such as Van, Reefer, or Flatbed, matched case-insensitively. EquipmentSize is the length in feet, for example 53 or 53'.

Trailer number and VIN must be unique

TrailerNum must be unique among your company’s trailers. When you supply VinNum, it must be unique too. A request that would create a duplicate is rejected with 409 Conflict, and the problem type tells you which value clashed: The response does not identify the existing trailer. If your credential also has the trailer:read scope, find it with Search trailers and update that record instead. This lets an onboarding job that runs twice reconcile with what it already created.

Subsidiary

SubsidiaryId must be a subsidiary that your credential may write to. Get the ids from List subsidiaries. If the credential can write to exactly one subsidiary, you can omit SubsidiaryId and the trailer is created in that subsidiary.

Trailer status

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. Crashed and Inactive remove the trailer from the ELD live map and from the trailer lists you pick from in Alvys.

Request parameters

The following parameter is required in the URL path:

Request body

TrailerNum, EquipmentType, and EquipmentSize are required. Dates are date-only values in yyyy-MM-dd format.

Example cURL request

Replace YOUR_ACCESS_TOKEN with your actual Bearer token.

Response fields

A successful request returns 201 Created with the new trailer, in the same shape as Get trailer. The trailer’s current ETag is in the ETag response header.

Example response

201 Created
The example shows a subset of the response fields.

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

Path Parameters

version
string
default:1.0
required

API version (e.g., 1.0)

Example:

"1.0"

Body

TrailerNum
string
required
EquipmentType
string
required

Alvys equipment type, e.g. "Van", "Reefer", "Flatbed". Matched case-insensitively. Required: a trailer without one never matches a load's equipment requirement.

EquipmentSize
string
required

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. Defaults to Active.

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, ...).

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

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.

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.

Response

Created

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