FleetbaseFleetbase

Trailers

First-class towed fleet assets with independent identity, lifecycle, maintenance, equipment, towing connections, and telematics.

The Trailer object

A first-class Trailer resource stored as an independently managed fleet asset.
Attributes
idstringoptional

Public Trailer identifier with the trailer_ prefix.

namestringoptional

Trailer display name.

codestringoptional

Company-scoped fleet code.

typestringoptional

Stable Trailer type value.

statusstringoptional

Lifecycle state independent of attachment and connectivity.

attachment_statestringoptional

Derived attached or detached state.

connectivity_statusstringoptional

Derived telemetry connectivity state.

category_idstringoptional

Public ID of the assigned Category

vendor_idstringoptional

Public ID of the Vendor

warranty_idstringoptional

Public ID of the Warranty

photo_idstringoptional

Public ID of the photo File

vehicle_idstringoptional

Public ID of the current towing Vehicle

current_vehicleobjectoptional

Current towing Vehicle public identity when attached.

current_connectionobjectoptional

Effective-dated current towing connection.

locationobjectoptional

Latest direct Trailer coordinates.

telematicsobjectoptional

Normalized latest telemetry snapshot and provenance

equipmentarrayoptional

Equipment currently attached to the Trailer.

devicesarrayoptional

Devices currently attached to the Trailer.

connectionsarrayoptional

Effective-dated towing connection history

devices_countintegeroptional

Attached device count.

equipment_countintegeroptional

Attached equipment count.

created_attimestampoptional

Creation timestamp.

updated_attimestampoptional

Last update timestamp.

The Trailer object
{
  "id": "trailer_7YqM3KpL2n",
  "name": "Reefer 12",
  "code": "TRL-0012",
  "type": "reefer",
  "status": "available",
  "plate_number": "TR-1200",
  "attachment_state": "detached",
  "connectivity_status": "never_connected",
  "online": null,
  "devices_count": 0,
  "equipment_count": 0
}
POST/v1/trailers

Create a Trailer

Create a first-class Trailer for the authenticated company.

Body parameters
namestringrequired

Trailer display name.

codestringoptional

Company-scoped fleet code.

typeenumoptional

Stable Trailer type. One of dry_van, reefer, flatbed, step_deck, lowboy, tanker, bulk, dump, chassis, curtain_side, car_carrier, livestock, logging, dolly, specialty, other.

statusenumoptional

Lifecycle status. One of available, in_use, maintenance, out_of_service, retired.

vinstringoptional

Trailer VIN.

plate_numberstringoptional

Registration plate.

payload_capacitynumberoptional

Payload capacity in the selected measurement system.

axle_countintegeroptional

Axle count.

refrigeratedbooleanoptional

Whether the Trailer is temperature controlled.

measurement_systemenumoptional

Measurement system for typed values. One of metric, imperial.

POST/v1/trailers
curl -X POST https://api.fleetbase.io/v1/trailers \
  -H "Authorization: Bearer flb_live_…" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{"name":"Postman Reefer","code":"POSTMAN-TRL-001","type":"reefer","status":"available","plate_number":"PM-TR-001","payload_capacity":20000,"axle_count":2,"refrigerated":true,"measurement_system":"metric"}'
GET/v1/trailers

Query Trailers

Query and filter company-scoped Trailers.

Query parameters
querystringoptional

Search Trailer identity fields.

typestringoptional

Filter by Trailer type.

statusstringoptional

Filter by lifecycle status.

attachment_stateenumoptional

Filter by derived towing state. One of attached, detached.

connectivity_statusenumoptional

Filter by telemetry connectivity. One of online, recently_offline, offline, never_connected.

vehiclestringoptional

Filter by attached Vehicle public ID.

vendorstringoptional

Filter by Vendor public ID.

categorystringoptional

Filter by Category public ID.

refrigeratedbooleanoptional

Filter temperature-controlled Trailers.

withstringoptional

Comma-separated expansions: category, vendor, warranty, photo, positions.

limitintegeroptional

