Skip to main content
GET
/
v1
/
customer
/
{customerId}
/
getUsage
get usage
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
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

customerId
string
required

The customer ID

Example:

"cus_1H7KQFLr7RepUyQBKdnvY"

Response

The result of the get usage

The current usage data for the customer

planName
string
required
billingPeriod
string
required
billingPeriodLabel
string
required
currency
string
required
groups
object[]
required
priceSummary
object
required
planDescription
string
renewalDate
string
daysRemaining
number