Meters

Get consumed units for a customer

Changed on

How many units a customer has consumed through this meter in a billing period, alongside the period's boundaries. Without at, this is an O(1) read of the current period's projection — the number billing uses. With at, the units are replayed from the raw events as of that instant, within the billing period containing it, which is the right call for reconstructing what a customer had consumed at a past moment (an invoice date, a support question).

get/v1/meters/{id}/consumed

Request

Path parameters

idstring required

Query parameters

customer_idstring required
Example:cust_abc123

The customer whose consumption is read

atstring
Example:2026-08-15T00:00:00.000Z

ISO 8601 instant. When present, the consumption is replayed from the raw events as of that point in time, within the billing period that contains it. When absent, the current billing period’s projected total is returned.

Response

Consumed units for the period

meter_idstring required

Meter ID

customer_idstring required

Customer ID

unitsstring required

Consumed units for the period, as a string for BigInt safety

period_startstring required

Start of the billing period (inclusive, ISO 8601)

period_endstring required

End of the billing period (exclusive, ISO 8601)

updated_atstring nullable required

When the projection was last advanced. Null when no usage has been folded into this period yet, and always null for an at= reply (which is replayed from raw events rather than read from the projection).

as_ofstring

The point in time the units were replayed as of. Present only when at= was supplied.

Example response

{
  "meter_id": "mtr_abc123",
  "customer_id": "cust_abc123",
  "units": "1280"
}

Changes