Page size.

pageintegeroptional

Page number.

sortstringoptional

Sort expression.

GET/v1/trailers
curl https://api.fleetbase.io/v1/trailers?query=Postman%20Reefer&limit=25&sort=-created_at \
  -H "Authorization: Bearer flb_live_…" \
  -H "Accept: application/json"
GET/v1/trailers/:id

Retrieve a Trailer

Retrieve one Trailer by public ID.

GET/v1/trailers/:id
curl https://api.fleetbase.io/v1/trailers/:id \
  -H "Authorization: Bearer flb_live_…" \
  -H "Accept: application/json"
PUT/v1/trailers/:id

Update a Trailer

Update a Trailer without allowing its asset discriminator to change.

Body parameters
namestringoptional

Updated display name.

statusenumoptional

Lifecycle status. One of available, in_use, maintenance, out_of_service, retired.

typestringoptional

Stable Trailer type.

plate_numberstringoptional

Registration plate.

payload_capacitynumberoptional

Payload capacity.

PUT/v1/trailers/:id
curl -X PUT https://api.fleetbase.io/v1/trailers/:id \
  -H "Authorization: Bearer flb_live_…" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{"name":"Postman Reefer Updated","status":"in_use","payload_capacity":21000}'
POST/v1/trailers/:id/attach

Attach Trailer to Vehicle

Attach a detached Trailer to a Vehicle. Repeating the same attachment is idempotent; another active Vehicle returns 409.

Body parameters
vehiclestringrequired

Vehicle public or documented internal ID.

connected_attimestampoptional

Effective connection time.

sourcestringoptional

Connection source such as manual.

positionintegeroptional

Position in a multi-Trailer combination.

POST/v1/trailers/:id/attach
curl -X POST https://api.fleetbase.io/v1/trailers/:id/attach \
  -H "Authorization: Bearer flb_live_…" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{"vehicle":"{{vehicle_id}}","source":"manual","position":1}'
GET/v1/trailers/:id/connections

List Trailer Connections

List complete effective-dated towing history for a Trailer.

GET/v1/trailers/:id/connections
curl https://api.fleetbase.io/v1/trailers/:id/connections \
  -H "Authorization: Bearer flb_live_…" \
  -H "Accept: application/json"
GET/v1/vehicles/:id/trailers

List Vehicle Trailers

List currently attached Trailers for a Vehicle.

GET/v1/vehicles/:id/trailers
curl https://api.fleetbase.io/v1/vehicles/:id/trailers \
  -H "Authorization: Bearer flb_live_…" \
  -H "Accept: application/json"
POST/v1/equipment

Create Trailer Equipment

Create lifecycle Equipment that will be attached to the Trailer and cleaned up by this folder.

POST/v1/equipment
curl -X POST https://api.fleetbase.io/v1/equipment \
  -H "Authorization: Bearer flb_live_…" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{"name":"Postman Trailer Sensor Bracket","code":"POSTMAN-TRL-EQ","type":"tool","status":"available"}'
POST/v1/equipment/:id/attach

Attach Equipment to Trailer

Attach Equipment to a Trailer using the polymorphic public attachment contract.

POST/v1/equipment/:id/attach
curl -X POST https://api.fleetbase.io/v1/equipment/:id/attach \
  -H "Authorization: Bearer flb_live_…" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{"attachable_type":"fleet-ops:trailer","attachable":"{{trailer_id}}"}'
GET/v1/trailers/:id

Verify Trailer Equipment

Verify the Trailer representation exposes attached Equipment.

GET/v1/trailers/:id
curl https://api.fleetbase.io/v1/trailers/:id \
  -H "Authorization: Bearer flb_live_…" \
  -H "Accept: application/json"
POST/v1/equipment/:id/attach

Reattach Equipment to Vehicle

Atomically reassign the lifecycle Equipment from Trailer to Vehicle.

POST/v1/equipment/:id/attach
curl -X POST https://api.fleetbase.io/v1/equipment/:id/attach \
  -H "Authorization: Bearer flb_live_…" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{"attachable_type":"fleet-ops:vehicle","attachable":"{{vehicle_id}}"}'
