Skip to main content
GET
List Recharge Filter Values
← Logistics API Get the distinct values a field takes across your organization’s logistics recharges, each with the number of records using it. Call it before rendering a filter so the dropdown offers only values that exist.
field is free text, not a closed list — and an unsupported value does not return 422. It returns an empty array:
That makes “there are no recharges” and “I misspelled the field” look identical. The three accepted values are fuel_name, file_id and vehicle_license_plate; check your spelling against them before concluding the organization has no data.
Only active recharges are counted. Recharges still processing, or in error, are excluded from these values. A filter built from this response therefore describes your calculated data, not everything you uploaded.

Request

Headers

string
required
UUID of the organization whose recharges you are filtering.Format: UUID
string
Your API key.

Query Parameters

string
required
The field to list values for. Three values are supported:
  • fuel_namevalue is the fuel id, label is the fuel name
  • file_idvalue is the file id, label is the file name
  • vehicle_license_platevalue and label are both the plate; blank and missing plates are excluded
Anything else returns an empty array rather than an error — see the warning above.

Response

string
The field that was queried, echoed back verbatim — including when it is not a supported one.
integer
How many distinct values were found.
array[object]
The distinct values, each with its record count.

Example

Successful Response

Returns 200 OK.
The second entry is the bucket of recharges with no fuel set — nine real records, not an error.

Common Errors

422 Unprocessable Entity

Cause: field is missing entirely. Note that this is the only thing that fails validation here — a present but unsupported field succeeds with an empty array.

Use Cases

Build a recharge filter that matches reality

Populate the fuel or file dropdown from this endpoint rather than from the full fuel catalogue. It also tells you how many records sit behind each option, which lets you show counts next to each choice.

Spot recharges with no fuel assigned

A null value in a fuel_name response is the count of recharges with no fuel. Those records cannot calculate emissions, and this is the cheapest way to notice they exist.

List Recharges

The records these values filter

Bulk Delete Recharges

Apply the filter you just built to a bulk delete

Create Recharge

Add the recharges you will be filtering

Logistics API

Everything the Logistics API covers