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

# Get Feature Access

> Return feature access for a customer.



## OpenAPI

````yaml GET /v1/feature-access
openapi: 3.1.0
info:
  title: PriceOS Public API
  version: 1.0.0
servers: []
security: []
paths:
  /v1/feature-access:
    get:
      summary: Get feature access
      description: Return feature access for a customer.
      parameters:
        - schema:
            type: string
            description: >-
              Internal customer ID. If the customer ID does not exist yet, it
              will be created.
          required: true
          description: >-
            Internal customer ID. If the customer ID does not exist yet, it will
            be created.
          name: customerId
          in: query
        - schema:
            type: string
            description: API key from your PriceOS dashboard.
          required: true
          description: API key from your PriceOS dashboard.
          name: x-api-key
          in: header
      responses:
        '200':
          description: Feature access lookup
          content:
            application/json:
              schema:
                type: object
                additionalProperties:
                  oneOf:
                    - type: object
                      properties:
                        type:
                          type: string
                          enum:
                            - boolean
                          description: Feature access type.
                        hasAccess:
                          type: boolean
                          description: Whether the customer has access.
                      required:
                        - type
                        - hasAccess
                      title: Boolean
                    - type: object
                      properties:
                        type:
                          type: string
                          enum:
                            - limit
                          description: Feature access type.
                        hasAccess:
                          type: boolean
                          description: Whether the customer has access.
                        isUnlimited:
                          type: boolean
                          description: Whether the feature is unlimited.
                        limit:
                          type:
                            - number
                            - 'null'
                          description: Limit for the feature, when applicable.
                        usage:
                          type: object
                          properties:
                            used:
                              type: number
                              description: Usage consumed for the feature.
                            remaining:
                              type:
                                - number
                                - 'null'
                              description: Remaining base limit (limit - used).
                            bonusRemaining:
                              type: number
                              description: Remaining bonus amount.
                            hasReachedLimit:
                              type: boolean
                              description: >-
                                Whether base limit is met or exceeded and no
                                bonus amount remains.
                            bonusUsed:
                              type: number
                              description: Bonus amount consumed.
                            nextReset:
                              type:
                                - integer
                                - 'null'
                              description: >-
                                Unix timestamp (ms) for the next reset, when
                                applicable.
                            lastReset:
                              type:
                                - integer
                                - 'null'
                              description: >-
                                Unix timestamp (ms) for the last reset, when
                                applicable.
                          required:
                            - used
                            - remaining
                            - bonusRemaining
                            - hasReachedLimit
                            - bonusUsed
                            - nextReset
                            - lastReset
                          description: Usage details for tracked features.
                      required:
                        - type
                        - hasAccess
                        - isUnlimited
                        - limit
                      title: Limit
                description: Feature access map.
              example:
                api_calls:
                  hasAccess: true
                  type: limit
                  limit: 1000
                  isUnlimited: false
                  usage:
                    used: 120
                    remaining: 880
                    bonusRemaining: 25
                    hasReachedLimit: false
                    bonusUsed: 5
                    nextReset: 1738368000000
                    lastReset: 1735689600000
                team_seats:
                  hasAccess: true
                  type: boolean
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error message.
                required:
                  - error
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error message.
                required:
                  - error
        '500':
          description: Server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error message.
                required:
                  - error
      x-codeSamples:
        - lang: typescript
          label: Node.js
          source: >-
            import { PriceOS } from "priceos";

            import type { MyFeatures } from "./priceos.types";


            const priceos = new
            PriceOS<MyFeatures>(process.env.PRICEOS_API_KEY!);


            const featureAccess = await
            priceos.features.getAccess("customer_123");

            const hasPrioritySupport =
            featureAccess.priority_support?.hasAccess;
        - lang: bash
          label: cURL
          source: >-
            curl -X GET
            "https://api.priceos.com/v1/feature-access?customerId=customer_123"
            \
              -H "x-api-key: PRICEOS_API_KEY"

````