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

# List all entitlements

> Retrieve all entitlements assigned to a specific plan



## OpenAPI

````yaml /api-reference/ubb_openapi_inline.json get /plans/{plan_code}/entitlements
openapi: 3.0.1
info:
  title: Usage Based Billing API
  version: 1.0.0
  description: An Orchestrator for Usage Based Billing and Payments
servers:
  - url: https://api-m.sandbox.paypal.com/v1/commerce/billing
security:
  - BearerAuth:
      - read
      - write
tags:
  - name: Alerts
    description: API endpoints for managing subscription alerts
  - name: Events
    description: API endpoints for managing events
  - name: Metrics
    description: API endpoints for metrics and usage data
  - name: Merchant Activation
    description: API endpoint for merchant activation
  - name: Credit Notes
    description: API endpoints for credit notes management
  - name: Customers
    description: API endpoints for customer management
  - name: Invoices
    description: API endpoints for invoice management
  - name: Plans
    description: API endpoints for subscription plans
  - name: Subscriptions
    description: API endpoints for subscriptions
  - name: Wallets
    description: API endpoints for wallet management
  - name: Taxes
    description: API endpoints for tax management
  - name: Billing Entities
    description: API endpoints for billing entities
  - name: Features
    description: API endpoints for managing features and privileges
  - name: Entitlements
    description: API endpoints for managing plan and subscription entitlements
paths:
  /plans/{plan_code}/entitlements:
    get:
      tags:
        - Entitlements
      summary: List all entitlements
      description: Retrieve all entitlements assigned to a specific plan
      operationId: GetPlanEntitlements
      parameters:
        - name: plan_code
          in: path
          required: true
          description: The unique code of the plan
          schema:
            type: string
      responses:
        '200':
          description: A list of plan entitlements
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PlanEntitlementListResponse'
              example:
                entitlements:
                  - feature_code: seats
                    name: Number of seats
                    description: Number of users of the account
                    feature_privileges:
                      - code: max
                        name: Maximum
                        value_type: INTEGER
                        value: 10
                      - code: max_admins
                        name: Max Admins
                        value_type: INTEGER
                        value: 5
                      - code: root
                        name: Allow root user
                        value_type: BOOLEAN
                        value: true
                  - feature_code: api_access
                    name: API Access
                    description: Access to REST API endpoints
                    feature_privileges:
                      - code: rate_limit
                        name: API Rate Limit
                        value_type: INTEGER
                        value: 10000
                      - code: endpoints
                        name: Available Endpoints
                        value_type: SELECT
                        value: all
                        config:
                          select_options:
                            - basic
                            - standard
                            - premium
                            - all
                  - feature_code: sso
                    name: Single Sign-On
                    description: SSO authentication configuration
                    feature_privileges:
                      - code: enabled
                        name: SSO Enabled
                        value_type: BOOLEAN
                        value: true
                      - code: provider
                        name: SSO Provider
                        value_type: SELECT
                        value: google
                        config:
                          select_options:
                            - google
                            - okta
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  schemas:
    PlanEntitlementListResponse:
      type: object
      required:
        - entitlements
      properties:
        entitlements:
          type: array
          description: List of entitlements associated with the plan
          items:
            $ref: '#/components/schemas/PlanEntitlementResponse'
    PlanEntitlementResponse:
      type: object
      required:
        - feature_code
        - feature_privileges
      properties:
        feature_code:
          type: string
          description: >-
            Unique code used to identify the feature across the system. This
            serves as the primary identifier when assigning entitlements to
            plans and must be unique.
          maxLength: 255
          pattern: ^[a-zA-Z0-9_-]+$
          example: USER-SEATS
        name:
          type: string
          description: >-
            Human-readable display name of the feature shown in user interfaces.
            More descriptive than the code and helps users understand the
            feature's purpose.
          maxLength: 255
          example: Number of seats
        description:
          type: string
          description: >-
            Comprehensive explanation of what this feature provides to
            customers, how it works, and any important usage information. This
            helps users understand the value and functionality of the feature.
          maxLength: 600
          example: Number of users of the account
        feature_privileges:
          type: array
          description: >-
            Collection of configurable privilege settings associated with this
            feature entitlement. Each privilege defines a specific capability,
            setting, or limit (e.g., maximum users, access level,
            enabled/disabled status) that can be assigned values in the plan.
            These privileges determine what capabilities customers receive with
            this feature.
          items:
            $ref: '#/components/schemas/PlanEntitlementPrivilege'
    Error:
      type: object
      properties:
        name:
          type: string
        debug_id:
          type: string
        message:
          type: string
        details:
          type: array
          items:
            $ref: '#/components/schemas/ErrorDetail'
    PlanEntitlementPrivilege:
      type: object
      required:
        - value
      allOf:
        - $ref: '#/components/schemas/EntitlementPrivilegeBase'
        - type: object
          properties:
            value:
              description: >-
                The specific value assigned to this privilege in the plan. The
                type of value must match the value_type field. For integer
                types, this represents numeric limits (e.g., 100 users); for
                boolean types, true/false settings (e.g., enable/disable
                features); for string or select types, specific configuration
                options (e.g., 'premium', 'basic').
              example: 100
    ErrorDetail:
      type: object
      properties:
        field:
          type: string
        value:
          type: string
        location:
          type: string
        issue:
          type: string
        description:
          type: string
    EntitlementPrivilegeBase:
      type: object
      required:
        - code
        - value_type
      properties:
        code:
          type: string
          description: >-
            Unique identifier for this specific privilege within the feature.
            Used as a key when setting privilege values.
          maxLength: 255
          pattern: ^[a-zA-Z0-9_-]+$
          example: max
        name:
          type: string
          description: >-
            User-friendly display name for this privilege shown in interfaces.
            More descriptive than the code and helps users understand what this
            specific setting controls.
          maxLength: 255
          example: Maximum
        value_type:
          $ref: '#/components/schemas/PrivilegeValueType'
        config:
          $ref: '#/components/schemas/PrivilegeConfig'
    PrivilegeValueType:
      type: string
      description: >-
        Defines the data type that this privilege accepts when being assigned
        values in entitlements. 'INTEGER' for numeric limits, 'BOOLEAN' for
        on/off toggles, 'STRING' for text values, 'SELECT' for predefined
        options.
      enum:
        - STRING
        - BOOLEAN
        - INTEGER
        - SELECT
      default: STRING
      example: INTEGER
    PrivilegeConfig:
      type: object
      description: >-
        Additional configuration for privileges that require constraints or
        options. Currently used for 'select' type privileges to define allowed
        values.
      properties:
        select_options:
          type: array
          description: >-
            Defines the allowed values when value_type is 'select'. When
            creating entitlements, only these predefined options can be
            assigned. Useful for features like SSO providers, regions, or
            service tiers.
          items:
            type: string
          example:
            - google
            - okta
            - azure
  responses:
    NotFound:
      description: Resource Not Found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    InternalServerError:
      description: Internal Server Error - An unexpected error occurred
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            name: INTERNAL_SERVER_ERROR
            message: An internal server error has occurred.
            debug_id: 90957fca61718
  securitySchemes:
    BearerAuth:
      type: oauth2
      description: >-
        Use the /v1/oauth2/token endpoint to obtain an access token and pass it
        as a Bearer token in the Authorization header.
      flows:
        clientCredentials:
          tokenUrl: https://api-m.sandbox.paypal.com/v1/oauth2/token
          scopes:
            read: Read access
            write: Write access

````