Skip to main content
GET
List Units
Retrieve the catalog of measurement units. Every endpoint that accepts a unit_id expects an id from this catalog, so this is where you resolve it — without hardcoding ids or asking support for a list.
Reference data. The catalog is global: the same ids apply to every organization, and the response is not filtered by the organization you authenticate with. Fetch it once, cache it, and look ids up locally.

Request

Headers

string
required
Your API key for authenticationFormat: Your API key string
string
required
UUID of the organization the API key belongs to. Required even though the catalog itself is global — the key is validated against this organization.Format: UUID

Query Parameters

string
Restrict the response to the units accepted in one context of use. Omit it to get the whole catalog.Accepted values: vehicle_consumptions, products, use_of_product_combustion, use_of_product_electricity, use_of_product_water, use_of_product_fugitive, stationary_combustion, recharge, custom_emission_factors_purchases, water, non_currency_purchases, electricity, process, travels, transport_distribution, wastes, hotel_staysEach value maps to a curated list of units, so this filter answers “which units may I send for a vehicle consumption?” rather than “which units are kilograms?”.
type means two different things, and mixing them up is the most common mistake with this endpoint.As a query parameter it is a context of use — the seventeen values listed above. In the response it is the physical family of the unit: fiat_currency, mass, energy, volume, time and around two dozen others. The two vocabularies do not overlap, so a value you read from a response is rejected as a filter.In particular there is no fiat_currency filter on /v2. To resolve a currency, either request the catalog without type and match on name, or use the legacy GET /api/v1/units?type=fiat_currency, which filters server-side but additionally requires the x-user-id header.

Response

array[object]
Array of unit objects, ordered by name. The whole catalog is 359 entries, of which 112 are currencies — interleaved alphabetically with everything else, not grouped, so filter by type on your side rather than expecting a block.

Example

Successful Response

Returns 200 OK with the unit array.

Common Errors

401 Unauthorized

Cause: The x-api-key header is missing, or the key does not belong to the organization in x-organization-id.
Cause: No credentials at all — neither an API key nor a JWT.

422 Unprocessable Entity

Cause: x-organization-id is missing. This is the most common error on this endpoint: the catalog is global, but the header is still required.
Cause: type is not one of the seventeen accepted values. Note that the physical families you see in the response (fiat_currency, mass, …) are not accepted here.

Use Cases

Resolve the currency for a purchase or an invoice

Purchases and invoices take unit_id as the currency of the amount, not as a physical unit. Fetch the catalog once, find the currency by its ISO code in parentheses, and send that id:
expense_type, product_name and purchase_date are required, and the schema rejects unknown fields — so a date key instead of purchase_date fails validation rather than being ignored.

Validate before you send

When you accept units from your own users, pull the list for that context (type=wastes, type=travels…) and offer only those. It turns a 422 at write time into a closed dropdown.

Create Purchase

Takes unit_id as the currency of the amount

Create Invoice

Takes unit_id for the invoice amount

List Waste Emission Factors

LER and RD code catalog, the other lookup you need before writing waste records

List Vehicle Fuels

Fuel catalog, with the units accepted for each fuel