Skip to main content
GET
/
v1
/
logistics
/
recharges
/
unique-values
Get Recharge Filter Options
const options = {
  method: 'GET',
  headers: {'x-api-key': '<x-api-key>', 'x-organization-id': '<x-organization-id>'}
};

fetch('https://api.dcycle.io/v1/logistics/recharges/unique-values', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
{
  "field": "<string>",
  "total_count": 123,
  "values": {
    "value": {},
    "label": {},
    "count": 123
  }
}

Documentation Index

Fetch the complete documentation index at: https://code.dcycle.io/llms.txt

Use this file to discover all available pages before exploring further.

Get Recharge Filter Options

Retrieve unique values for a specific recharge field within your organization, along with the count of records for each value. Useful for building filter dropdowns over existing recharge data.
This endpoint only returns values that appear in existing recharges for your organization. If you are setting up a new integration and need to discover all available fuel types, use GET /logistics/fuels instead.

Request

Headers

x-api-key
string
required
Your API key for authenticationExample: sk_live_1234567890abcdef
x-organization-id
string
required
Your organization UUIDExample: a8315ef3-dd50-43f8-b7ce-d839e68d51fa

Query Parameters

field
string
required
The recharge field to get unique values forAvailable values: fuel_name, file_idExample: field=fuel_name

Response

field
string
The field name that was queried
total_count
integer
Total number of unique values found
values
array[object]
List of unique values with their record counts

Example

curl -X GET "https://api.dcycle.io/v1/logistics/recharges/unique-values?field=fuel_name" \
  -H "x-api-key: ${DCYCLE_API_KEY}" \
  -H "x-organization-id: ${DCYCLE_ORG_ID}"

Successful Response

{
  "field": "fuel_name",
  "total_count": 2,
  "values": [
    {
      "value": "f51a1645-c201-43da-9dcd-6408be3cb517",
      "label": "diesel",
      "count": 142
    },
    {
      "value": "70caf2dd-bf76-4561-995f-6e6f6a526e44",
      "label": "compressed_natural_gas",
      "count": 38
    }
  ]
}

Field Reference

FieldvaluelabelUse case
fuel_nameFuel UUIDFuel name (e.g. diesel)Filter recharge list by fuel type
file_idFile UUIDOriginal filenameFilter recharge list by import file

List All Fuel Types

Full fuel catalogue — use this to discover fuels for new recharges

List Recharges

Retrieve fuel consumption records with filtering