Entitlements

Read Subscription Entitlements

GET
/subscriptions/{subscription_id}/entitlements.json

Returns every feature a subscription is entitled to, collapsed into one entry per feature key and periodicity window across all products and components on the subscription. A usage_limit feature granted with two different periodicities comes back as two entries sharing one feature_key, each identified by its own periodicity_key.

When more than one product or component grants the same feature key and periodicity, the values are combined:

  • access_right features are combined with a boolean OR. If any contributor grants access, the aggregate is true. source_products only lists the contributors that granted true.
  • usage_limit features are summed across every contributor sharing the same periodicity window. source_products lists every contributor. Grants with different periodicities are not summed together. Each periodicity is returned as a separate entry.
  • service_right features are not combined: one contributor's value wins. Do not rely on which one when several grant the same feature key.

enabled reflects both the aggregated value and the subscription's state. The field is false whenever the subscription is not in a live state (active, trialing, assessing, past_due, soft_failure), regardless of the aggregated value. Entitlements deliberately stay enabled through dunning.

Authorization

BasicAuth
AuthorizationBasic <token>

The username is a Maxio Chargify API key. The password is x.

In: header

Path Parameters

subscription_id*integer

The Chargify id of the subscription.

Response Body

application/json

application/json

curl -X GET "https://example.com/subscriptions/0/entitlements.json"
{  "subscription_id": 12345,  "customer_id": 678,  "status": "active",  "entitlements": [    {      "feature_key": "feature.sso",      "periodicity_key": "feature.sso",      "name": "SSO",      "type": "access_right",      "value": true,      "enabled": true,      "periodicity": null,      "source_products": [        "Gold Plan"      ]    },    {      "feature_key": "usage.api_calls",      "periodicity_key": "usage.api_calls:1:month",      "name": "API Calls",      "type": "usage_limit",      "value": 50000,      "enabled": true,      "periodicity": {        "interval": 1,        "unit": "month"      },      "source_products": [        "Gold Plan"      ]    }  ]}