Overview
Customer meters show usage quantities for specific customers and meters. This is useful for displaying usage dashboards and understanding billing.
The Customer Meter Object
Current billing period start
Current billing period end
When usage was last calculated
List Customer Meters
curl -X GET "https://api.polar.sh/v1/customer-meters" \
-H "Authorization: Bearer polar_pat_..."
Query Parameters
Filter by external customer ID
Get Customer Meter
curl -X GET "https://api.polar.sh/v1/customer-meters/{id}" \
-H "Authorization: Bearer polar_pat_..."
Path Parameters
Examples
Get Customer’s Usage
curl -X GET "https://api.polar.sh/v1/customer-meters?customer_id=cust_123" \
-H "Authorization: Bearer polar_pat_..."
Get Specific Meter Usage
curl -X GET "https://api.polar.sh/v1/customer-meters?customer_id=cust_123&meter_id=meter_api_calls" \
-H "Authorization: Bearer polar_pat_..."
Response:
{
"items": [
{
"id": "cm_123",
"customer_id": "cust_123",
"meter_id": "meter_api_calls",
"quantity": 15420,
"period_start": "2024-01-01T00:00:00Z",
"period_end": "2024-02-01T00:00:00Z",
"last_synced_at": "2024-01-15T12:00:00Z",
"created_at": "2024-01-01T00:00:00Z"
}
],
"pagination": {
"total_count": 1,
"page": 1,
"page_size": 20
}
}