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

# Retrieve a plan

> Fetches a plan by identifier. Pass `?version=N` to fetch a specific version; otherwise the latest version is returned.

> [!NOTE]
>
> Click the base URL in the API playground and select the **Sandbox** host for test data or the **Production** host for live data. Use credentials from the same environment.


## OpenAPI

````yaml /api-reference/openapi.json get /catalog/plans/{identifier}/
openapi: 3.0.0
info:
  title: kelviq API
  version: 1.0.0
  description: >-
    API for interacting with kelviq services, derived from Python SDK
    documentation.
servers:
  - url: https://sandboxapi.kelviq.com/api/v1
    description: Sandbox — Test payments
  - url: https://api.kelviq.com/api/v1
    description: Production — Live payments
security:
  - bearerAuth: []
tags:
  - name: Products
    description: Catalog products.
  - name: Product Settings
    description: Per-product settings (currency, VPN/Tor/proxy, product URL).
  - name: Product Files
    description: Product images and downloadable assets.
  - name: Features
    description: Catalog features that can be granted as plan entitlements.
  - name: Plans
    description: Catalog plans (CRUD, publish, versions, prices).
  - name: Plan Entitlements
    description: Feature entitlements attached to a plan.
  - name: Plan Files
    description: Files attached to plans, and signed download links.
  - name: Media
    description: Generate presigned S3 upload URLs for product/plan images and files.
  - name: Partner
    description: Partner integration APIs (organization provisioning, lookup).
  - name: Charges
    description: >-
      One-time payments charged immediately against a customer's default payment
      method.
  - name: Refunds
    description: Full and partial refunds for paid orders.
  - name: Transactions
    description: >-
      Charges, refunds, disputes, and other financial movements for the
      authenticated organization.
  - name: Payment Methods
    description: Saved customer payment methods (cards, etc.).
  - name: Orders
    description: Completed and resolved orders for the authenticated organization.
  - name: Order Events
    description: Timeline events for a specific order.
  - name: Invoices
    description: Invoices generated for orders and subscription billing cycles.
  - name: Discounts
    description: >-
      Discount codes (coupons) that can be applied to products and plans at
      checkout.
  - name: Webhook Endpoints
    description: >-
      Configure the destination URLs and event subscriptions that receive
      webhook deliveries.
  - name: Webhooks
    description: Delivery logs for webhook events sent to your configured endpoints.
  - name: Checkout Sessions
    description: Merchant-side view of checkout sessions created by customers.
  - name: Checkout Session Events
    description: Timeline events for a specific checkout session.
paths:
  /catalog/plans/{identifier}/:
    parameters:
      - name: identifier
        in: path
        required: true
        description: Plan identifier (slug). Stable across versions.
        example: pro-monthly
        schema:
          type: string
      - name: version
        in: query
        required: false
        description: >-
          Specific version number to fetch / update. Defaults to the latest
          version.
        example: 2
        schema:
          type: integer
    get:
      tags:
        - Plans
      summary: Retrieve a plan
      description: >-
        Fetches a plan by identifier. Pass `?version=N` to fetch a specific
        version; otherwise the latest version is returned.
      operationId: retrieveCatalogPlan
      responses:
        '200':
          description: Plan details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CatalogPlan'
        '401':
          description: Unauthorized — missing or invalid API key
        '404':
          description: Plan not found.
      security:
        - bearerAuth: []
components:
  schemas:
    CatalogPlan:
      type: object
      description: >-
        A versioned plan attached to a product. Updates create new versions;
        only the published version is `is_latest=true`.
      properties:
        identifier:
          type: string
          description: URL-safe slug. Stable across versions.
          example: pro-monthly
        name:
          type: string
          example: Pro Monthly
        description:
          type: string
          example: Pro tier billed monthly.
        product:
          type: string
          format: uuid
          description: UUID of the parent product.
          example: 0d65f7c0-7e91-4f56-9b32-13a9a6a7c1de
        metadata:
          type: object
          additionalProperties: true
          example: {}
        version:
          type: integer
          readOnly: true
          example: 3
        isLatest:
          type: boolean
          readOnly: true
          description: True only for the currently published version.
          example: true
        modifiedOn:
          type: string
          format: date-time
          readOnly: true
          example: '2025-04-12T08:21:14.910Z'
        createdOn:
          type: string
          format: date-time
          readOnly: true
          example: '2025-03-01T08:21:14.910Z'
        details:
          type: object
          readOnly: true
          additionalProperties: true
          description: Provider-side identifiers.
          example:
            stripeProductId: prod_ABC123
        isVisible:
          type: boolean
          example: true
        isImported:
          type: boolean
          readOnly: true
          example: false
        countries:
          type: array
          readOnly: true
          items:
            type: string
          example:
            - US
            - IN
        license:
          $ref: '#/components/schemas/LicenseConfig'
        links:
          type: array
          items:
            $ref: '#/components/schemas/PlanLink'
        files:
          type: array
          readOnly: true
          items:
            $ref: '#/components/schemas/PlanFile'
        ordering:
          type: integer
          nullable: true
          example: 1
    LicenseConfig:
      type: object
      description: License configuration for a plan (used when issuing license keys).
      properties:
        enabled:
          type: boolean
          example: true
        activationLimit:
          type: integer
          minimum: 1
          example: 3
        activationLimitEnabled:
          type: boolean
          example: true
        durationUnit:
          type: string
          enum:
            - DAY
            - MONTH
            - YEAR
          example: YEAR
        durationValue:
          type: integer
          minimum: 1
          example: 1
        hasExpiry:
          type: boolean
          example: true
    PlanLink:
      type: object
      properties:
        name:
          type: string
          example: Product page
        url:
          type: string
          format: uri
          example: https://example.com/product
    PlanFile:
      type: object
      properties:
        id:
          type: string
          format: uuid
          readOnly: true
          example: bf9f0fe0-c9c0-436d-8811-e412d0365470
        name:
          type: string
          example: custom-pricinig.png
        ordering:
          type: integer
          example: 0
        enabled:
          type: boolean
          example: true
        downloadUrl:
          type: string
          format: uri
          readOnly: true
          description: >-
            URL clients can hit to download the file. Carries a signed token and
            expires 24 hours after it was generated; requesting a fresh copy of
            the plan/subscription issues a new link.
          example: >-
            https://api.kelviq.com/api/v1/catalog/plans/10-july/file/bf9f0fe0-c9c0-436d-8811-e412d0365470/download/?token=Yjk5ZjBmZTAtYzljMC00MzZkLTg4MTEtZTQxMmQwMzY1NDcw%3A1v2Abc%3Ahash
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        The Server API Key obtained from the kelviq application. Pass as a
        Bearer token in the Authorization header. Example: 'Authorization:
        Bearer __YOUR_API_KEY__'

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.