cURL
curl --request GET \ --url https://api.unprice.dev/v1/customer/{customerId}/getUsage \ --header 'Authorization: Bearer <token>'
{ "planName": "<string>", "billingPeriod": "<string>", "billingPeriodLabel": "<string>", "currency": "<string>", "groups": [ { "id": "<string>", "name": "<string>", "featureCount": 123, "features": [ { "id": "<string>", "name": "<string>", "type": "flat", "typeLabel": "<string>", "currency": "<string>", "price": "<string>", "enabled": true, "billing": { "billingFrequencyLabel": "<string>", "resetFrequencyLabel": "<string>" }, "description": "<string>" } ] } ], "priceSummary": { "totalPrice": "<string>", "flatTotal": "<string>", "tieredTotal": "<string>", "packageTotal": "<string>", "usageTotal": "<string>" }, "planDescription": "<string>", "renewalDate": "<string>", "daysRemaining": 123 }
Get usage for a customer
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Bearer <token>
<token>
The customer ID
"cus_1H7KQFLr7RepUyQBKdnvY"
The result of the get usage
The current usage data for the customer
Show child attributes