Skip to main content
GET
List Waste Filter Values
← Wastes API Get the distinct values a field takes across one facility’s waste records, each with the number of records using it. Call it before rendering a filter so the dropdown only offers values that actually exist — a list of every LER code in the catalogue would let a user pick one that returns nothing.
The path is /v1/waste, singular. The Wastes API is split across two prefixes: the records themselves live under /v1/wastes (plural), while this endpoint and the bulk operations live under /v1/waste. Calling /v1/wastes/unique-values does not 404 — it returns 405 Method Not Allowed, because the plural path matches PATCH /v1/wastes/{waste_id} and only its method is wrong. A 405 on a GET is the signal that you used the plural.
facility_id is required, but one field ignores it. Four of the five fields scope their values to the facility you name. created_at does not: it filters only by organization, so it returns the creation dates of every waste record in the organization, whichever facility they belong to.The parameter is still mandatory for created_at — it is simply not applied. Do not rely on its values to describe the facility you asked about.

Request

Headers

string
required
UUID of the organization the facility belongs to.Format: UUID
string
Your API key.

Query Parameters

string
required
The field to list values for. Five values are accepted:
  • file_id — the source files the records were imported from
  • created_at — the dates records were created on
  • identification_name — the waste identification names in use
  • ler_code — the European Waste Catalogue codes in use
  • rd_code — the recovery/disposal codes in use
Any other value is rejected with 422, so this is a closed list rather than free text.
string
required
UUID of the facility whose records you are filtering.Format: UUID

Response

string
The field that was queried, echoed back.
integer
How many distinct values were found.
array[object]
The distinct values, each with its record count.
There is no null bucket, whatever the field. Records with no source file come back as the zero UUID, 00000000-0000-0000-0000-000000000000, with their own count — treat it as “no file”, not as a real id. The other three optional fields exclude their empty rows entirely, so their counts do not add up to the facility’s total record count.

Example

Successful Response

Returns 200 OK.

Common Errors

422 Unprocessable Entity

Cause: field or facility_id is missing. Both are required.
Cause: field is not one of the five accepted values.

Use Cases

Build a filter that never comes back empty

Populate your LER or RD dropdown from this endpoint rather than from the full code catalogue. The catalogue has hundreds of codes; a given facility reports a handful, and offering the rest only produces empty result sets.

Check what an import actually created

field=file_id groups a facility’s waste records by the file they came from, with counts — the quickest confirmation that an upload landed where you expected, and the input to a cleanup if it did not.

List Wastes

The records these values filter

List Waste Emission Factors

The LER and RD code catalogue, for creating records

Bulk Delete by Filters

Apply the filter you just built to a bulk delete

Wastes API

Everything the Wastes API covers