Delete all waste records that match a set of filter criteria. This endpoint uses a two-step workflow: first fetch the waste 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 waste 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 waste 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/wastes?facility_id=660e8400-e29b-41d4-a716-446655440000&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/waste/bulk-delete-by-filters?facility_id=660e8400-e29b-41d4-a716-446655440000&status[]=error" \ -H "x-api-key: ${DCYCLE_API_KEY}" \ -H "x-organization-id: ${DCYCLE_ORG_ID}" \ -H "Content-Type: application/json" \ -d '{"filter_hash": "a3f1c2e4b5d6a7b8"}'