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

# Get Feature Access

<CodeGroup>
  ```py Python theme={null}
  lotus.check_feature_access(
    customer_id="cust_0569173ee6654369",
    feature_id="feature_a47ac0bf",
  )
  ```

  ```ts Typescript theme={null}
  await lotus.checkFeatureAccess({
    customer_id: "cust_0569173ee6654369",
    feature_id: "feature_a47ac0bf",
  });
  ```
</CodeGroup>


## OpenAPI

````yaml GET /api/feature_access/
openapi: 3.0.3
info:
  title: Lotus API
  version: 0.9.3
  description: >-
    Lotus is an open-core pricing and billing engine. We enable API companies to
    automate and optimize their custom usage-based pricing for any metric.
servers: []
security: []
paths:
  /api/feature_access/:
    get:
      tags:
        - api
      operationId: api_feature_access_retrieve
      parameters:
        - in: query
          name: customer_id
          schema:
            type: string
            nullable: true
            minLength: 1
          description: The customer_id of the customer you want to check access.
          required: true
        - in: query
          name: feature_id
          schema:
            type: string
            format: uuid
          description: The feature_id of the feature you want to check access for.
          required: true
        - in: query
          name: subscription_filters
          schema:
            type: array
            items:
              $ref: '#/components/schemas/SubscriptionFilterRequest'
          description: >-
            The subscription filters that are applied to this plan's
            relationship with the customer. If your billing model does not have
            the ability multiple plans or subscriptions per customer, this is
            likely not relevant for you. 
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FeatureAccessResponse'
          description: ''
      security:
        - OrganizationApiKeyAuth: []
          TokenAuth: []
components:
  schemas:
    SubscriptionFilterRequest:
      type: object
      properties:
        value:
          type: string
          minLength: 1
        property_name:
          type: string
          minLength: 1
          description: 'The string name of the property to filter on. Example: ''product_id'''
      required:
        - property_name
        - value
    FeatureAccessResponse:
      type: object
      properties:
        customer:
          $ref: '#/components/schemas/LightweightCustomer'
        access:
          type: boolean
          description: >-
            Whether or not the customer has access to this feature. The default
            behavior for this is whether any of the customer's plans have access
            to this feature. If you have specified subscription filters, then
            this will be whether any of the customer's plans that match the
            subscription filters have access to this feature. You can customize
            the behavior of this flag by setting a policy in your Organization
            settings in the frontend.
        feature:
          $ref: '#/components/schemas/Feature'
        access_per_subscription:
          type: array
          items:
            $ref: '#/components/schemas/FeatureAccessPerSubscription'
      required:
        - access
        - access_per_subscription
        - customer
        - feature
    LightweightCustomer:
      type: object
      properties:
        customer_name:
          type: string
          readOnly: true
          nullable: true
          description: The display name of the customer
        email:
          type: string
          format: email
          readOnly: true
          nullable: true
          description: >-
            The primary email address of the customer, must be the same as the
            email address used to create the customer in the payment provider
        customer_id:
          type: string
          readOnly: true
          nullable: true
          description: >-
            The id provided when creating the customer, we suggest matching with
            your internal customer id in your backend
      required:
        - customer_id
        - customer_name
        - email
    Feature:
      type: object
      properties:
        feature_id:
          type: string
        feature_name:
          type: string
          readOnly: true
        feature_description:
          type: string
          nullable: true
          readOnly: true
      required:
        - feature_description
        - feature_id
        - feature_name
    FeatureAccessPerSubscription:
      type: object
      properties:
        subscription:
          $ref: '#/components/schemas/AccessMethodsSubscriptionRecord'
        access:
          type: boolean
      required:
        - access
        - subscription
    AccessMethodsSubscriptionRecord:
      type: object
      properties:
        start_date:
          type: string
          format: date-time
          readOnly: true
          description: >-
            The time the subscription starts. This will be a string in
            yyyy-mm-dd HH:mm:ss format in UTC time.
        end_date:
          type: string
          format: date-time
          readOnly: true
          description: >-
            The time the subscription starts. This will be a string in
            yyyy-mm-dd HH:mm:ss format in UTC time.
        subscription_filters:
          type: array
          items:
            $ref: '#/components/schemas/SubscriptionFilter'
        plan:
          $ref: '#/components/schemas/LightweightPlanVersion'
      required:
        - end_date
        - plan
        - start_date
        - subscription_filters
    SubscriptionFilter:
      type: object
      properties:
        value:
          type: string
        property_name:
          type: string
          description: 'The string name of the property to filter on. Example: ''product_id'''
      required:
        - property_name
        - value
    LightweightPlanVersion:
      type: object
      properties:
        plan_name:
          type: string
          readOnly: true
        plan_id:
          type: string
        version_id:
          type: string
          readOnly: true
        version:
          oneOf:
            - type: integer
            - enum:
                - custom_version
              type: string
          readOnly: true
      required:
        - plan_id
        - plan_name
        - version
        - version_id
  securitySchemes:
    OrganizationApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY

````