Customers
Get customer usage summary
Customers
Wallets
Invoices
Entitlements
Environments
Events
Features
Payments
Integrations
Subscriptions
Tenants
Users
Customers
Get customer usage summary
Get customer usage summary
GET
/
customers
/
{id}
/
usage
curl --request GET \
--url https://api.cloud.flexprice.io/v1/customers/{id}/usage \
--header 'x-api-key: <api-key>'
{
"customer_id": "<string>",
"features": [
{
"current_usage": 123,
"feature": {
"created_at": "<string>",
"created_by": "<string>",
"description": "<string>",
"environment_id": "<string>",
"id": "<string>",
"lookup_key": "<string>",
"metadata": {},
"meter": {
"aggregation": {
"field": "<string>",
"type": "COUNT"
},
"created_at": "2024-03-20T15:04:05Z",
"event_name": "api_request",
"filters": [
{
"key": "<string>",
"values": [
"<string>"
]
}
],
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "API Usage Meter",
"reset_usage": "BILLING_PERIOD",
"status": "published",
"tenant_id": "tenant123",
"updated_at": "2024-03-20T15:04:05Z"
},
"meter_id": "<string>",
"name": "<string>",
"status": "published",
"tenant_id": "<string>",
"type": "metered",
"unit_plural": "<string>",
"unit_singular": "<string>",
"updated_at": "<string>",
"updated_by": "<string>"
},
"is_enabled": true,
"is_soft_limit": true,
"sources": [
{
"entitlement_id": "<string>",
"is_enabled": true,
"plan_id": "<string>",
"plan_name": "<string>",
"quantity": 123,
"static_value": "<string>",
"subscription_id": "<string>",
"usage_limit": 123
}
],
"total_limit": 123,
"usage_percent": 123
}
],
"pagination": {
"limit": 123,
"offset": 123,
"total": 123
},
"period": {
"end_time": "<string>",
"period": "<string>",
"start_time": "<string>"
}
}
Authorizations
Enter your API key in the format x-api-key <api-key>*
Path Parameters
Customer ID
Response
200
application/json
OK
The response is of type object
.
curl --request GET \
--url https://api.cloud.flexprice.io/v1/customers/{id}/usage \
--header 'x-api-key: <api-key>'
{
"customer_id": "<string>",
"features": [
{
"current_usage": 123,
"feature": {
"created_at": "<string>",
"created_by": "<string>",
"description": "<string>",
"environment_id": "<string>",
"id": "<string>",
"lookup_key": "<string>",
"metadata": {},
"meter": {
"aggregation": {
"field": "<string>",
"type": "COUNT"
},
"created_at": "2024-03-20T15:04:05Z",
"event_name": "api_request",
"filters": [
{
"key": "<string>",
"values": [
"<string>"
]
}
],
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "API Usage Meter",
"reset_usage": "BILLING_PERIOD",
"status": "published",
"tenant_id": "tenant123",
"updated_at": "2024-03-20T15:04:05Z"
},
"meter_id": "<string>",
"name": "<string>",
"status": "published",
"tenant_id": "<string>",
"type": "metered",
"unit_plural": "<string>",
"unit_singular": "<string>",
"updated_at": "<string>",
"updated_by": "<string>"
},
"is_enabled": true,
"is_soft_limit": true,
"sources": [
{
"entitlement_id": "<string>",
"is_enabled": true,
"plan_id": "<string>",
"plan_name": "<string>",
"quantity": 123,
"static_value": "<string>",
"subscription_id": "<string>",
"usage_limit": 123
}
],
"total_limit": 123,
"usage_percent": 123
}
],
"pagination": {
"limit": 123,
"offset": 123,
"total": 123
},
"period": {
"end_time": "<string>",
"period": "<string>",
"start_time": "<string>"
}
}