Trailers
The Trailer object
idstringoptionalPublic Trailer identifier with the trailer_ prefix.
namestringoptionalTrailer display name.
codestringoptionalCompany-scoped fleet code.
typestringoptionalStable Trailer type value.
statusstringoptionalLifecycle state independent of attachment and connectivity.
attachment_statestringoptionalDerived attached or detached state.
connectivity_statusstringoptionalDerived telemetry connectivity state.
category_idstringoptionalPublic ID of the assigned Category
vendor_idstringoptionalPublic ID of the Vendor
warranty_idstringoptionalPublic ID of the Warranty
photo_idstringoptionalPublic ID of the photo File
vehicle_idstringoptionalPublic ID of the current towing Vehicle
current_vehicleobjectoptionalCurrent towing Vehicle public identity when attached.
current_connectionobjectoptionalEffective-dated current towing connection.
locationobjectoptionalLatest direct Trailer coordinates.
telematicsobjectoptionalNormalized latest telemetry snapshot and provenance
equipmentarrayoptionalEquipment currently attached to the Trailer.
devicesarrayoptionalDevices currently attached to the Trailer.
connectionsarrayoptionalEffective-dated towing connection history
devices_countintegeroptionalAttached device count.
equipment_countintegeroptionalAttached equipment count.
created_attimestampoptionalCreation timestamp.
updated_attimestampoptionalLast update timestamp.
{
"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
}/v1/trailersCreate a Trailer
Create a first-class Trailer for the authenticated company.
namestringrequiredTrailer display name.
codestringoptionalCompany-scoped fleet code.
typeenumoptionalStable Trailer type. One of dry_van, reefer, flatbed, step_deck, lowboy, tanker, bulk, dump, chassis, curtain_side, car_carrier, livestock, logging, dolly, specialty, other.
statusenumoptionalLifecycle status. One of available, in_use, maintenance, out_of_service, retired.
vinstringoptionalTrailer VIN.
plate_numberstringoptionalRegistration plate.
payload_capacitynumberoptionalPayload capacity in the selected measurement system.
axle_countintegeroptionalAxle count.
refrigeratedbooleanoptionalWhether the Trailer is temperature controlled.
measurement_systemenumoptionalMeasurement system for typed values. One of metric, imperial.
/v1/trailerscurl -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"}'/v1/trailersQuery Trailers
Query and filter company-scoped Trailers.
querystringoptionalSearch Trailer identity fields.
typestringoptionalFilter by Trailer type.
statusstringoptionalFilter by lifecycle status.
attachment_stateenumoptionalFilter by derived towing state. One of attached, detached.
connectivity_statusenumoptionalFilter by telemetry connectivity. One of online, recently_offline, offline, never_connected.
vehiclestringoptionalFilter by attached Vehicle public ID.
vendorstringoptionalFilter by Vendor public ID.
categorystringoptionalFilter by Category public ID.
refrigeratedbooleanoptionalFilter temperature-controlled Trailers.
withstringoptionalComma-separated expansions: category, vendor, warranty, photo, positions.
limitintegeroptionalPage size.
pageintegeroptionalPage number.
sortstringoptionalSort expression.
/v1/trailerscurl https://api.fleetbase.io/v1/trailers?query=Postman%20Reefer&limit=25&sort=-created_at \
-H "Authorization: Bearer flb_live_…" \
-H "Accept: application/json"/v1/trailers/:idRetrieve a Trailer
Retrieve one Trailer by public ID.
/v1/trailers/:idcurl https://api.fleetbase.io/v1/trailers/:id \
-H "Authorization: Bearer flb_live_…" \
-H "Accept: application/json"/v1/trailers/:idUpdate a Trailer
Update a Trailer without allowing its asset discriminator to change.
namestringoptionalUpdated display name.
statusenumoptionalLifecycle status. One of available, in_use, maintenance, out_of_service, retired.
typestringoptionalStable Trailer type.
plate_numberstringoptionalRegistration plate.
payload_capacitynumberoptionalPayload capacity.
/v1/trailers/:idcurl -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}'/v1/trailers/:id/attachAttach Trailer to Vehicle
Attach a detached Trailer to a Vehicle. Repeating the same attachment is idempotent; another active Vehicle returns 409.
vehiclestringrequiredVehicle public or documented internal ID.
connected_attimestampoptionalEffective connection time.
sourcestringoptionalConnection source such as manual.
positionintegeroptionalPosition in a multi-Trailer combination.
/v1/trailers/:id/attachcurl -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}'/v1/trailers/:id/connectionsList Trailer Connections
List complete effective-dated towing history for a Trailer.
/v1/trailers/:id/connectionscurl https://api.fleetbase.io/v1/trailers/:id/connections \
-H "Authorization: Bearer flb_live_…" \
-H "Accept: application/json"/v1/vehicles/:id/trailersList Vehicle Trailers
List currently attached Trailers for a Vehicle.
/v1/vehicles/:id/trailerscurl https://api.fleetbase.io/v1/vehicles/:id/trailers \
-H "Authorization: Bearer flb_live_…" \
-H "Accept: application/json"/v1/equipmentCreate Trailer Equipment
Create lifecycle Equipment that will be attached to the Trailer and cleaned up by this folder.
/v1/equipmentcurl -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"}'/v1/equipment/:id/attachAttach Equipment to Trailer
Attach Equipment to a Trailer using the polymorphic public attachment contract.
/v1/equipment/:id/attachcurl -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}}"}'/v1/trailers/:idVerify Trailer Equipment
Verify the Trailer representation exposes attached Equipment.
/v1/trailers/:idcurl https://api.fleetbase.io/v1/trailers/:id \
-H "Authorization: Bearer flb_live_…" \
-H "Accept: application/json"/v1/equipment/:id/attachReattach Equipment to Vehicle
Atomically reassign the lifecycle Equipment from Trailer to Vehicle.
/v1/equipment/:id/attachcurl -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}}"}'/v1/devicesCreate Trailer Device
Create a lifecycle telematics Device that will be attached to the Trailer and cleaned up by this folder.
/v1/devicescurl -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"}'/v1/devices/:id/attachAttach Device to Trailer
Attach a Device to a Trailer while preserving the legacy Vehicle attachment alias.
/v1/devices/:id/attachcurl -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}}"}'/v1/trailers/:id/trackTrack Trailer
Record a Trailer observation and create a Position.
latitudenumberrequiredObserved latitude.
longitudenumberrequiredObserved longitude.
observed_attimestampoptionalSource observation time used for stale-event protection.
speednumberoptionalObserved speed.
headingnumberoptionalObserved heading.
altitudenumberoptionalObserved altitude.
odometernumberoptionalHubometer or odometer reading.
/v1/trailers/:id/trackcurl -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}'/v1/devices/:id/detachDetach Trailer Attachments
Detach the lifecycle Device. Equipment is detached in the following request.
/v1/devices/:id/detachcurl -X POST https://api.fleetbase.io/v1/devices/:id/detach \
-H "Authorization: Bearer flb_live_…" \
-H "Accept: application/json"/v1/equipment/:id/detachDetach Trailer Equipment
Detach lifecycle Equipment from its current Vehicle before cleanup.
/v1/equipment/:id/detachcurl -X POST https://api.fleetbase.io/v1/equipment/:id/detach \
-H "Authorization: Bearer flb_live_…" \
-H "Accept: application/json"/v1/devices/:idDelete Trailer Device
Delete the lifecycle Device after detaching it.
/v1/devices/:idcurl -X DELETE https://api.fleetbase.io/v1/devices/:id \
-H "Authorization: Bearer flb_live_…" \
-H "Accept: application/json"/v1/equipment/:idDelete Trailer Equipment
Delete the lifecycle Equipment after detaching it.
/v1/equipment/:idcurl -X DELETE https://api.fleetbase.io/v1/equipment/:id \
-H "Authorization: Bearer flb_live_…" \
-H "Accept: application/json"/v1/trailers/:id/detachDetach Trailer from Vehicle
End the active towing connection while retaining history. Repeating detach is idempotent.
/v1/trailers/:id/detachcurl -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"}'/v1/trailers/:id/connectionsVerify Detached Connection History
Verify completed history remains after the current towing connection ends.
/v1/trailers/:id/connectionscurl https://api.fleetbase.io/v1/trailers/:id/connections \
-H "Authorization: Bearer flb_live_…" \
-H "Accept: application/json"/v1/trailers/:idDelete a Trailer
Soft-delete a detached Trailer.
/v1/trailers/:idcurl -X DELETE https://api.fleetbase.io/v1/trailers/:id \
-H "Authorization: Bearer flb_live_…" \
-H "Accept: application/json"