Totals
Totals
Get aggregated purchase totals with year-over-year comparison
GET
Totals
Totals
Returns aggregated totals for purchases: total CO2e, total monetary amount (EUR), record count, and percentage change compared to the same period in the previous year. Supports the same filters as the list endpoint.Request
Headers
string
required
Your API key for authenticationExample:
sk_live_1234567890abcdefstring
required
Your organization UUIDExample:
a8315ef3-dd50-43f8-b7ce-d839e68d51faQuery Parameters
string
Filter purchases on or after this date (ISO format
YYYY-MM-DD)string
Filter purchases on or before this date (ISO format
YYYY-MM-DD)string
Search by description or supplier name
string[]
Filter by status. Values:
active, error, in_progress, in_review, inactive, pendingstring[]
Filter by calculation methodology. Values:
spend_based, supplier_specificstring[]
Filter by expense classification. Values:
capex, opexstring[]
Filter by file UUID. Use
00000000-0000-0000-0000-000000000000 for manually created records.string[]
Filter by supplier UUID
string[]
Filter by currency unit UUID
string
Filter records created on or after this date
string
Filter records created on or before this date
string
Filter by CO2e calculation statusAllowed values:
calculated, not_calculatedstring
Per-column filters using the filter grammarExample:
quantity:gt100$co2e:bt[10,100]string
How to combine
filter_by clauses across fieldsAllowed values: any (OR), all (AND, default)string
Comma-separated fields whose same-field clauses combine with OR instead of AND
Response
number
Sum of CO2e (tCO2e) for all matching purchases
number
Sum of monetary amounts (EUR) for all matching purchases
integer
Number of matching purchase records
number | null
Percentage change in CO2e vs the same period in the previous year.
null when no prior-year data exists.number | null
Percentage change in monetary amount vs the same period in the previous year.
null when no prior-year data exists.Example
Successful Response
Common Errors
401 Unauthorized
Cause: Missing or invalid API key403 Forbidden
Cause: The authenticated user is not a member of the organizationRelated Endpoints
List Purchases
Browse purchases with filters and pagination
Bulk Delete by Filters
Delete all purchases matching filters