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

# get customer entitlements

> Get active customer entitlements with their grants



## OpenAPI

````yaml /openapi.json post /v1/access/entitlements/list
openapi: 3.0.3
info:
  title: Unprice API
  version: 1.0.0
servers:
  - url: https://api.unprice.dev
    description: Production
  - url: http://localhost:8787
    description: Development
  - url: https://preview-api.unprice.dev
    description: Preview
security:
  - bearerAuth: []
paths:
  /v1/access/entitlements/list:
    post:
      tags:
        - access
      summary: get customer entitlements
      description: Get active customer entitlements with their grants
      operationId: access.entitlements.list
      requestBody:
        description: Body of the request
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                customerId:
                  type: string
                  description: The customer ID
                  example: cus_1H7KQFLr7RepUyQBKdnvY
                projectId:
                  type: string
                  description: The project ID
                  example: prj_1H7KQFLr7RepUyQBKdnvY
              required:
                - customerId
      responses:
        '200':
          description: The result of the get customer entitlements
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: string
                      maxLength: 36
                    projectId:
                      type: string
                      maxLength: 36
                    createdAtM:
                      type: number
                    updatedAtM:
                      type: number
                    customerId:
                      type: string
                      maxLength: 36
                    featurePlanVersionId:
                      type: string
                      maxLength: 36
                    subscriptionId:
                      type: string
                      nullable: true
                      maxLength: 36
                    subscriptionPhaseId:
                      type: string
                      nullable: true
                      maxLength: 36
                    subscriptionItemId:
                      type: string
                      nullable: true
                      maxLength: 36
                    effectiveAt:
                      type: number
                    expiresAt:
                      type: number
                      nullable: true
                    overageStrategy:
                      type: string
                      enum:
                        - none
                        - last-call
                        - always
                    metadata:
                      type: object
                      nullable: true
                      additionalProperties:
                        anyOf:
                          - type: string
                          - type: number
                          - type: boolean
                          - nullable: true
                          - nullable: true
                    featurePlanVersion:
                      type: object
                      properties:
                        id:
                          type: string
                          maxLength: 36
                        projectId:
                          type: string
                          maxLength: 36
                        createdAtM:
                          type: number
                        updatedAtM:
                          type: number
                        planVersionId:
                          type: string
                          maxLength: 36
                        type:
                          type: string
                          enum:
                            - feature
                            - addon
                        featureId:
                          type: string
                          maxLength: 36
                        featureType:
                          type: string
                          enum:
                            - flat
                            - tier
                            - package
                            - usage
                          description: >-
                            The pricing model type: 'flat' (fixed price), 'tier'
                            (volume-based tiers), 'usage' (pay-as-you-go), or
                            'package' (bundle pricing)
                        unitOfMeasure:
                          type: string
                          description: >-
                            Unit of measurement captured for this plan version
                            feature. Used for display and billing context
                            without relying on mutable feature definitions
                        config:
                          anyOf:
                            - type: object
                              properties:
                                tiers:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      unitPrice:
                                        type: object
                                        properties:
                                          dinero:
                                            type: object
                                            properties:
                                              amount:
                                                type: number
                                                description: >-
                                                  The monetary amount in the smallest
                                                  currency unit (e.g., cents for USD).
                                                  Example: 999 represents $9.99
                                              currency:
                                                type: object
                                                properties:
                                                  code:
                                                    type: string
                                                    description: >-
                                                      ISO 4217 currency code. Examples: 'USD',
                                                      'EUR', 'GBP'
                                                  base:
                                                    anyOf:
                                                      - type: number
                                                      - type: array
                                                        items:
                                                          type: number
                                                    description: >-
                                                      The base of the currency system. Usually
                                                      10 for decimal currencies
                                                  exponent:
                                                    type: number
                                                    description: >-
                                                      Number of decimal places for the
                                                      currency. Example: 2 for USD (cents), 0
                                                      for JPY
                                                required:
                                                  - code
                                                  - base
                                                  - exponent
                                                description: >-
                                                  Currency configuration following ISO
                                                  4217 standards
                                              scale:
                                                type: number
                                                description: >-
                                                  The precision scale for the monetary
                                                  value. Determines how many decimal
                                                  places are stored
                                            required:
                                              - amount
                                              - currency
                                              - scale
                                            description: >-
                                              The internal Dinero.js representation of
                                              the price for precise calculations
                                          displayAmount:
                                            type: string
                                            pattern: ^\d{1,8}(\.\d{1,8})?$
                                            description: >-
                                              Human-readable price value as a decimal
                                              string. This is the value users see and
                                              input. Example: '9.99'
                                        required:
                                          - dinero
                                          - displayAmount
                                        description: >-
                                          Price charged per unit within this tier.
                                          Example: $0.10 per API call in the
                                          1-1000 calls tier
                                      flatPrice:
                                        type: object
                                        properties:
                                          dinero:
                                            type: object
                                            properties:
                                              amount:
                                                type: number
                                                description: >-
                                                  The monetary amount in the smallest
                                                  currency unit (e.g., cents for USD).
                                                  Example: 999 represents $9.99
                                              currency:
                                                type: object
                                                properties:
                                                  code:
                                                    type: string
                                                    description: >-
                                                      ISO 4217 currency code. Examples: 'USD',
                                                      'EUR', 'GBP'
                                                  base:
                                                    anyOf:
                                                      - type: number
                                                      - type: array
                                                        items:
                                                          type: number
                                                    description: >-
                                                      The base of the currency system. Usually
                                                      10 for decimal currencies
                                                  exponent:
                                                    type: number
                                                    description: >-
                                                      Number of decimal places for the
                                                      currency. Example: 2 for USD (cents), 0
                                                      for JPY
                                                required:
                                                  - code
                                                  - base
                                                  - exponent
                                                description: >-
                                                  Currency configuration following ISO
                                                  4217 standards
                                              scale:
                                                type: number
                                                description: >-
                                                  The precision scale for the monetary
                                                  value. Determines how many decimal
                                                  places are stored
                                            required:
                                              - amount
                                              - currency
                                              - scale
                                            description: >-
                                              The internal Dinero.js representation of
                                              the price for precise calculations
                                          displayAmount:
                                            type: string
                                            pattern: ^\d{1,8}(\.\d{1,8})?$
                                            description: >-
                                              Human-readable price value as a decimal
                                              string. This is the value users see and
                                              input. Example: '9.99'
                                        required:
                                          - dinero
                                          - displayAmount
                                        description: >-
                                          Fixed price charged for entering this
                                          tier, regardless of units consumed.
                                          Example: $50 base fee for the 'Pro' tier
                                      firstUnit:
                                        type: integer
                                        minimum: 1
                                        description: >-
                                          The starting unit number for this tier
                                          (inclusive). Must be 1 for the first
                                          tier, and consecutive with previous
                                          tier's lastUnit + 1 for subsequent tiers
                                      lastUnit:
                                        type: integer
                                        nullable: true
                                        minimum: 1
                                        description: >-
                                          The ending unit number for this tier
                                          (inclusive). Set to null for the final
                                          tier to indicate unlimited. Example:
                                          1000 means this tier covers up to 1000
                                          units
                                      label:
                                        type: string
                                        description: >-
                                          Display name for this tier shown in
                                          pricing UI. Examples: 'Starter',
                                          'Growth', 'Enterprise', '1-100 units'
                                    required:
                                      - unitPrice
                                      - flatPrice
                                      - firstUnit
                                      - lastUnit
                                    description: >-
                                      Configuration for a single pricing tier
                                      defining unit ranges and associated
                                      pricing
                                  description: >-
                                    Not used for flat pricing. Will be removed
                                    during validation
                                price:
                                  type: object
                                  properties:
                                    dinero:
                                      type: object
                                      properties:
                                        amount:
                                          type: number
                                          description: >-
                                            The monetary amount in the smallest
                                            currency unit (e.g., cents for USD).
                                            Example: 999 represents $9.99
                                        currency:
                                          type: object
                                          properties:
                                            code:
                                              type: string
                                              description: >-
                                                ISO 4217 currency code. Examples: 'USD',
                                                'EUR', 'GBP'
                                            base:
                                              anyOf:
                                                - type: number
                                                - type: array
                                                  items:
                                                    type: number
                                              description: >-
                                                The base of the currency system. Usually
                                                10 for decimal currencies
                                            exponent:
                                              type: number
                                              description: >-
                                                Number of decimal places for the
                                                currency. Example: 2 for USD (cents), 0
                                                for JPY
                                          required:
                                            - code
                                            - base
                                            - exponent
                                          description: >-
                                            Currency configuration following ISO
                                            4217 standards
                                        scale:
                                          type: number
                                          description: >-
                                            The precision scale for the monetary
                                            value. Determines how many decimal
                                            places are stored
                                      required:
                                        - amount
                                        - currency
                                        - scale
                                      description: >-
                                        The internal Dinero.js representation of
                                        the price for precise calculations
                                    displayAmount:
                                      type: string
                                      pattern: ^\d{1,8}(\.\d{1,8})?$
                                      description: >-
                                        Human-readable price value as a decimal
                                        string. This is the value users see and
                                        input. Example: '9.99'
                                  required:
                                    - dinero
                                    - displayAmount
                                  description: >-
                                    The fixed price for this feature. This is
                                    the single price charged regardless of usage
                                usageMode:
                                  type: string
                                  enum:
                                    - tier
                                    - package
                                    - unit
                                  description: >-
                                    Not used for flat pricing. Will be removed
                                    during validation
                                tierMode:
                                  type: string
                                  enum:
                                    - volume
                                    - graduated
                                  description: >-
                                    Not used for flat pricing. Will be removed
                                    during validation
                                units:
                                  type: integer
                                  minimum: 1
                                  description: >-
                                    Not used for flat pricing. Will be removed
                                    during validation
                              required:
                                - price
                              description: >-
                                Configuration for flat-rate pricing where a
                                single fixed price is charged regardless of
                                consumption
                            - type: object
                              properties:
                                price:
                                  type: object
                                  properties:
                                    dinero:
                                      type: object
                                      properties:
                                        amount:
                                          type: number
                                          description: >-
                                            The monetary amount in the smallest
                                            currency unit (e.g., cents for USD).
                                            Example: 999 represents $9.99
                                        currency:
                                          type: object
                                          properties:
                                            code:
                                              type: string
                                              description: >-
                                                ISO 4217 currency code. Examples: 'USD',
                                                'EUR', 'GBP'
                                            base:
                                              anyOf:
                                                - type: number
                                                - type: array
                                                  items:
                                                    type: number
                                              description: >-
                                                The base of the currency system. Usually
                                                10 for decimal currencies
                                            exponent:
                                              type: number
                                              description: >-
                                                Number of decimal places for the
                                                currency. Example: 2 for USD (cents), 0
                                                for JPY
                                          required:
                                            - code
                                            - base
                                            - exponent
                                          description: >-
                                            Currency configuration following ISO
                                            4217 standards
                                        scale:
                                          type: number
                                          description: >-
                                            The precision scale for the monetary
                                            value. Determines how many decimal
                                            places are stored
                                      required:
                                        - amount
                                        - currency
                                        - scale
                                      description: >-
                                        The internal Dinero.js representation of
                                        the price for precise calculations
                                    displayAmount:
                                      type: string
                                      pattern: ^\d{1,8}(\.\d{1,8})?$
                                      description: >-
                                        Human-readable price value as a decimal
                                        string. This is the value users see and
                                        input. Example: '9.99'
                                  required:
                                    - dinero
                                    - displayAmount
                                  description: >-
                                    Base price for the feature. Not typically
                                    used in tier pricing mode
                                tierMode:
                                  type: string
                                  enum:
                                    - volume
                                    - graduated
                                  description: >-
                                    How tier pricing is calculated: 'volume'
                                    (all units priced at the tier they fall
                                    into) or 'graduated' (each unit priced at
                                    its respective tier)
                                tiers:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      unitPrice:
                                        type: object
                                        properties:
                                          dinero:
                                            type: object
                                            properties:
                                              amount:
                                                type: number
                                                description: >-
                                                  The monetary amount in the smallest
                                                  currency unit (e.g., cents for USD).
                                                  Example: 999 represents $9.99
                                              currency:
                                                type: object
                                                properties:
                                                  code:
                                                    type: string
                                                    description: >-
                                                      ISO 4217 currency code. Examples: 'USD',
                                                      'EUR', 'GBP'
                                                  base:
                                                    anyOf:
                                                      - type: number
                                                      - type: array
                                                        items:
                                                          type: number
                                                    description: >-
                                                      The base of the currency system. Usually
                                                      10 for decimal currencies
                                                  exponent:
                                                    type: number
                                                    description: >-
                                                      Number of decimal places for the
                                                      currency. Example: 2 for USD (cents), 0
                                                      for JPY
                                                required:
                                                  - code
                                                  - base
                                                  - exponent
                                                description: >-
                                                  Currency configuration following ISO
                                                  4217 standards
                                              scale:
                                                type: number
                                                description: >-
                                                  The precision scale for the monetary
                                                  value. Determines how many decimal
                                                  places are stored
                                            required:
                                              - amount
                                              - currency
                                              - scale
                                            description: >-
                                              The internal Dinero.js representation of
                                              the price for precise calculations
                                          displayAmount:
                                            type: string
                                            pattern: ^\d{1,8}(\.\d{1,8})?$
                                            description: >-
                                              Human-readable price value as a decimal
                                              string. This is the value users see and
                                              input. Example: '9.99'
                                        required:
                                          - dinero
                                          - displayAmount
                                        description: >-
                                          Price charged per unit within this tier.
                                          Example: $0.10 per API call in the
                                          1-1000 calls tier
                                      flatPrice:
                                        type: object
                                        properties:
                                          dinero:
                                            type: object
                                            properties:
                                              amount:
                                                type: number
                                                description: >-
                                                  The monetary amount in the smallest
                                                  currency unit (e.g., cents for USD).
                                                  Example: 999 represents $9.99
                                              currency:
                                                type: object
                                                properties:
                                                  code:
                                                    type: string
                                                    description: >-
                                                      ISO 4217 currency code. Examples: 'USD',
                                                      'EUR', 'GBP'
                                                  base:
                                                    anyOf:
                                                      - type: number
                                                      - type: array
                                                        items:
                                                          type: number
                                                    description: >-
                                                      The base of the currency system. Usually
                                                      10 for decimal currencies
                                                  exponent:
                                                    type: number
                                                    description: >-
                                                      Number of decimal places for the
                                                      currency. Example: 2 for USD (cents), 0
                                                      for JPY
                                                required:
                                                  - code
                                                  - base
                                                  - exponent
                                                description: >-
                                                  Currency configuration following ISO
                                                  4217 standards
                                              scale:
                                                type: number
                                                description: >-
                                                  The precision scale for the monetary
                                                  value. Determines how many decimal
                                                  places are stored
                                            required:
                                              - amount
                                              - currency
                                              - scale
                                            description: >-
                                              The internal Dinero.js representation of
                                              the price for precise calculations
                                          displayAmount:
                                            type: string
                                            pattern: ^\d{1,8}(\.\d{1,8})?$
                                            description: >-
                                              Human-readable price value as a decimal
                                              string. This is the value users see and
                                              input. Example: '9.99'
                                        required:
                                          - dinero
                                          - displayAmount
                                        description: >-
                                          Fixed price charged for entering this
                                          tier, regardless of units consumed.
                                          Example: $50 base fee for the 'Pro' tier
                                      firstUnit:
                                        type: integer
                                        minimum: 1
                                        description: >-
                                          The starting unit number for this tier
                                          (inclusive). Must be 1 for the first
                                          tier, and consecutive with previous
                                          tier's lastUnit + 1 for subsequent tiers
                                      lastUnit:
                                        type: integer
                                        nullable: true
                                        minimum: 1
                                        description: >-
                                          The ending unit number for this tier
                                          (inclusive). Set to null for the final
                                          tier to indicate unlimited. Example:
                                          1000 means this tier covers up to 1000
                                          units
                                      label:
                                        type: string
                                        description: >-
                                          Display name for this tier shown in
                                          pricing UI. Examples: 'Starter',
                                          'Growth', 'Enterprise', '1-100 units'
                                    required:
                                      - unitPrice
                                      - flatPrice
                                      - firstUnit
                                      - lastUnit
                                    description: >-
                                      Configuration for a single pricing tier
                                      defining unit ranges and associated
                                      pricing
                                  description: >-
                                    Array of pricing tiers defining price
                                    brackets. Tiers must be consecutive (no gaps
                                    or overlaps). The last tier's lastUnit
                                    should be null for unlimited
                                usageMode:
                                  type: string
                                  enum:
                                    - tier
                                    - package
                                    - unit
                                  description: >-
                                    Usage calculation mode. Not typically used
                                    in tier-type features
                                units:
                                  type: integer
                                  minimum: 1
                                  description: >-
                                    Number of units included. Not typically used
                                    in tier-type features
                              required:
                                - tierMode
                                - tiers
                              description: >-
                                Configuration for tier-based pricing where
                                different price rates apply to different volume
                                ranges
                            - type: object
                              properties:
                                price:
                                  type: object
                                  properties:
                                    dinero:
                                      type: object
                                      properties:
                                        amount:
                                          type: number
                                          description: >-
                                            The monetary amount in the smallest
                                            currency unit (e.g., cents for USD).
                                            Example: 999 represents $9.99
                                        currency:
                                          type: object
                                          properties:
                                            code:
                                              type: string
                                              description: >-
                                                ISO 4217 currency code. Examples: 'USD',
                                                'EUR', 'GBP'
                                            base:
                                              anyOf:
                                                - type: number
                                                - type: array
                                                  items:
                                                    type: number
                                              description: >-
                                                The base of the currency system. Usually
                                                10 for decimal currencies
                                            exponent:
                                              type: number
                                              description: >-
                                                Number of decimal places for the
                                                currency. Example: 2 for USD (cents), 0
                                                for JPY
                                          required:
                                            - code
                                            - base
                                            - exponent
                                          description: >-
                                            Currency configuration following ISO
                                            4217 standards
                                        scale:
                                          type: number
                                          description: >-
                                            The precision scale for the monetary
                                            value. Determines how many decimal
                                            places are stored
                                      required:
                                        - amount
                                        - currency
                                        - scale
                                      description: >-
                                        The internal Dinero.js representation of
                                        the price for precise calculations
                                    displayAmount:
                                      type: string
                                      pattern: ^\d{1,8}(\.\d{1,8})?$
                                      description: >-
                                        Human-readable price value as a decimal
                                        string. This is the value users see and
                                        input. Example: '9.99'
                                  required:
                                    - dinero
                                    - displayAmount
                                  description: >-
                                    Price per unit when usageMode is 'unit' or
                                    'package'. Required for unit/package modes,
                                    not used for tier mode
                                usageMode:
                                  type: string
                                  enum:
                                    - tier
                                    - package
                                    - unit
                                  description: >-
                                    How usage is calculated and billed: 'unit'
                                    (per-unit pricing), 'tier' (volume-based
                                    tiers), or 'package' (bundle of units)
                                tierMode:
                                  type: string
                                  enum:
                                    - volume
                                    - graduated
                                  description: >-
                                    Tier calculation method when usageMode is
                                    'tier': 'volume' or 'graduated'. Only
                                    applicable when usageMode is 'tier'
                                tiers:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      unitPrice:
                                        type: object
                                        properties:
                                          dinero:
                                            type: object
                                            properties:
                                              amount:
                                                type: number
                                                description: >-
                                                  The monetary amount in the smallest
                                                  currency unit (e.g., cents for USD).
                                                  Example: 999 represents $9.99
                                              currency:
                                                type: object
                                                properties:
                                                  code:
                                                    type: string
                                                    description: >-
                                                      ISO 4217 currency code. Examples: 'USD',
                                                      'EUR', 'GBP'
                                                  base:
                                                    anyOf:
                                                      - type: number
                                                      - type: array
                                                        items:
                                                          type: number
                                                    description: >-
                                                      The base of the currency system. Usually
                                                      10 for decimal currencies
                                                  exponent:
                                                    type: number
                                                    description: >-
                                                      Number of decimal places for the
                                                      currency. Example: 2 for USD (cents), 0
                                                      for JPY
                                                required:
                                                  - code
                                                  - base
                                                  - exponent
                                                description: >-
                                                  Currency configuration following ISO
                                                  4217 standards
                                              scale:
                                                type: number
                                                description: >-
                                                  The precision scale for the monetary
                                                  value. Determines how many decimal
                                                  places are stored
                                            required:
                                              - amount
                                              - currency
                                              - scale
                                            description: >-
                                              The internal Dinero.js representation of
                                              the price for precise calculations
                                          displayAmount:
                                            type: string
                                            pattern: ^\d{1,8}(\.\d{1,8})?$
                                            description: >-
                                              Human-readable price value as a decimal
                                              string. This is the value users see and
                                              input. Example: '9.99'
                                        required:
                                          - dinero
                                          - displayAmount
                                        description: >-
                                          Price charged per unit within this tier.
                                          Example: $0.10 per API call in the
                                          1-1000 calls tier
                                      flatPrice:
                                        type: object
                                        properties:
                                          dinero:
                                            type: object
                                            properties:
                                              amount:
                                                type: number
                                                description: >-
                                                  The monetary amount in the smallest
                                                  currency unit (e.g., cents for USD).
                                                  Example: 999 represents $9.99
                                              currency:
                                                type: object
                                                properties:
                                                  code:
                                                    type: string
                                                    description: >-
                                                      ISO 4217 currency code. Examples: 'USD',
                                                      'EUR', 'GBP'
                                                  base:
                                                    anyOf:
                                                      - type: number
                                                      - type: array
                                                        items:
                                                          type: number
                                                    description: >-
                                                      The base of the currency system. Usually
                                                      10 for decimal currencies
                                                  exponent:
                                                    type: number
                                                    description: >-
                                                      Number of decimal places for the
                                                      currency. Example: 2 for USD (cents), 0
                                                      for JPY
                                                required:
                                                  - code
                                                  - base
                                                  - exponent
                                                description: >-
                                                  Currency configuration following ISO
                                                  4217 standards
                                              scale:
                                                type: number
                                                description: >-
                                                  The precision scale for the monetary
                                                  value. Determines how many decimal
                                                  places are stored
                                            required:
                                              - amount
                                              - currency
                                              - scale
                                            description: >-
                                              The internal Dinero.js representation of
                                              the price for precise calculations
                                          displayAmount:
                                            type: string
                                            pattern: ^\d{1,8}(\.\d{1,8})?$
                                            description: >-
                                              Human-readable price value as a decimal
                                              string. This is the value users see and
                                              input. Example: '9.99'
                                        required:
                                          - dinero
                                          - displayAmount
                                        description: >-
                                          Fixed price charged for entering this
                                          tier, regardless of units consumed.
                                          Example: $50 base fee for the 'Pro' tier
                                      firstUnit:
                                        type: integer
                                        minimum: 1
                                        description: >-
                                          The starting unit number for this tier
                                          (inclusive). Must be 1 for the first
                                          tier, and consecutive with previous
                                          tier's lastUnit + 1 for subsequent tiers
                                      lastUnit:
                                        type: integer
                                        nullable: true
                                        minimum: 1
                                        description: >-
                                          The ending unit number for this tier
                                          (inclusive). Set to null for the final
                                          tier to indicate unlimited. Example:
                                          1000 means this tier covers up to 1000
                                          units
                                      label:
                                        type: string
                                        description: >-
                                          Display name for this tier shown in
                                          pricing UI. Examples: 'Starter',
                                          'Growth', 'Enterprise', '1-100 units'
                                    required:
                                      - unitPrice
                                      - flatPrice
                                      - firstUnit
                                      - lastUnit
                                    description: >-
                                      Configuration for a single pricing tier
                                      defining unit ranges and associated
                                      pricing
                                  description: >-
                                    Pricing tiers for tier-based usage. Required
                                    when usageMode is 'tier'. Must be
                                    consecutive with no gaps
                                units:
                                  type: integer
                                  minimum: 1
                                  description: >-
                                    Number of units in a package when usageMode
                                    is 'package'. Required for package mode.
                                    Example: 100 API calls per package
                              required:
                                - usageMode
                              description: >-
                                Configuration for usage-based (pay-as-you-go)
                                pricing with support for per-unit, tiered, or
                                package billing
                            - type: object
                              properties:
                                tiers:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      unitPrice:
                                        type: object
                                        properties:
                                          dinero:
                                            type: object
                                            properties:
                                              amount:
                                                type: number
                                                description: >-
                                                  The monetary amount in the smallest
                                                  currency unit (e.g., cents for USD).
                                                  Example: 999 represents $9.99
                                              currency:
                                                type: object
                                                properties:
                                                  code:
                                                    type: string
                                                    description: >-
                                                      ISO 4217 currency code. Examples: 'USD',
                                                      'EUR', 'GBP'
                                                  base:
                                                    anyOf:
                                                      - type: number
                                                      - type: array
                                                        items:
                                                          type: number
                                                    description: >-
                                                      The base of the currency system. Usually
                                                      10 for decimal currencies
                                                  exponent:
                                                    type: number
                                                    description: >-
                                                      Number of decimal places for the
                                                      currency. Example: 2 for USD (cents), 0
                                                      for JPY
                                                required:
                                                  - code
                                                  - base
                                                  - exponent
                                                description: >-
                                                  Currency configuration following ISO
                                                  4217 standards
                                              scale:
                                                type: number
                                                description: >-
                                                  The precision scale for the monetary
                                                  value. Determines how many decimal
                                                  places are stored
                                            required:
                                              - amount
                                              - currency
                                              - scale
                                            description: >-
                                              The internal Dinero.js representation of
                                              the price for precise calculations
                                          displayAmount:
                                            type: string
                                            pattern: ^\d{1,8}(\.\d{1,8})?$
                                            description: >-
                                              Human-readable price value as a decimal
                                              string. This is the value users see and
                                              input. Example: '9.99'
                                        required:
                                          - dinero
                                          - displayAmount
                                        description: >-
                                          Price charged per unit within this tier.
                                          Example: $0.10 per API call in the
                                          1-1000 calls tier
                                      flatPrice:
                                        type: object
                                        properties:
                                          dinero:
                                            type: object
                                            properties:
                                              amount:
                                                type: number
                                                description: >-
                                                  The monetary amount in the smallest
                                                  currency unit (e.g., cents for USD).
                                                  Example: 999 represents $9.99
                                              currency:
                                                type: object
                                                properties:
                                                  code:
                                                    type: string
                                                    description: >-
                                                      ISO 4217 currency code. Examples: 'USD',
                                                      'EUR', 'GBP'
                                                  base:
                                                    anyOf:
                                                      - type: number
                                                      - type: array
                                                        items:
                                                          type: number
                                                    description: >-
                                                      The base of the currency system. Usually
                                                      10 for decimal currencies
                                                  exponent:
                                                    type: number
                                                    description: >-
                                                      Number of decimal places for the
                                                      currency. Example: 2 for USD (cents), 0
                                                      for JPY
                                                required:
                                                  - code
                                                  - base
                                                  - exponent
                                                description: >-
                                                  Currency configuration following ISO
                                                  4217 standards
                                              scale:
                                                type: number
                                                description: >-
                                                  The precision scale for the monetary
                                                  value. Determines how many decimal
                                                  places are stored
                                            required:
                                              - amount
                                              - currency
                                              - scale
                                            description: >-
                                              The internal Dinero.js representation of
                                              the price for precise calculations
                                          displayAmount:
                                            type: string
                                            pattern: ^\d{1,8}(\.\d{1,8})?$
                                            description: >-
                                              Human-readable price value as a decimal
                                              string. This is the value users see and
                                              input. Example: '9.99'
                                        required:
                                          - dinero
                                          - displayAmount
                                        description: >-
                                          Fixed price charged for entering this
                                          tier, regardless of units consumed.
                                          Example: $50 base fee for the 'Pro' tier
                                      firstUnit:
                                        type: integer
                                        minimum: 1
                                        description: >-
                                          The starting unit number for this tier
                                          (inclusive). Must be 1 for the first
                                          tier, and consecutive with previous
                                          tier's lastUnit + 1 for subsequent tiers
                                      lastUnit:
                                        type: integer
                                        nullable: true
                                        minimum: 1
                                        description: >-
                                          The ending unit number for this tier
                                          (inclusive). Set to null for the final
                                          tier to indicate unlimited. Example:
                                          1000 means this tier covers up to 1000
                                          units
                                      label:
                                        type: string
                                        description: >-
                                          Display name for this tier shown in
                                          pricing UI. Examples: 'Starter',
                                          'Growth', 'Enterprise', '1-100 units'
                                    required:
                                      - unitPrice
                                      - flatPrice
                                      - firstUnit
                                      - lastUnit
                                    description: >-
                                      Configuration for a single pricing tier
                                      defining unit ranges and associated
                                      pricing
                                  description: >-
                                    Not used for package pricing. Will be
                                    removed during validation
                                price:
                                  type: object
                                  properties:
                                    dinero:
                                      type: object
                                      properties:
                                        amount:
                                          type: number
                                          description: >-
                                            The monetary amount in the smallest
                                            currency unit (e.g., cents for USD).
                                            Example: 999 represents $9.99
                                        currency:
                                          type: object
                                          properties:
                                            code:
                                              type: string
                                              description: >-
                                                ISO 4217 currency code. Examples: 'USD',
                                                'EUR', 'GBP'
                                            base:
                                              anyOf:
                                                - type: number
                                                - type: array
                                                  items:
                                                    type: number
                                              description: >-
                                                The base of the currency system. Usually
                                                10 for decimal currencies
                                            exponent:
                                              type: number
                                              description: >-
                                                Number of decimal places for the
                                                currency. Example: 2 for USD (cents), 0
                                                for JPY
                                          required:
                                            - code
                                            - base
                                            - exponent
                                          description: >-
                                            Currency configuration following ISO
                                            4217 standards
                                        scale:
                                          type: number
                                          description: >-
                                            The precision scale for the monetary
                                            value. Determines how many decimal
                                            places are stored
                                      required:
                                        - amount
                                        - currency
                                        - scale
                                      description: >-
                                        The internal Dinero.js representation of
                                        the price for precise calculations
                                    displayAmount:
                                      type: string
                                      pattern: ^\d{1,8}(\.\d{1,8})?$
                                      description: >-
                                        Human-readable price value as a decimal
                                        string. This is the value users see and
                                        input. Example: '9.99'
                                  required:
                                    - dinero
                                    - displayAmount
                                  description: >-
                                    The price per package. Example: $10 per
                                    package of 100 API calls
                                usageMode:
                                  type: string
                                  enum:
                                    - tier
                                    - package
                                    - unit
                                  description: >-
                                    Not used for package pricing. Will be
                                    removed during validation
                                tierMode:
                                  type: string
                                  enum:
                                    - volume
                                    - graduated
                                  description: >-
                                    Not used for package pricing. Will be
                                    removed during validation
                                units:
                                  type: integer
                                  minimum: 1
                                  description: >-
                                    Number of units included in each package.
                                    Required. Example: 100 means each package
                                    includes 100 units
                              required:
                                - price
                                - units
                              description: >-
                                Configuration for package pricing where
                                customers purchase bundles of units at a fixed
                                price per bundle
                          description: >-
                            Pricing configuration for this feature. Structure
                            depends on featureType
                        billingConfig:
                          type: object
                          properties:
                            name:
                              type: string
                              minLength: 1
                            billingInterval:
                              type: string
                              enum:
                                - month
                                - year
                                - week
                                - day
                                - minute
                                - onetime
                            billingIntervalCount:
                              type: integer
                              minimum: 1
                              maximum: 60
                            billingAnchor:
                              anyOf:
                                - type: integer
                                  minimum: 1
                                  maximum: 31
                                  description: >-
                                    Days of the month. Pick a number between 1
                                    and 31, if the month has less days, it will
                                    be the last day of the month
                                - type: string
                                  enum:
                                    - dayOfCreation
                                  description: >-
                                    the day of the creation of the subscription
                                    as the billing anchor
                            planType:
                              type: string
                              enum:
                                - recurring
                                - onetime
                          required:
                            - name
                            - billingInterval
                            - billingIntervalCount
                            - billingAnchor
                            - planType
                          description: >-
                            Billing cycle configuration including interval
                            (month/year), billing anchor date, and plan type
                            (recurring/onetime)
                        resetConfig:
                          type: object
                          nullable: true
                          properties:
                            name:
                              type: string
                              minLength: 1
                            resetInterval:
                              type: string
                              enum:
                                - month
                                - year
                                - week
                                - day
                                - minute
                                - onetime
                            resetIntervalCount:
                              type: integer
                              minimum: 1
                              maximum: 60
                            resetAnchor:
                              anyOf:
                                - type: integer
                                  minimum: 1
                                  maximum: 31
                                  description: >-
                                    Days of the month. Pick a number between 1
                                    and 31, if the month has less days, it will
                                    be the last day of the month
                                - type: string
                                  enum:
                                    - dayOfCreation
                                  description: >-
                                    the day of the creation of the subscription
                                    as the billing anchor
                            planType:
                              type: string
                              enum:
                                - recurring
                                - onetime
                          required:
                            - name
                            - resetInterval
                            - resetIntervalCount
                            - resetAnchor
                            - planType
                          description: >-
                            Configuration for resetting usage counters. Defines
                            when and how usage limits reset (e.g., monthly,
                            yearly)
                        metadata:
                          type: object
                          nullable: true
                          properties:
                            realtime:
                              type: boolean
                              default: false
                              description: >-
                                Whether usage should be tracked and verified in
                                real-time. When true, usage checks happen
                                synchronously. Default: false
                            notifyUsageThreshold:
                              type: integer
                              default: 95
                              description: >-
                                Percentage threshold (0-100) at which to notify
                                the customer about approaching usage limits.
                                Default: 95 (notify at 95% usage)
                            overageStrategy:
                              type: string
                              enum:
                                - none
                                - last-call
                                - always
                              default: none
                              description: >-
                                How to handle usage that exceeds the feature
                                limit. Options: 'none' (strict deny),
                                'last-call' (allow one final call while tokens
                                remain), 'always' (allow and record overage)
                            blockCustomer:
                              type: boolean
                              default: false
                              description: >-
                                Whether to completely block the customer when
                                they exceed their limit. When true, access is
                                denied until the next billing period. Default:
                                false
                            hidden:
                              type: boolean
                              default: false
                              description: >-
                                Whether to hide this feature from
                                customer-facing displays like pricing pages.
                                Useful for internal or technical features.
                                Default: false
                            billingCadenceOverride:
                              type: boolean
                              description: >-
                                Whether this usage feature intentionally uses a
                                billing cadence different from the parent plan.
                                Default: false
                            resetCadenceOverride:
                              type: boolean
                              description: >-
                                Whether this usage feature intentionally uses a
                                reset cadence different from its billing
                                cadence. Default: false
                          description: >-
                            Additional feature settings including real-time
                            tracking, notifications, and visibility options
                        order:
                          type: number
                        defaultQuantity:
                          type: integer
                          nullable: true
                          default: 1
                          description: >-
                            Default quantity of this feature included when a
                            customer subscribes. Example: 5 for '5 team members
                            included'. Default: 1
                        limit:
                          type: integer
                          nullable: true
                          description: >-
                            Maximum allowed usage for this feature per billing
                            period. Null or undefined means unlimited. Example:
                            10000 for 10,000 API calls/month
                        meterConfig:
                          type: object
                          nullable: true
                          properties:
                            eventId:
                              type: string
                              minLength: 1
                            eventSlug:
                              type: string
                              minLength: 1
                            aggregationMethod:
                              type: string
                              enum:
                                - sum
                                - count
                                - max
                                - latest
                              description: >-
                                How to aggregate usage events within the current
                                billing period. 'sum' totals values, 'count'
                                counts events, 'max' keeps the highest value,
                                and 'latest' keeps the most recent value.
                            aggregationField:
                              type: string
                              minLength: 1
                            filters:
                              type: object
                              additionalProperties:
                                type: string
                            groupBy:
                              type: array
                              items:
                                type: string
                            windowSize:
                              type: string
                              enum:
                                - MINUTE
                                - HOUR
                                - DAY
                          required:
                            - eventId
                            - eventSlug
                            - aggregationMethod
                          description: >-
                            Snapshotted event-native meter configuration for
                            this plan version feature. When present, it is the
                            authoritative source for how usage should be
                            measured
                        feature:
                          type: object
                          properties:
                            id:
                              type: string
                              maxLength: 36
                            projectId:
                              type: string
                              maxLength: 36
                            createdAtM:
                              type: number
                            updatedAtM:
                              type: number
                            slug:
                              type: string
                            code:
                              type: number
                            unitOfMeasure:
                              type: string
                              maxLength: 24
                            title:
                              type: string
                              maxLength: 50
                            description:
                              type: string
                              nullable: true
                            meterConfig:
                              type: object
                              nullable: true
                              properties:
                                eventId:
                                  type: string
                                  minLength: 1
                                eventSlug:
                                  type: string
                                  minLength: 1
                                aggregationMethod:
                                  type: string
                                  enum:
                                    - sum
                                    - count
                                    - max
                                    - latest
                                  description: >-
                                    How to aggregate usage events within the
                                    current billing period. 'sum' totals values,
                                    'count' counts events, 'max' keeps the
                                    highest value, and 'latest' keeps the most
                                    recent value.
                                aggregationField:
                                  type: string
                                  minLength: 1
                                filters:
                                  type: object
                                  additionalProperties:
                                    type: string
                                groupBy:
                                  type: array
                                  items:
                                    type: string
                                windowSize:
                                  type: string
                                  enum:
                                    - MINUTE
                                    - HOUR
                                    - DAY
                              required:
                                - eventId
                                - eventSlug
                                - aggregationMethod
                              description: >-
                                Default meter template for usage-style features.
                                When present, new plan version feature snapshots
                                can copy this event-native measurement
                                configuration
                          required:
                            - id
                            - projectId
                            - createdAtM
                            - updatedAtM
                            - slug
                            - code
                            - unitOfMeasure
                            - title
                            - description
                      required:
                        - id
                        - projectId
                        - createdAtM
                        - updatedAtM
                        - planVersionId
                        - type
                        - featureId
                        - featureType
                        - unitOfMeasure
                        - config
                        - billingConfig
                        - metadata
                        - order
                        - feature
                    grants:
                      type: array
                      items:
                        type: object
                        properties:
                          id:
                            type: string
                            maxLength: 36
                          projectId:
                            type: string
                            maxLength: 36
                          createdAtM:
                            type: number
                          updatedAtM:
                            type: number
                          customerEntitlementId:
                            type: string
                            maxLength: 36
                          type:
                            type: string
                            enum:
                              - subscription
                              - manual
                              - promotion
                              - trial
                              - addon
                          priority:
                            type: number
                          allowanceUnits:
                            type: integer
                            nullable: true
                            minimum: 0
                          effectiveAt:
                            type: number
                          expiresAt:
                            type: number
                            nullable: true
                          metadata:
                            type: object
                            nullable: true
                            additionalProperties:
                              anyOf:
                                - type: string
                                - type: number
                                - type: boolean
                                - nullable: true
                                - nullable: true
                        required:
                          - id
                          - projectId
                          - createdAtM
                          - updatedAtM
                          - customerEntitlementId
                          - type
                          - priority
                          - allowanceUnits
                          - effectiveAt
                          - expiresAt
                          - metadata
                    subscriptionPhase:
                      type: object
                      nullable: true
                      properties:
                        creditLinePolicy:
                          type: string
                          enum:
                            - capped
                            - uncapped
                      required:
                        - creditLinePolicy
                  required:
                    - id
                    - projectId
                    - createdAtM
                    - updatedAtM
                    - customerId
                    - featurePlanVersionId
                    - subscriptionId
                    - subscriptionPhaseId
                    - subscriptionItemId
                    - effectiveAt
                    - expiresAt
                    - overageStrategy
                    - metadata
                    - featurePlanVersion
        '400':
          description: >-
            The server cannot or will not process the request due to something
            that is perceived to be a client error (e.g., malformed request
            syntax, invalid request message framing, or deceptive request
            routing).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrBadRequest'
        '401':
          description: >-
            Although the HTTP standard specifies "unauthorized", semantically
            this response means "unauthenticated". That is, the client must
            authenticate itself to get the requested response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrUnauthorized'
        '403':
          description: >-
            The client does not have access rights to the content; that is, it
            is unauthorized, so the server is refusing to give the requested
            resource. Unlike 401 Unauthorized, the client's identity is known to
            the server.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrForbidden'
        '404':
          description: >-
            The server cannot find the requested resource. In the browser, this
            means the URL is not recognized. In an API, this can also mean that
            the endpoint is valid but the resource itself does not exist.
            Servers may also send this response instead of 403 Forbidden to hide
            the existence of a resource from an unauthorized client. This
            response code is probably the most well known due to its frequent
            occurrence on the web.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrNotFound'
        '409':
          description: >-
            This response is sent when a request conflicts with the current
            state of the server.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrConflict'
        '412':
          description: >-
            The requested operation cannot be completed because certain
            conditions were not met. This typically occurs when a required
            resource state or version check fails.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrPreconditionFailed'
        '429':
          description: >-
            The user has sent too many requests in a given amount of time ("rate
            limiting")
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrTooManyRequests'
        '500':
          description: >-
            The server has encountered a situation it does not know how to
            handle.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrInternalServerError'
components:
  schemas:
    ErrBadRequest:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              enum:
                - BAD_REQUEST
              description: A machine readable error code.
              example: BAD_REQUEST
            docs:
              type: string
              description: >-
                A link to our documentation with more details about this error
                code
              example: https://docs.unprice.dev/api-reference/errors/code/BAD_REQUEST
            message:
              type: string
              description: A human readable explanation of what went wrong
            requestId:
              type: string
              description: Please always include the requestId in your error report
              example: req_1234
          required:
            - code
            - docs
            - message
            - requestId
      required:
        - error
    ErrUnauthorized:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              enum:
                - UNAUTHORIZED
              description: A machine readable error code.
              example: UNAUTHORIZED
            docs:
              type: string
              description: >-
                A link to our documentation with more details about this error
                code
              example: https://docs.unprice.dev/api-reference/errors/code/UNAUTHORIZED
            message:
              type: string
              description: A human readable explanation of what went wrong
            requestId:
              type: string
              description: Please always include the requestId in your error report
              example: req_1234
          required:
            - code
            - docs
            - message
            - requestId
      required:
        - error
    ErrForbidden:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              enum:
                - FORBIDDEN
              description: A machine readable error code.
              example: FORBIDDEN
            docs:
              type: string
              description: >-
                A link to our documentation with more details about this error
                code
              example: https://docs.unprice.dev/api-reference/errors/code/FORBIDDEN
            message:
              type: string
              description: A human readable explanation of what went wrong
            requestId:
              type: string
              description: Please always include the requestId in your error report
              example: req_1234
          required:
            - code
            - docs
            - message
            - requestId
      required:
        - error
    ErrNotFound:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              enum:
                - NOT_FOUND
              description: A machine readable error code.
              example: NOT_FOUND
            docs:
              type: string
              description: >-
                A link to our documentation with more details about this error
                code
              example: https://docs.unprice.dev/api-reference/errors/code/NOT_FOUND
            message:
              type: string
              description: A human readable explanation of what went wrong
            requestId:
              type: string
              description: Please always include the requestId in your error report
              example: req_1234
          required:
            - code
            - docs
            - message
            - requestId
      required:
        - error
    ErrConflict:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              enum:
                - CONFLICT
              description: A machine readable error code.
              example: CONFLICT
            docs:
              type: string
              description: >-
                A link to our documentation with more details about this error
                code
              example: https://docs.unprice.dev/api-reference/errors/code/CONFLICT
            message:
              type: string
              description: A human readable explanation of what went wrong
            requestId:
              type: string
              description: Please always include the requestId in your error report
              example: req_1234
          required:
            - code
            - docs
            - message
            - requestId
      required:
        - error
    ErrPreconditionFailed:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              enum:
                - PRECONDITION_FAILED
              description: A machine readable error code.
              example: PRECONDITION_FAILED
            docs:
              type: string
              description: >-
                A link to our documentation with more details about this error
                code
              example: >-
                https://docs.unprice.dev/api-reference/errors/code/PRECONDITION_FAILED
            message:
              type: string
              description: A human readable explanation of what went wrong
            requestId:
              type: string
              description: Please always include the requestId in your error report
              example: req_1234
          required:
            - code
            - docs
            - message
            - requestId
      required:
        - error
    ErrTooManyRequests:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              enum:
                - TOO_MANY_REQUESTS
              description: A machine readable error code.
              example: TOO_MANY_REQUESTS
            docs:
              type: string
              description: >-
                A link to our documentation with more details about this error
                code
              example: >-
                https://docs.unprice.dev/api-reference/errors/code/TOO_MANY_REQUESTS
            message:
              type: string
              description: A human readable explanation of what went wrong
            requestId:
              type: string
              description: Please always include the requestId in your error report
              example: req_1234
          required:
            - code
            - docs
            - message
            - requestId
      required:
        - error
    ErrInternalServerError:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              enum:
                - INTERNAL_SERVER_ERROR
              description: A machine readable error code.
              example: INTERNAL_SERVER_ERROR
            docs:
              type: string
              description: >-
                A link to our documentation with more details about this error
                code
              example: >-
                https://docs.unprice.dev/api-reference/errors/code/INTERNAL_SERVER_ERROR
            message:
              type: string
              description: A human readable explanation of what went wrong
            requestId:
              type: string
              description: Please always include the requestId in your error report
              example: req_1234
          required:
            - code
            - docs
            - message
            - requestId
      required:
        - error
  securitySchemes:
    bearerAuth:
      bearerFormat: root key
      type: http
      scheme: bearer
      x-speakeasy-example: UNPRICE_API_KEY

````