Skip to main content
GET
/
v1
/
meters
/
{id}
/
quantities
TypeScript SDK
import { Solifyn } from 'solifyn';

const solifyn = new Solifyn({ apiKey: 'your_private_api_key_here' });

// Get aggregated usage quantities for a billing meter
const quantities = await solifyn.meters.getQuantities('mtr_019e56a1...', {
  start_date: '2026-05-01T00:00:00Z',
  end_date: '2026-05-31T23:59:59Z'
});
console.log('Aggregated Quantities:', quantities);
{
  "meterId": "mtr_8Z1aB2cD3eF4gH5iJ6kL7m",
  "name": "API Request Count",
  "totalUsage": 1540,
  "costs": [
    {
      "productId": "prod_9z8x7c6v5b4n",
      "totalUsage": 1540,
      "billableUsage": 1500,
      "cost": 19.5,
      "currency": "USD"
    }
  ]
}

Authorizations

Authorization
string
header
required

Authenticate requests using your standard bearer API key (e.g. YOUR_API_KEY).

Path Parameters

id
string
required

The unique meter ID.

Example:

"mtr_8Z1aB2cD3eF4gH5iJ6kL7m"

Query Parameters

start_date
string

Inclusive start date in ISO 8601 format.

end_date
string

Inclusive end date in ISO 8601 format.

Response

200 - application/json

Meter quantities retrieved successfully.

Represents aggregated usage quantities and calculated product costs for a meter within a selected date range.

meterId
string
required

The unique meter ID.

Example:

"mtr_8Z1aB2cD3eF4gH5iJ6kL7m"

name
string
required

Meter display name.

Example:

"API Request Count"

totalUsage
number
required

Total usage within the selected time range.

Example:

1540

costs
object[]
required

Cost breakdown for products attached to the meter.