Customer Meters
List Customer Meters
List customer meters.
Scopes: customer_meters:read
GET
/
v1
/
customer-meters
/
Python
from polar.v2027_01 import Polar
polar = Polar("polar_oat_xxx")
for item in polar.customer_meters.iter_list(
page=1,
limit=10,
sorting=['-modified_at'],
):
print(item)import { createPolar } from "@polar-sh/sdk/2027-01";
const polar = createPolar({
accessToken: "polar_oat_xxx",
});
for await (const item of polar.customerMeters.iterList(
{
"page": 1,
"limit": 10,
"sorting": [
"-modified_at"
]
},
)) {
console.log(item);
}
curl --request GET \
--url https://api.polar.sh/v1/customer-meters/ \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.polar.sh/v1/customer-meters/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.polar.sh/v1/customer-meters/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.polar.sh/v1/customer-meters/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.polar.sh/v1/customer-meters/")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.polar.sh/v1/customer-meters/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"items": [
{
"id": "<string>",
"created_at": "2026-01-01T00:00:00.000000Z",
"modified_at": "2026-01-01T00:00:00.000000Z",
"customer_id": "992fae2a-2a17-4b7a-8d9e-e287cf90131b",
"meter_id": "d498a884-e2cd-4d3e-8002-f536468a8b22",
"consumed_units": 25,
"credited_units": 100,
"balance": 75,
"customer": {
"id": "992fae2a-2a17-4b7a-8d9e-e287cf90131b",
"created_at": "2026-01-01T00:00:00.000000Z",
"modified_at": "2026-01-01T00:00:00.000000Z",
"metadata": {},
"email": "customer@example.com",
"email_verified": true,
"type": "individual",
"name": "John Doe",
"billing_name": "John Doe",
"billing_address": {
"country": "US",
"line1": "<string>",
"line2": "<string>",
"postal_code": "<string>",
"city": "<string>",
"state": "<string>"
},
"tax_id": {
"[0]": "<string>"
},
"organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737",
"deleted_at": "2026-01-01T00:00:00.000000Z",
"first_user_event_at": "2026-01-01T00:00:00.000000Z",
"avatar_url": "https://www.gravatar.com/avatar/xxx?d=404",
"external_id": "usr_1337",
"locale": "<string>",
"default_payment_method_id": "<string>"
},
"meter": {
"external_id": "ext_1337",
"metadata": {},
"created_at": "2026-01-01T00:00:00.000000Z",
"modified_at": "2026-01-01T00:00:00.000000Z",
"id": "<string>",
"name": "<string>",
"unit": "scalar",
"filter": {
"conjunction": "and",
"clauses": [
{
"property": "<string>",
"operator": "eq",
"value": "<string>"
}
]
},
"aggregation": {
"func": "count"
},
"organization_id": "<string>",
"custom_label": "<string>",
"custom_multiplier": 123,
"archived_at": "2026-01-01T00:00:00.000000Z"
}
}
],
"pagination": {
"total_count": 123,
"max_page": 123
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
patoat
Query Parameters
Filter by organization ID. The organization ID.
Example:
"1dbfc517-0bbf-4301-9ba8-555ca42b9737"
Filter by customer ID. The customer ID.
Filter by external customer ID.
Filter by meter ID. The meter ID.
Filter by meter external ID.
Page number, defaults to 1.
Size of a page, defaults to 10. Maximum is 100.
Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign - before the criteria name to sort by descending order.
Available options:
created_at, -created_at, modified_at, -modified_at, customer_id, -customer_id, customer_name, -customer_name, meter_id, -meter_id, meter_name, -meter_name, consumed_units, -consumed_units, credited_units, -credited_units, balance, -balance Was this page helpful?
⌘I
Python
from polar.v2027_01 import Polar
polar = Polar("polar_oat_xxx")
for item in polar.customer_meters.iter_list(
page=1,
limit=10,
sorting=['-modified_at'],
):
print(item)import { createPolar } from "@polar-sh/sdk/2027-01";
const polar = createPolar({
accessToken: "polar_oat_xxx",
});
for await (const item of polar.customerMeters.iterList(
{
"page": 1,
"limit": 10,
"sorting": [
"-modified_at"
]
},
)) {
console.log(item);
}
curl --request GET \
--url https://api.polar.sh/v1/customer-meters/ \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.polar.sh/v1/customer-meters/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.polar.sh/v1/customer-meters/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.polar.sh/v1/customer-meters/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.polar.sh/v1/customer-meters/")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.polar.sh/v1/customer-meters/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"items": [
{
"id": "<string>",
"created_at": "2026-01-01T00:00:00.000000Z",
"modified_at": "2026-01-01T00:00:00.000000Z",
"customer_id": "992fae2a-2a17-4b7a-8d9e-e287cf90131b",
"meter_id": "d498a884-e2cd-4d3e-8002-f536468a8b22",
"consumed_units": 25,
"credited_units": 100,
"balance": 75,
"customer": {
"id": "992fae2a-2a17-4b7a-8d9e-e287cf90131b",
"created_at": "2026-01-01T00:00:00.000000Z",
"modified_at": "2026-01-01T00:00:00.000000Z",
"metadata": {},
"email": "customer@example.com",
"email_verified": true,
"type": "individual",
"name": "John Doe",
"billing_name": "John Doe",
"billing_address": {
"country": "US",
"line1": "<string>",
"line2": "<string>",
"postal_code": "<string>",
"city": "<string>",
"state": "<string>"
},
"tax_id": {
"[0]": "<string>"
},
"organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737",
"deleted_at": "2026-01-01T00:00:00.000000Z",
"first_user_event_at": "2026-01-01T00:00:00.000000Z",
"avatar_url": "https://www.gravatar.com/avatar/xxx?d=404",
"external_id": "usr_1337",
"locale": "<string>",
"default_payment_method_id": "<string>"
},
"meter": {
"external_id": "ext_1337",
"metadata": {},
"created_at": "2026-01-01T00:00:00.000000Z",
"modified_at": "2026-01-01T00:00:00.000000Z",
"id": "<string>",
"name": "<string>",
"unit": "scalar",
"filter": {
"conjunction": "and",
"clauses": [
{
"property": "<string>",
"operator": "eq",
"value": "<string>"
}
]
},
"aggregation": {
"func": "count"
},
"organization_id": "<string>",
"custom_label": "<string>",
"custom_multiplier": 123,
"archived_at": "2026-01-01T00:00:00.000000Z"
}
}
],
"pagination": {
"total_count": 123,
"max_page": 123
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}