POST/v1/devices

Create Trailer Device

Create a lifecycle telematics Device that will be attached to the Trailer and cleaned up by this folder.

POST/v1/devices
curl -X POST https://api.fleetbase.io/v1/devices \
  -H "Authorization: Bearer flb_live_…" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{"name":"Postman Trailer Tracker","device_id":"POSTMAN-TRL-TRACKER","type":"gps","provider":"manual"}'
POST/v1/devices/:id/attach

Attach Device to Trailer

Attach a Device to a Trailer while preserving the legacy Vehicle attachment alias.

POST/v1/devices/:id/attach
curl -X POST https://api.fleetbase.io/v1/devices/:id/attach \
  -H "Authorization: Bearer flb_live_…" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{"attachable_type":"fleet-ops:trailer","attachable":"{{trailer_id}}"}'
PATCH/v1/trailers/:id/track

Track Trailer

Record a Trailer observation and create a Position.

Body parameters
latitudenumberrequired

Observed latitude.

longitudenumberrequired

Observed longitude.

observed_attimestampoptional

Source observation time used for stale-event protection.

speednumberoptional

Observed speed.

headingnumberoptional

Observed heading.

altitudenumberoptional

Observed altitude.

odometernumberoptional

Hubometer or odometer reading.

PATCH/v1/trailers/:id/track
curl -X PATCH https://api.fleetbase.io/v1/trailers/:id/track \
  -H "Authorization: Bearer flb_live_…" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{"latitude":40.7484,"longitude":-73.9857,"speed":35,"heading":90}'
POST/v1/devices/:id/detach

Detach Trailer Attachments

Detach the lifecycle Device. Equipment is detached in the following request.

POST/v1/devices/:id/detach
curl -X POST https://api.fleetbase.io/v1/devices/:id/detach \
  -H "Authorization: Bearer flb_live_…" \
  -H "Accept: application/json"
POST/v1/equipment/:id/detach

Detach Trailer Equipment

Detach lifecycle Equipment from its current Vehicle before cleanup.

POST/v1/equipment/:id/detach
curl -X POST https://api.fleetbase.io/v1/equipment/:id/detach \
  -H "Authorization: Bearer flb_live_…" \
  -H "Accept: application/json"
DELETE/v1/devices/:id

Delete Trailer Device

Delete the lifecycle Device after detaching it.

DELETE/v1/devices/:id
curl -X DELETE https://api.fleetbase.io/v1/devices/:id \
  -H "Authorization: Bearer flb_live_…" \
  -H "Accept: application/json"
DELETE/v1/equipment/:id

Delete Trailer Equipment

Delete the lifecycle Equipment after detaching it.

DELETE/v1/equipment/:id
curl -X DELETE https://api.fleetbase.io/v1/equipment/:id \
  -H "Authorization: Bearer flb_live_…" \
  -H "Accept: application/json"
POST/v1/trailers/:id/detach

Detach Trailer from Vehicle

End the active towing connection while retaining history. Repeating detach is idempotent.

POST/v1/trailers/:id/detach
curl -X POST https://api.fleetbase.io/v1/trailers/:id/detach \
  -H "Authorization: Bearer flb_live_…" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{"notes":"Postman lifecycle detach"}'
GET/v1/trailers/:id/connections

Verify Detached Connection History

Verify completed history remains after the current towing connection ends.

GET/v1/trailers/:id/connections
curl https://api.fleetbase.io/v1/trailers/:id/connections \
  -H "Authorization: Bearer flb_live_…" \
  -H "Accept: application/json"
DELETE/v1/trailers/:id

Delete a Trailer

Soft-delete a detached Trailer.

DELETE/v1/trailers/:id
curl -X DELETE https://api.fleetbase.io/v1/trailers/:id \
  -H "Authorization: Bearer flb_live_…" \
  -H "Accept: application/json"
Trailers | Fleetbase