> ## 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 plan version

> Get a plan version by id



## OpenAPI

````yaml /openapi.json get /v1/plan-versions/get/{planVersionId}
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/plan-versions/get/{planVersionId}:
    get:
      tags:
        - planVersions
      summary: get plan version
      description: Get a plan version by id
      operationId: planVersions.get
      parameters:
        - schema:
            type: string
            description: The plan version id
            example: pv_1H7KQFLr7RepUyQBKdnvY
          required: true
          name: planVersionId
          in: path
      responses:
        '200':
          description: The result of the get plan version
          content:
            application/json:
              schema:
                type: object
                properties:
                  planVersion:
                    type: object
                    properties:
                      id:
                        type: string
                        maxLength: 36
                      projectId:
                        type: string
                        maxLength: 36
                      createdAtM:
                        type: number
                      updatedAtM:
                        type: number
                      planId:
                        type: string
                        maxLength: 36
                      description:
                        type: string
                      latest:
                        type: boolean
                        nullable: true
                      title:
                        type: string
                        maxLength: 50
                      tags:
                        type: array
                        nullable: true
                        items:
                          type: string
                        description: >-
                          Array of tags for categorizing and filtering plan
                          versions. Examples: ['popular', 'recommended',
                          'enterprise', 'startup']
                      active:
                        type: boolean
                        nullable: true
                      status:
                        type: string
                        nullable: true
                        enum:
                          - draft
                          - published
                      publishedAt:
                        type: number
                        nullable: true
                      publishedBy:
                        type: string
                        nullable: true
                        maxLength: 36
                      archived:
                        type: boolean
                        nullable: true
                      archivedAt:
                        type: number
                        nullable: true
                      archivedBy:
                        type: string
                        nullable: true
                        maxLength: 36
                      paymentProvider:
                        type: string
                        enum:
                          - stripe
                          - square
                          - sandbox
                      dueBehaviour:
                        type: string
                        enum:
                          - cancel
                          - downgrade
                      currency:
                        type: string
                        enum:
                          - USD
                          - EUR
                        description: >-
                          ISO 4217 currency code for this plan version.
                          Examples: 'USD', 'EUR'. Each plan version is tied to a
                          single currency
                      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: The billing configuration for the plan version
                      whenToBill:
                        type: string
                        enum:
                          - pay_in_advance
                          - pay_in_arrear
                      gracePeriod:
                        type: number
                      collectionMethod:
                        type: string
                        enum:
                          - charge_automatically
                          - send_invoice
                      trialUnits:
                        type: number
                      autoRenew:
                        type: boolean
                      metadata:
                        type: object
                        nullable: true
                        properties:
                          externalId:
                            type: string
                            description: >-
                              External identifier for integrating with
                              third-party systems (e.g., Stripe price ID).
                              Useful for syncing plan versions with external
                              billing providers
                        description: >-
                          Plan version metadata containing external integration
                          identifiers
                      paymentMethodRequired:
                        type: boolean
                      version:
                        type: number
                      plan:
                        type: object
                        properties:
                          id:
                            type: string
                            maxLength: 36
                          projectId:
                            type: string
                            maxLength: 36
                          createdAtM:
                            type: number
                          updatedAtM:
                            type: number
                          slug:
                            type: string
                          title:
                            type: string
                            description: Title of the plan
                          active:
                            type: boolean
                            nullable: true
                          description:
                            type: string
                          metadata:
                            type: object
                            nullable: true
                            properties:
                              externalId:
                                type: string
                                description: >-
                                  External identifier for integrating with
                                  third-party systems (e.g., Stripe product ID,
                                  HubSpot deal ID). Useful for syncing plans
                                  across platforms
                            description: >-
                              Plan metadata containing external integration
                              identifiers and custom data
                          defaultPlan:
                            type: boolean
                            nullable: true
                          enterprisePlan:
                            type: boolean
                            nullable: true
                        required:
                          - id
                          - projectId
                          - createdAtM
                          - updatedAtM
                          - slug
                          - title
                          - active
                          - description
                          - metadata
                          - defaultPlan
                          - enterprisePlan
                        description: The plan information
                      planFeatures:
                        type: array
                        items:
                          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
                            displayFeatureText:
                              type: string
                              description: The text you can use to show the clients
                            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
                              description: The feature information
                          required:
                            - id
                            - projectId
                            - createdAtM
                            - updatedAtM
                            - planVersionId
                            - type
                            - featureId
                            - featureType
                            - unitOfMeasure
                            - config
                            - billingConfig
                            - metadata
                            - order
                            - displayFeatureText
                            - feature
                        description: >-
                          Array of features with their pricing configurations
                          and display text for customer-facing UIs
                      flatPrice:
                        type: string
                        description: Flat price of the plan
                    required:
                      - id
                      - projectId
                      - createdAtM
                      - updatedAtM
                      - planId
                      - description
                      - latest
                      - title
                      - tags
                      - active
                      - status
                      - publishedAt
                      - publishedBy
                      - archived
                      - archivedAt
                      - archivedBy
                      - paymentProvider
                      - dueBehaviour
                      - currency
                      - billingConfig
                      - whenToBill
                      - gracePeriod
                      - collectionMethod
                      - trialUnits
                      - autoRenew
                      - metadata
                      - paymentMethodRequired
                      - version
                      - plan
                      - planFeatures
                      - flatPrice
                    description: >-
                      Complete API response schema for a plan version including
                      plan details, all features with display text, and
                      calculated pricing
                required:
                  - planVersion
        '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

````