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

# 查询定价方案版本列表

> 查询定价方案版本列表



## OpenAPI

````yaml openapi/v1-zh.yaml GET /api/v1/prices/version
openapi: 3.0.3
info:
  title: Subotiz API
  description: Subotiz OpenAPI
  version: 1.0.0
servers:
  - url: https://{api}.subotiz.com
    variables:
      api:
        default: api
security:
  - sec0: []
tags:
  - name: 折扣
    description: 折扣
  - name: 发票
    description: 发票
  - name: 退款
    description: 退款
  - name: 商品管理
    description: 商品管理
  - name: 订阅
    description: 订阅
  - name: 商品定价
    description: 商品定价方案
  - name: 交易单
    description: 交易单
  - name: 支付流水
    description: 支付流水
  - name: 结账会话
    description: 结账会话
  - name: 顾客
    description: 顾客
  - name: 顾客门户
    description: 顾客门户
  - name: Webhook
    description: Webhook
  - name: 争议
    description: 争议订单
paths:
  /api/v1/prices/version:
    get:
      tags:
        - 商品定价
      summary: 查询定价方案版本列表
      description: 查询定价方案版本列表
      operationId: v1-price-list-price-version
      parameters:
        - name: price_version_ids
          in: query
          description: 按定价方案版本 ID 筛选，集合大小限制 [0,100]
          schema:
            type: array
            items:
              type: string
        - name: status
          in: query
          description: |-
            按状态筛选
             - draft：草稿
             - active：已激活
             - frozen：已冻结
          schema:
            type: string
        - name: starting_after
          in: query
          description: >-
            分页游标。starting_after 为定义在列表中位置的对象 ID；获取下一页时，可在首次获取列表后使用最后一个对象的 ID。不可与
            ending_before 同时使用
          schema:
            type: string
        - name: ending_before
          in: query
          description: >-
            分页游标。ending_before 为定义在列表中位置的对象 ID；获取上一页时，可在首次获取列表后使用第一个对象的 ID。不可与
            starting_after 同时使用
          schema:
            type: string
        - name: limit
          in: query
          description: 分页参数，接口默认按创建时间倒序排序。限制：[1, 100]
          schema:
            type: integer
            format: int32
        - name: product_id
          in: query
          description: 按商品 ID 筛选
          schema:
            type: string
        - $ref: '#/components/parameters/HeaderRequestID'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListPricesVersionResponse'
components:
  parameters:
    HeaderRequestID:
      name: Request-Id
      in: header
      description: 请求的唯一标识符
      required: true
      schema:
        type: string
        default: 008e3967-a1b5-48bb-be14-d5bff5092e61
  schemas:
    ListPricesVersionResponse:
      type: object
      properties:
        code:
          type: string
          description: error code
        message:
          type: string
          description: error message
        data:
          $ref: '#/components/schemas/ListPricesVersionResponse_Data'
    ListPricesVersionResponse_Data:
      type: object
      properties:
        has_more:
          type: boolean
          description: 是否有更多数据
        list:
          type: array
          items:
            $ref: '#/components/schemas/PriceVersion'
          description: 定价信息记录列表
    PriceVersion:
      type: object
      properties:
        id:
          type: string
          description: 定价方案 ID
        price_name:
          type: string
          description: 定价方案名称
        price_alias:
          type: string
          description: 定价方案别名
        product_id:
          type: string
          description: 关联商品ID
        merchant_id:
          type: string
          description: 商户ID
        currency:
          type: string
          description: 币种
        billing_type:
          type: string
          description: 计费类型：one_time-一次性、recurring-周期性
        price_val:
          type: string
          description: 一次性付费价格，billing_type为one_time时必填
        description:
          type: string
          description: 定价描述
        price_plan:
          allOf:
            - $ref: '#/components/schemas/PricePlan'
          description: 定价计划
        biz_status:
          type: string
          description: 状态：draft-草稿、active-已激活、frozen-已冻结
        has_trial:
          type: boolean
          description: 是否启用试用期：0-否、1-是
        trial_period:
          allOf:
            - $ref: '#/components/schemas/TrialPeriod'
          description: 试用期配置
        created_at:
          type: string
          description: 创建时间
        price_type:
          type: string
          description: 定价模型
        usage_amount:
          type: string
          description: 资源包用量
        usage_unit:
          type: string
          description: 资源包用量单位
        model_type:
          type: string
          description: 定价模型二级类型
        billing_threshold:
          type: string
          description: 扣费金额阈值
        trial_type:
          type: integer
          description: |-
            试用类型
             - 0: 免费试用
             - 1: 付费试用
          format: int32
        trial_amount:
          type: string
          description: 试用价格
        metadata:
          type: object
          additionalProperties:
            type: string
          description: 一组可附加到对象上的键值对，允许您以结构化格式存储附加信息。
        price_version_id:
          type: string
          description: 定价方案版本 ID
        product_version_id:
          type: string
          description: 商品版本 ID
    PricePlan:
      type: object
      properties:
        price_plan_id:
          type: string
        plan_name:
          type: string
        billing_cycle_unit:
          type: string
        billing_cycle_count:
          type: integer
          format: int32
        is_infinite:
          type: boolean
        base_price_val:
          type: string
        plan_description:
          type: string
        price_plan_tiers:
          type: array
          items:
            $ref: '#/components/schemas/PricePlanTier'
      description: 价格计划
    TrialPeriod:
      type: object
      properties:
        trial_period_unit:
          type: string
          description: 试用期单位，必填，如：day、week、month等
        trial_period_count:
          type: integer
          description: 试用期数量，必填，如：7天、1个月等
          format: int32
      description: TrialPeriod - 试用期配置
    PricePlanTier:
      type: object
      properties:
        period_count:
          type: integer
          format: int32
        period_unit:
          type: string
        original_price:
          type: string
        due_price:
          type: string
        discount_type:
          type: string
        discount_value:
          type: string
      description: 价格计划层级
  securitySchemes:
    sec0:
      type: http
      description: 'Bearer API Key 鉴权。格式：Authorization: Bearer {your_api_key}'
      scheme: bearer

````