Skip to main content
POST
← Wastes API Delete wastes by id. The request checks every id and answers 202 Accepted with a job; the deletion runs in the background, chunk by chunk, so thousands of ids never hold your request open. Follow it with GET /v2/ingest-jobs/{id} or the ingest_job.finished webhook.
Permanent. Deleted wastes and their emissions cannot be recovered. Use dry_run=true first if you are not sure.
Beta. Part of the bulk ingest API, currently in beta. The contract may still change before general availability.

How it works

  1. The request checks every id. One that does not exist, is outside your organization’s perimeter (your organization and its accepted subsidiaries) or is repeated rejects the whole request with 422 and nothing is deleted.
  2. The job deletes in the background, 500 ids per chunk, together with each waste’s emissions and calculation data. A waste that someone else deleted in the meantime ends failed with DELETE_FAILED; the others go on.
  3. When every chunk is done the job is completed (or completed_with_errors), and ingest_job.finished is sent to your webhook endpoints with "operation": "delete".

Request

Headers

string
required
Your API key for authenticationExample: sk_live_1234567890abcdef
string
required
Your organization UUIDExample: a8315ef3-dd50-43f8-b7ce-d839e68d51fa
string
required
1 to 255 characters, unique per batch. A retry with the same key and body returns the original job instead of deleting again; the same key with another body is 422 IDEMPOTENCY_KEY_REUSED.

Query Parameters

boolean
default:"false"
Check only: the same 422 for bad ids, nothing deleted, no job; 200 with {"dry_run": true, "submitted": n, "valid": n} when every id would be deleted.

Body Parameters

array[uuid]
required
Waste ids to delete, 1 to 5,000, each once.

Response

202 Accepted, the job (operation: delete) and a Location header to it. Per-id outcomes are in GET /v2/ingest-jobs/{id}/items: one item per id, in the order sent, with stage: delete and entity_id = the waste id.

Errors

Problem details. Per-id codes in errors[].error_code: 401 for a missing or invalid API key, 403 LOGGED_USER_NOT_MEMBER when the key’s user is not a member of the organization, 422 REQUEST_VALIDATION_FAILED for a malformed body (empty ids, more than 5,000, not UUIDs).

Create Wastes (v2)

Create up to 5,000 wastes in one request

Get Ingest Job

Follow the deletion