> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stigg.io/llms.txt
> Use this file to discover all available pages before exploring further.

# entitlement

> Fetch a specific entitlement for a given feature and customer.



**query** `entitlement(query: FetchEntitlementQuery!): Entitlement!`

> Deprecated: Use entitlementV2 with featureId or currencyId for polymorphism support (feature and credit entitlements).

## Arguments

**`query`**: `FetchEntitlementQuery!` (required)

Query for fetching a single entitlement for a specific feature and customer.

## Returns

`Entitlement!`

**`accessDeniedReason`**: `AccessDeniedReason`

Optional message explaining why access to the feature is denied.

---

**`creditRate`**: `CreditRate`

The credit rate associated with this entitlement, if applicable.

---

**`currentUsage`**: `Float`

The amount of the feature the customer has used so far in the current period.

---

**`customerId`**: `String`

> Deprecated: No longer in use

---

**`displayNameOverride`**: `String`

A custom name to override the default display name for this entitlement.

---

**`entitlementUpdatedAt`**: `DateTime`

Timestamp of the last update to the entitlement grant or configuration.

---

**`enumValues`**: `[String!]`

List of enum values applicable to this entitlement, if it is an enum feature.

---

**`feature`**: `EntitlementFeature`

The feature this entitlement corresponds to.

---

**`hasSoftLimit`**: `Boolean`

Indicates whether the usage limit is soft — usage can exceed the limit, but will be tracked.

---

**`hasUnlimitedUsage`**: `Boolean!`

Indicates whether this entitlement grants unlimited usage with no enforced cap.

---

**`hiddenFromWidgets`**: `[WidgetType!]`

Indicates whether this entitlement should be hidden in customer-facing widgets.

---

**`isGranted`**: `Boolean!`

Indicates whether the entitlement is currently granted to the customer.

---

**`meterId`**: `String`

The ID of the meter tracking usage for this entitlement.

---

**`nextResetDate`**: `DateTime`

> Deprecated: renamed to usagePeriodEnd

---

**`requestedUsage`**: `Float`

The amount of usage requested by the customer.

---

**`requestedValues`**: `[String!]`

The values requested by the customer, if applicable.

---

**`resetPeriod`**: `EntitlementResetPeriod`

The interval at which usage resets automatically, such as monthly or yearly.

---

**`resetPeriodConfiguration`**: `ResetPeriodConfiguration`

Detailed configuration object specifying the usage reset schedule.

---

**`resourceId`**: `String`

> Deprecated: No longer in use

---

**`usageLimit`**: `Float`

The maximum allowed usage for this entitlement before restrictions apply.

---

**`usagePeriodAnchor`**: `DateTime`

The anchor for calculating the usage period for metered entitlements with a reset period configured

---

**`usagePeriodEnd`**: `DateTime`

The end date of the usage period for metered entitlements with a reset period configured

---

**`usagePeriodStart`**: `DateTime`

The start date of the usage period for metered entitlements with a reset period configured

---

**`usageUpdatedAt`**: `DateTime`

Timestamp of the last update to the usage value.

---

**`validUntil`**: `Float`

The next time the entitlement should be recalculated

## Examples

```graphql Query
query Entitlement($query: FetchEntitlementQuery!) {
  entitlement(query: $query) {
    accessDeniedReason
    creditRate {
      amount
      costFormula
      currencyId
      customCurrencyId
    }
    currentUsage
    customerId
    displayNameOverride
    entitlementUpdatedAt
  }
}
```

```json Variables
{
  "query": {
    "customerId": "string",
    "featureId": "string"
  }
}
```

```json Response
{
  "data": {
    "entitlement": {
      "accessDeniedReason": "BudgetExceeded",
      "creditRate": {
        "amount": 1.5,
        "costFormula": "string",
        "currencyId": "string",
        "customCurrencyId": "value"
      },
      "currentUsage": 1.5,
      "customerId": "string",
      "displayNameOverride": "string",
      "entitlementUpdatedAt": "value"
    }
  }
}
```


## Related topics

- [entitlements](https://docs.stigg.io/graphql-reference/queries/entitlements.md)
- [Entitlement](https://docs.stigg.io/graphql-reference/types/Entitlement.md)
- [Entitlements updated](https://docs.stigg.io/api-reference/entitlements/entitlements-updated.md)
- [Entitlement behavior](https://docs.stigg.io/documentation/modeling-your-pricing-in-stigg/add-ons/assigning-features-to-add-ons/entitlement-behavior.md)
- [What is an entitlement](https://docs.stigg.io/documentation/managing-customers-and-subscriptions/entitlements/overview.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.