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 a filter_hash), then call this endpoint with that hash to confirm you are deleting exactly what you saw.
Permanent Action: Deleting vehicles is permanent and cannot be undone. All associated consumption records and emissions data will be removed from your organization’s totals.
The hash returned in the filter_hash field of the vehicle list response. Confirms you are deleting exactly the records you saw.Example:"a3f1c2e4b5d6a7b8"
# Step 1: get list with filters to obtain filter_hashcurl -X GET "https://api.dcycle.io/v1/vehicles?status[]=archived&file_id[]=880e8400-e29b-41d4-a716-446655440000" \ -H "x-api-key: ${DCYCLE_API_KEY}" \ -H "x-organization-id: ${DCYCLE_ORG_ID}"# Step 2: bulk delete using the filter_hash from the list responsecurl -X POST "https://api.dcycle.io/v1/vehicles/bulk-delete-by-filters?status[]=archived&file_id[]=880e8400-e29b-41d4-a716-446655440000" \ -H "x-api-key: ${DCYCLE_API_KEY}" \ -H "x-organization-id: ${DCYCLE_ORG_ID}" \ -H "Content-Type: application/json" \ -d '{"filter_hash": "a3f1c2e4b5d6a7b8"}'