Bulk Delete Vehicles by Filters
Bulk Delete Vehicles by Filters
Delete all vehicles matching the given filter criteria in a single operation
POST
Bulk Delete Vehicles by Filters
Bulk Delete Vehicles by Filters
Delete all vehicles that match a set of filter criteria. This endpoint uses a two-step workflow: first fetch the vehicle list with filters applied (which returns afilter_hash), then call this endpoint with that hash to confirm you are deleting exactly what you saw.
How It Works
- Call
GET /v1/vehicleswith your desired filters — the response includes afilter_hashfield. - Call this endpoint with the same query filters and pass the
filter_hashin the request body. - The API verifies the hash matches the current filter results to prevent stale-data race conditions.
Request
Headers
Your API key for authenticationExample:
sk_live_1234567890abcdefYour organization UUIDExample:
a8315ef3-dd50-43f8-b7ce-d839e68d51faBody Parameters
The hash returned in the
filter_hash field of the vehicle list response. Confirms you are deleting exactly the records you saw.Example: "a3f1c2e4b5d6a7b8"Query Parameters
At least one filter parameter is required.Text search across vehicle fields (e.g. license plate, name)
Filter by vehicle statusAvailable values:
active, archived, errorExample: status[]=active&status[]=archivedFilter by vehicle ownership typeAvailable values:
owned, rentedExample: ownership[]=ownedFilter by unknown vehicle UUIDs
Filter by fuel type UUIDs
Filter by source file UUIDs (e.g. to delete all vehicles imported from a specific file)
Filter vehicles created on or after this datetime (ISO 8601)Example:
2024-01-01T00:00:00ZFilter vehicles created on or before this datetime (ISO 8601)Example:
2024-12-31T23:59:59ZInclude vehicles from child organizations
Response
Returns200 OK with a JSON summary of the operation.
Number of vehicles successfully deleted
UUIDs of successfully deleted vehicles
Number of vehicles that failed to delete
UUIDs of vehicles that failed to delete
Human-readable summary of the operation
Example
Successful Response
Common Errors
401 Unauthorized
Cause: Missing or invalid API key409 Conflict — Filter Hash Mismatch
Cause: Thefilter_hash does not match the current filter results. The underlying data changed between the list call and the delete call.
filter_hash, then retry.
422 Unprocessable Entity — No Filters Provided
Cause: No filter query parameters were supplied. At least one filter is required to prevent accidental mass deletion.422 Validation Error
Cause: Invalid query parameter value (e.g. unknown status enum)Related Endpoints
List Vehicles
Retrieve vehicles and obtain the filter_hash
Bulk Delete Vehicles
Delete specific vehicles by ID
Bulk Delete Consumptions by Filters
Delete consumption records matching filters
Delete Vehicle
Delete a single vehicle

