Events
Get usage by meter
Customers
Wallets
Invoices
Entitlements
Environments
Events
Features
Payments
Integrations
Subscriptions
Tenants
Users
Events
Get usage by meter
Retrieve aggregated usage statistics using meter configuration
POST
/
events
/
usage
/
meter
curl --request POST \
--url https://api.cloud.flexprice.io/v1/events/usage/meter \
--header 'Content-Type: */*' \
--header 'x-api-key: <api-key>' \
--data '{
"customer_id": "customer456",
"end_time": "2024-12-09T00:00:00Z",
"external_customer_id": "user_5",
"filters": {},
"meter_id": "123",
"start_time": "2024-11-09T00:00:00Z",
"window_size": "MINUTE"
}'
{
"event_name": "<string>",
"results": [
{
"value": 123,
"window_size": "<string>"
}
],
"type": "COUNT",
"value": 123
}
Authorizations
Enter your API key in the format x-api-key <api-key>*
Body
*/*
Request body
The body is of type object
.
Response
200
application/json
OK
The response is of type object
.
curl --request POST \
--url https://api.cloud.flexprice.io/v1/events/usage/meter \
--header 'Content-Type: */*' \
--header 'x-api-key: <api-key>' \
--data '{
"customer_id": "customer456",
"end_time": "2024-12-09T00:00:00Z",
"external_customer_id": "user_5",
"filters": {},
"meter_id": "123",
"start_time": "2024-11-09T00:00:00Z",
"window_size": "MINUTE"
}'
{
"event_name": "<string>",
"results": [
{
"value": 123,
"window_size": "<string>"
}
],
"type": "COUNT",
"value": 123
}