# Entitlements

> For the complete machine-readable documentation index, see [llms.txt](https://apidocs.chargebee.com/llms.txt).


The entitlement resource establishes a connection between a `[feature](/docs/api/features)` and an `[item](/docs/api/items)` or an `[item_price](/docs/api/item_prices)` in Chargebee Billing. By defining this relationship, it specifies the scope of access or rights the item or item price has in relation to that particular feature.

## Sample Entitlement

```json
{
  "entitlement": {
    "feature_id": "fea-66ee05d2-2800-449f-a418-eaa863a67f9f",
    "feature_name": "Quickbooks Integration_1234",
    "id": "ent-15292c03-0b77-426a-aa5b-a18bb0acafdc",
    "entity_id": "enterprise",
    "entity_type": "plan",
    "name": "Available",
    "object": "entitlement",
    "value": "true"
  }
}
```

## Entitlements attributes

## Input Parameters

- `id` (required, string, max chars=100)
  A unique identifier for the entitlement. This is auto-generated.

- `entity_id` (optional, string, max chars=100)
  The unique identifier of the entity being granted entitlement to a specific `feature`.

- `entity_type` (optional, enumerated string)
  The type of the entity that holds this entitlement.
  Possible enum values:
    - `plan`
      Indicates that the entity is an `item` with `[type](/docs/api/items/item-object#type)` set to `plan`.
    - `addon`
      Indicates that the entity is an `item` with `[type](/docs/api/items/item-object#type)` set to `addon`.
    - `charge`
      Indicates that the entity is an `item` with `[type](/docs/api/items/item-object#type)` set to `charge`.
    - `plan_price`
      Indicates that the entity is an `item_price` associated with an `item` of `[type](/docs/api/items/item-object#type)` `plan`.
    - `addon_price`
      Indicates that the entity is an `item_price` associated with an `item` with `[type](/docs/api/items/item-object#type)` set to `addon`.

- `feature_id` (optional, string, max chars=50)
  The unique identifier of the `feature` to which the entity gains entitlement.

- `feature_name` (optional, string, max chars=50)
  The `name` of the feature associated with this entitlement.

- `value` (optional, string, max chars=50)
  The level of entitlement that the entity has towards the feature. The possible values depend on the value of `feature.type` :
  
  -   When `feature.type` is `quantity` and:
      
  -   If `feature.levels[is_unlimited]` is not `true` for any one of `feature.levels[]`, then the value can be any one of `feature.levels[value][]`.
      
  -   If `feature.levels[is_unlimited]` is `true` for one of the `feature.levels[]`, then the value can be:
      
      -   any one of `feature.levels[value][]`
      -   or it can be `unlimited` (case-insensitive), indicating unlimited entitlement.
  -   When `type` is `range` and:
      
  -   If `feature.levels[is_unlimited]` is not `true` for any one of `feature.levels[]`, then the value can be any whole number between `levels[value][0]` and `levels[value][1]` (inclusive).
      
  -   If `feature.levels[is_unlimited]` is `true` for one of the `feature.levels[]`, then the value can be:
      
      -   any whole number equal to or greater than `levels[value][0]`
      -   or it can be `unlimited` (case-insensitive), indicating unlimited entitlement.
  -   When `type` is `custom`, then the value can be any one of `feature.levels[value][]`.
      
  -   When `type` is `switch`, then the value is set as `available` or `true`.

- `name` (optional, string, max chars=50)
  The display name for the entitlement level. The value is automatically generated based on `feature.type`:
  
  -   When `feature.type` is `quantity` or `range`, the `name` is the space-separated concatenation of `value` and the plural form of `feature.unit`. For instance, if `value` is `20` and `feature.unit` is `user`, the `name` will be `20 users`.
  -   When `feature.type` is `custom`, the `name` matches the `value`.
  -   When `feature.type` is `switch`, the `name` is set to `Available` when `value` is `true`; it's set to `Not Available` when `value` is `false`.

