Skip to main content
GET
/
v1
/
meters
/
{id}
/
quantities
Python (SDK)
import polar_sdk
from polar_sdk import Polar
from polar_sdk.utils import parse_datetime


with Polar(
    access_token="<YOUR_BEARER_TOKEN_HERE>",
) as polar:

    res = polar.meters.quantities(id="<value>", start_timestamp=parse_datetime("2026-11-25T04:37:16.823Z"), end_timestamp=parse_datetime("2026-11-26T17:06:00.727Z"), interval=polar_sdk.TimeInterval.DAY)

    # Handle response
    print(res)
{
  "quantities": [
    {
      "timestamp": "2023-11-07T05:31:56Z",
      "quantity": 123
    }
  ],
  "total": 123
}

Authorizations

Authorization
string
header
required

You can generate an Organization Access Token from your organization's settings.

Path Parameters

id
string<uuid4>
required

The meter ID.

Query Parameters

start_timestamp
string<date-time>
required

Start timestamp.

end_timestamp
string<date-time>
required

End timestamp.

interval
enum<string>
required

Interval between two timestamps.

Available options:
year,
month,
week,
day,
hour
customer_id

Filter by customer ID. The customer ID.

external_customer_id

Filter by external customer ID.

customer_aggregation_function
enum<string> | null

If set, will first compute the quantities per customer before aggregating them using the given function. If not set, the quantities will be aggregated across all events.

Available options:
count,
sum,
max,
min,
avg,
unique
metadata
MetadataQuery · object

Filter by metadata key-value pairs. It uses the deepObject style, e.g. ?metadata[key]=value.

Response

Successful Response

quantities
MeterQuantity · object[]
required
total
number
required

The total quantity for the period.

Example:

100