Fleets
The Fleet object
idstringoptionalPublic fleet identifier.
namestringoptionalFleet display name.
taskstringoptionalTask associated with the fleet.
statusstringoptionalFleet status.
service_areaobjectoptionalService area assigned to the fleet, when loaded.
zoneobjectoptionalZone assigned to the fleet, when loaded.
vendorobjectoptionalVendor assigned to the fleet, when loaded.
parent_fleetobjectoptionalParent fleet, when loaded.
subfleetsarray of objectsoptionalChild fleets, when loaded.
driversarray of objectsoptionalDrivers assigned to the fleet, when loaded.
vehiclesarray of objectsoptionalVehicles assigned to the fleet, when loaded.
updated_attimestampoptionalTimestamp when the fleet was last updated.
created_attimestampoptionalTimestamp when the fleet was created.
{
"id": "fleet_4Mnp8Qx2Vz",
"name": "Haulers",
"task": null,
"status": "active",
"service_area": null,
"zone": null,
"vendor": null,
"parent_fleet": null,
"subfleets": [],
"drivers": [],
"vehicles": [],
"updated_at": "2026-05-07T08:30:00.000000Z",
"created_at": "2026-05-07T08:30:00.000000Z"
}/v1/fleetsCreate a Fleet
Creates a fleet for grouping drivers and vehicles. Assign a service area when the fleet should be constrained to a specific operating area.
namestringrequiredFleet display name.
service_areastringoptionalService area ID to assign to the fleet.
/v1/fleetscurl -X POST https://api.fleetbase.io/v1/fleets \
-H "Authorization: Bearer flb_live_…" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"name": "Haulers",
"service_area": "{{service_area_id}}"
}'{
"id": "<string>",
"service_area": "<string>",
"name": "<string>",
"task": "<string>",
"status": "<string>",
"updated_at": "<string>",
"created_at": "<string>"
}/v1/fleetsQuery Fleets
Returns a paginated list of fleets for the current organization. Use pagination and sorting parameters to control the result set.
limitintegeroptionalMaximum number of fleets to return.
offsetintegeroptionalNumber of fleets to skip before returning results.
sortstringoptionalSort expression for the fleet query.
witharray of stringsoptionalRelationships to include in fleet responses.
/v1/fleetscurl https://api.fleetbase.io/v1/fleets?limit=25&offset=0&sort=created_at \
-H "Authorization: Bearer flb_live_…" \
-H "Accept: application/json"{
"id": "<string>",
"service_area": "<string>",
"name": "<string>",
"task": "<string>",
"status": "<string>",
"updated_at": "<string>",
"created_at": "<string>"
}/v1/fleets/:idRetrieve a Fleet
Retrieves a fleet.
/v1/fleets/:idcurl https://api.fleetbase.io/v1/fleets/:id \
-H "Authorization: Bearer flb_live_…" \
-H "Accept: application/json"{
"id": "<string>",
"service_area": "<string>",
"name": "<string>",
"task": "<string>",
"status": "<string>",
"updated_at": "<string>",
"created_at": "<string>"
}/v1/fleets/:idUpdate a Fleet
Updates a fleet's name or assigned service area.
namestringoptionalFleet display name.
service_areastringoptionalService area ID to assign to the fleet.
/v1/fleets/:idcurl -X PUT https://api.fleetbase.io/v1/fleets/:id \
-H "Authorization: Bearer flb_live_…" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"name": "Haulers",
"service_area": "{{service_area_id}}"
}'{
"id": "<string>",
"service_area": "<string>",
"name": "<string>",
"task": "<string>",
"status": "<string>",
"created_at": "<string>",
"updated_at": "<string>"
}/v1/fleets/:idDelete a Fleet
Deletes a fleet.
/v1/fleets/:idcurl -X DELETE https://api.fleetbase.io/v1/fleets/:id \
-H "Authorization: Bearer flb_live_…" \
-H "Accept: application/json"{
"id": "<string>",
"object": "<string>",
"deleted": "<boolean>"
}