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

# 查询费用规则列表

> 按子账户、是否已配置 Markup、状态等条件分页检索费用规则概览。列表返回当前版本的核心费率字段，可直接用于运营排查和后台展示。

## 概述

本页说明机构主商户分页检索子账户费用规则概览的接口。完整字段、请求体与响应示例由上方 OpenAPI 定义渲染。

## 说明

* 列表适合运营后台、排查与批量核对场景。
* 请求体主键名为 `pageNum` / `pageSize`，同时兼容 `page` / `page_size` 别名。
* 本接口使用 `X-GatePay-MerchantId` 标识主商户上下文，不使用 `X-GatePay-On-Behalf-Of`。


## OpenAPI

````yaml api-reference/version/100/cn/openapi/institution-fee-settings-openapi.json POST /rate/commission_rule/list
openapi: 3.1.0
info:
  title: GatePay 机构费用设置 API
  version: 1.0.0
  description: 说明机构主商户为子账户查询、创建、升级和分页检索收益分成（Markup）规则的专属接口。路径和业务字段保持原始设计，文档仅优化展示命名与结构。
servers:
  - url: https://openplatform.gateapi.io
    description: Production
security: []
tags:
  - name: Fee Settings
    description: 机构子账户 Markup 费用设置接口。
paths:
  /rate/commission_rule/list:
    post:
      tags:
        - Fee Settings
      summary: 查询费用规则列表
      description: 按子账户、是否已配置 Markup、状态等条件分页检索费用规则概览。列表返回当前版本的核心费率字段，可直接用于运营排查和后台展示。
      parameters:
        - $ref: '#/components/parameters/X-GatePay-Certificate-ClientId'
        - $ref: '#/components/parameters/X-GatePay-Signature'
        - $ref: '#/components/parameters/X-GatePay-Timestamp'
        - $ref: '#/components/parameters/X-GatePay-Nonce'
        - $ref: '#/components/parameters/X-GatePay-MerchantId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CommissionRuleListRequest'
            examples:
              default:
                summary: 请求示例
                value:
                  pageNum: 1
                  pageSize: 20
                  has_markup: true
                  status: EFFECTIVE
                  sub_merchant_id: '123456789'
      responses:
        '200':
          description: 成功响应。
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/StandardSuccessEnvelope_CommissionRuleListPage
              examples:
                success:
                  summary: 成功示例
                  value:
                    status: SUCCESS
                    code: '000000'
                    errorMessage: ''
                    data:
                      records:
                        - sub_merchant_id: '123456789'
                          has_markup: true
                          r_markup: 0.001
                          f_markup: 0
                          actual_rate:
                            r_total: 0.0035
                            f_total: 1
                          status: EFFECTIVE
                          effective_date: '2026-04-17 00:00:00'
                          due_date: null
                          updated_at: '2026-04-17T08:00:00Z'
                      total: 48
                      size: 20
                      current: 1
                      pages: 3
components:
  parameters:
    X-GatePay-Certificate-ClientId:
      name: X-GatePay-Certificate-ClientId
      in: header
      required: true
      description: 应用 ClientId。
      schema:
        type: string
      example: your_client_id
    X-GatePay-Signature:
      name: X-GatePay-Signature
      in: header
      required: true
      description: 使用 Payment API Secret 生成的 HMAC-SHA512 签名。
      schema:
        type: string
      example: generated_signature
    X-GatePay-Timestamp:
      name: X-GatePay-Timestamp
      in: header
      required: true
      description: UTC 毫秒时间戳。
      schema:
        type: string
      example: '1713433200000'
    X-GatePay-Nonce:
      name: X-GatePay-Nonce
      in: header
      required: true
      description: 随机字符串，用于防重放。
      schema:
        type: string
      example: fee-setting-001
    X-GatePay-MerchantId:
      name: X-GatePay-MerchantId
      in: header
      required: true
      description: 主商户 ID。该接口组通过此请求头声明当前机构主商户上下文。
      schema:
        type: string
      example: main_merchant_123456
  schemas:
    CommissionRuleListRequest:
      type: object
      properties:
        pageNum:
          type: integer
          description: 页码，默认 1。
          example: 1
        pageSize:
          type: integer
          description: 每页条数，默认 20，最大 100。
          example: 20
        has_markup:
          type: boolean
          description: 按是否已配置 Markup 过滤。
          example: true
        status:
          type: string
          enum:
            - EFFECTIVE
            - PENDING_EFFECTIVE
          description: 状态过滤。
        sub_merchant_id:
          type: string
          description: 精确筛选某一子账户。
          example: '123456789'
        page:
          type: integer
          description: 兼容别名：与 `pageNum` 等效。
          example: 1
        page_size:
          type: integer
          description: 兼容别名：与 `pageSize` 等效。
          example: 20
    StandardSuccessEnvelope_CommissionRuleListPage:
      type: object
      properties:
        status:
          $ref: '#/components/schemas/ApiEnvelopeStatus'
        code:
          type: string
          description: 业务结果码。
          example: '000000'
        errorMessage:
          type: string
          description: 错误信息；成功时为空字符串。
          example: ''
        data:
          $ref: '#/components/schemas/CommissionRuleListPage'
    ApiEnvelopeStatus:
      type: string
      description: 接口处理状态。
      enum:
        - SUCCESS
        - FAIL
    CommissionRuleListPage:
      type: object
      properties:
        records:
          type: array
          items:
            $ref: '#/components/schemas/CommissionRuleListItem'
          description: 当前页记录。
        total:
          type: integer
          description: 总条数。
          example: 48
        size:
          type: integer
          description: 每页条数。
          example: 20
        current:
          type: integer
          description: 当前页码。
          example: 1
        pages:
          type: integer
          description: 总页数。
          example: 3
    CommissionRuleListItem:
      type: object
      properties:
        sub_merchant_id:
          type: string
          description: 子账户 ID。
          example: '123456789'
        has_markup:
          type: boolean
          description: 是否已配置 Markup。
          example: true
        r_markup:
          type: number
          nullable: true
          description: 百分比 Markup；未配置时可为 `null`。
          example: 0.001
        f_markup:
          type: number
          nullable: true
          description: 固定额 Markup；未配置时可为 `null`。
          example: 0
        status:
          type: string
          description: 规则状态。
          enum:
            - EFFECTIVE
            - PENDING_EFFECTIVE
        effective_date:
          type: string
          description: 当前版本生效时间，格式 `yyyy-MM-dd HH:mm:ss`。
          example: '2026-04-17 00:00:00'
        due_date:
          type: string
          nullable: true
          description: 当前版本失效时间；长期有效为 `null`。
          example: null
        updated_at:
          type: string
          description: 最后更新时间，ISO8601。
          example: '2026-04-17T08:00:00Z'

````