Skip to main content
POST
/
api
/
v1
/
sub-entitlement
/
entitledToUsage
Check if an entitlement is entitled to a given usage
curl --request POST \
  --url https://dev-entitlements-api.iqraa.ai/api/v1/api/v1/sub-entitlement/entitledToUsage \
  --header 'Content-Type: application/json' \
  --header 'x-admin-api-key: <x-admin-api-key>' \
  --data '
{
  "subscriptionId": "123e4567-e89b-12d3-a456-426614174000",
  "entitlementCode": "storage_quota",
  "usage": 100
}
'
{
  "usage": 123,
  "quota": 123,
  "isUnlimited": true,
  "remainingQuota": 123,
  "percentageUsed": 123,
  "isEntitled": true
}

Headers

x-admin-api-key
string
required

The API key to access the admin API

Body

application/json
subscriptionId
string
required

The ID of the subscription

Example:

"123e4567-e89b-12d3-a456-426614174000"

entitlementCode
string
required

The code of the entitlement

Example:

"storage_quota"

usage
number
default:1

The usage amount to report (defaults to 1 if not provided)

Example:

100

Response

200 - application/json

Returns the current status of the entitlement

usage
number
quota
number
isUnlimited
boolean
remainingQuota
number
percentageUsed
number
isEntitled
boolean