Delete all consumption records for a specific vehicle that match a set of filter criteria. This endpoint uses a two-step workflow: first fetch the consumption 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 consumption records is permanent and cannot be undone. All associated emissions data will be removed from your organization’s totals.
The hash returned in the filter_hash field of the consumption list response. Confirms you are deleting exactly the records you saw.Example:"b4c2d3e5f6a7b8c9"
# Step 1: get list with filters to obtain filter_hashcurl -X GET "https://api.dcycle.io/v1/vehicles/550e8400-e29b-41d4-a716-446655440000/consumptions?status[]=error" \ -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/550e8400-e29b-41d4-a716-446655440000/consumptions/bulk-delete-by-filters?status[]=error" \ -H "x-api-key: ${DCYCLE_API_KEY}" \ -H "x-organization-id: ${DCYCLE_ORG_ID}" \ -H "Content-Type: application/json" \ -d '{"filter_hash": "b4c2d3e5f6a7b8c9"}'