Skip to main content
GET
Consumption Totals (Organization)
← Vehicles API Returns aggregated totals across every vehicle in your organization: total quantity (broken down by unit, since fuels are reported in litres, kg, kWh…), total spend, total CO2e split by scope (scope 1 direct combustion, scope 3 well-to-tank), and record count.
Same filters as the list. This endpoint accepts the same query parameters as List All Vehicle Consumptions. Call it with the SAME filters you used for the list so the totals match exactly what the table shows.

Request

Headers

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

Query Parameters

array[string]
Narrow the totals to specific vehicle UUIDs
array[string]
Filter by consumption statusAvailable values: active, success, loading, error
array[string]
Filter by fuel unit UUIDs
array[string]
Filter by the fuel UUIDs stamped on the consumption
array[string]
Filter by source file UUIDs
string
Filter by custom identifier (substring match)
string
Filter consumptions with a start date on or after this date (YYYY-MM-DD)
string
Filter consumptions with an end date on or before this date (YYYY-MM-DD)
string
Filter consumptions created on or after this datetime (ISO 8601)
string
Filter consumptions created on or before this datetime (ISO 8601)
string
Filter by CO2e calculation statusAvailable values: calculated, not_calculated
string
Per-column filters in the filter_by grammar, e.g. license_plate:ilABC$quantity:gt100. Same grammar and same effect as on the list endpoint, ANDed on top of the named filters above.
string
How to combine filter_by clauses across fieldsAvailable values: any (OR), all (AND, the default)
string
Comma-separated fields whose same-field clauses combine with OR instead of AND

Response

number
Sum of quantities across all matching consumptions, regardless of unit. Consumptions can be reported in different units across fuels (litres, kg, kWh…), so this raw sum has no single unit — use quantity_by_unit to show a meaningful headline number.
number | null
Sum of monetary amounts regardless of currency. null when none of the matching consumptions have spend data, not 0.
Currency is set per consumption (currency_unit_id), not per organization, so this raw sum can mix euros, dollars and pounds into a figure in no currency at all. Never display it with a currency symbol — use spend_by_currency.
array[object]
Spend broken down by each consumption’s own currency, ordered by the most-used currency first (by record count, then amount). Same convention as quantity_by_unit. Empty when no matching consumption has spend data.
number
Total CO2e (kg CO2e), scope 1 + scope 3 combined
number
CO2e from direct combustion (Scope 1)
number
CO2e from well-to-tank upstream emissions (Scope 3)
integer
Number of matching consumption records
array[object]
Quantities broken down by unit, ordered by the most-used unit first (by record count, then quantity). Use quantity_by_unit[0] as the headline total and quantity_by_unit.length - 1 as a “+N other units” indicator.

Example

Successful Response

Common Errors

401 Unauthorized

Cause: Missing or invalid API key

422 Unprocessable Entity

Cause: Invalid query parameters

List All Consumptions (Organization)

The records these totals aggregate

Unique Values (Organization)

Get filter dropdown values, e.g. all source files, across the organization

Vehicles API

Everything the Vehicles API covers