**版本：202607**

# 查询折扣列表

**GET** `/openapi/2026-07/discounts`

根据查询参数返回折扣活动列表。

## 请求

**Query参数**

- `cursor` string

  分页游标，使用上次响应中的游标获取下一页
- `page_size` int32

  返回对象数量限制，范围 1-250，默认 10
- `page` int32

  页码（从 1 开始），与 cursor 互斥
- `discount_name` string

  折扣名称模糊匹配关键词
- `discount_type` string[]

  折扣类型（过滤条件）。

  *   rebate\_cta\_otr: 满额固定减免。
  *   rebate\_ctq\_otr: 满量固定减免。
  *   rebate\_cta\_otp: 满额百分比折扣。
  *   rebate\_ctq\_otp: 满量百分比折扣。
  *   m\_n\_discount: M 件 N 折。
  *   flashsale: 限时特卖。
  *   code\_percent: 折扣码百分比折扣。
  *   code\_fix\_price\_reduction: 折扣码固定减免。
  *   code\_bxgy: 折扣码买 X 送 Y。
  *   code\_free\_shipping: 折扣码免运费。 示例：?discount\_type=rebate\_cta\_otr&discount\_type=rebate\_ctq\_otr
- `progress` string[]

  折扣进度（过滤条件）。

  *   ongoing: 进行中。
  *   not\_started: 未开始。
  *   finished: 已结束。
  *   paused: 已暂停。 示例：?progress=ongoing&progress=finished
- `starts_date` string

  时间范围过滤的下限，格式为 "2006-01-02 15:04:05"
- `ends_date` string

  时间范围过滤的上限，格式为 "2006-01-02 15:04:05"
- `discount_code` string

  折扣码匹配
- `discount_methods` string[]

  折扣方式（过滤条件）。

  *   automatic: 自动应用。
  *   discount\_code: 折扣码触发。 示例：?discount\_methods=automatic&discount\_methods=discount\_code
- `ids` string[]

  折扣 ID 列表（过滤条件）。 示例：?ids=1001&ids=1002
- `discount_targets` string[]

  折扣目标（过滤条件）。

  *   product: 商品折扣。
  *   order: 订单折扣。
  *   shipping: 运费折扣。 示例：?discount\_targets=product&discount\_targets=order
- `source_ids` string[]

  来源 ID 列表（过滤条件）。

  *   1: 手动创建。
  *   2: Goaffpro Affiliate Marketing。
  *   3: 点睛。
  *   4: MambaSMS SMS & Marketing。
  *   5: Stamped Loyalty & Referrals。
  *   6: 商品推荐。
  *   999: 其它。 示例：?source\_ids=3001&source\_ids=3002
- `discount_combines` string[]

  可叠加的折扣类别。

  *   product: 可与商品折扣叠加。
  *   order: 可与订单折扣叠加。
  *   shipping: 可与运费折扣叠加。 示例：?discount\_combines=product&discount\_combines=shipping

## 响应

**200**

OK

**application/json**

**数据结构 | 示例**

**数据结构**

- `code` string

  错误码
- `message` string

  错误信息
- `data` object

  - `discounts` object[]

    折扣列表

    *   Array \[

    - `id` string

      折扣 ID
    - `discount_name` string

      折扣名称
    - `display_name` string

      店铺前台展示名称
    - `discount_target` string

      折扣目标类别：

      *   `product`: 商品折扣
      *   `order`: 订单折扣
      *   `shipping`: 运费折扣
    - `discount_type` string

      折扣类型：

      *   `rebate_cta_otr`: 满额固定减免
      *   `rebate_ctq_otr`: 满量固定减免
      *   `rebate_cta_otp`: 满额百分比折扣
      *   `rebate_ctq_otp`: 满量百分比折扣
      *   `m_n_discount`: M 换 N 折扣
      *   `flashsale`: 限时特卖折扣
      *   `code_percent`: 折扣码百分比折扣
      *   `code_fix_price_reduction`: 折扣码固定减免
      *   `code_bxgy`: 折扣码买 X 赠 Y
      *   `code_free_shipping`: 折扣码免运费
    - `discount_method` string

      折扣方式：

      *   `automatic`: 自动应用
      *   `discount_code`: 折扣码触发
    - `discount_code` string

      折扣码
    - `progress` string

      当前进度状态：

      *   `ongoing`: 进行中
      *   `not_started`: 未开始
      *   `finished`: 已结束
      *   `paused`: 已暂停
    - `starts_at` int32

      开始时间
    - `ends_at` int32

      结束时间
    - `created_at` string

      创建时间（ISO-8601 格式）
    - `updated_at` string

      最后更新时间（ISO-8601 格式）
    - `discount_layer` object

      层级

      - `condition_type` string

        条件类型：

        *   `no_condition`: 无条件限制
        *   `purchase_quantity`: 需满足购买数量
        *   `purchase_amount`: 需满足购买金额
      - `obtain_type` string

        领取类型：

        *   `no_discount`: 无折扣
        *   `free_acquisition`: 免费领取
        *   `percent`: 百分比折扣
        *   `fixed_price_reduction`: 固定金额减免
        *   `fixed_price`: 固定最终价格
        *   `fixed_quantity`: 固定数量领取
        *   `product_price_reduction`: 商品级价格减免
      - `layers` object[]

        层级列表

        *   Array \[

        - `condition_value` string

          条件值
        - `obtain_value` string

          领取值
        - `obtain_count` uint32

          领取数量
        *   \]
    - `discount_rule` object

      折扣规则

      - `limit_max_discount` int32

        折扣最大使用次数，-1 表示不限
      - `limit_user_discount` int32

        每位顾客最大使用次数，-1 表示不限
      - `limit_order_discount` int32

        每笔订单最大使用次数，-1 表示不限
      - `limit_user_product_type` string

        每用户商品类型折扣上限：

        *   `no_limit`: 不限制商品购买量
        *   `customer_all_product`: 每用户每折扣，所有符合条件的规格累计
        *   `customer_product`: 每用户每折扣每商品
        *   `customer_variant`: 每用户每折扣每规格
      - `limit_user_product_discount` int32

        每用户每商品折扣上限
      - `stock` int32

        库存数量
      - `follow_stock` string

        活动库存是否跟随商品库存：

        *   `product`: 同商品库存
        *   `discount`: 设置活动库存
      - `virtual_sales` int32

        虚拟销量
      - `price_rule` string

        价格规则：

        *   `price`: 使用销售价格
        *   `compare_at_price`: 使用划线价/原始价格
      - `extends` string

        扩展列表
      - `product_discount_order` string

        商品折扣排序：

        *   `desc`: 按商品价格降序应用
        *   `asc`: 按商品价格升序应用
      - `discount_combines` string[]

        折扣叠加配置列表：

        *   `product`: 可与商品折扣叠加
        *   `order`: 可与订单折扣叠加
        *   `shipping`: 可与运费折扣叠加
      - `obtain_full` boolean

        是否已满额领取
      - `mn_discount_scope` string

        多层折扣评估的范围策略：

        *   `highest`: 仅应用最高匹配层
        *   `all`: 应用所有匹配层
        *   `highest_all`: 应用所有匹配层；超出最高层的数量按最高层优惠处理
      - `limit_code_max_discount` int32

        每个折扣码最大使用次数，-1 表示不限。仅适用于非自动折扣
      - `limit_code_user_discount` int32

        每位顾客每个折扣码最大使用次数，仅适用于非自动折扣
      - `enable_product_extends` boolean

        是否启用商品扩展信息
    - `entitled_product` object

      授权商品

      - `product_ids` string[]

        商品 ID 列表
      - `variant_ids` string[]

        规格 ID 列表
      - `collection_ids` string[]

        集合 ID 列表
      - `sort` object

        排序配置

        - `by` string

          排序字段
        - `direction` string

          排序方向
        - `before` string

          时间排序起始值（单位：秒），用于兼容旧版限时特卖
      - `selection` string

        商品范围选择策略：

        *   `entitled`: 仅包含授权商品
        *   `exclude`: 排除授权商品
        *   `all`: 包含全部商品
      - `sku_extends` object

        规格扩展配置，以规格 ID 为键

        - `property name*` SkuExtendResp

          - `obtain_value` string

            领取值
          - `min_purchase_qty` uint32

            最小购买数量
          - `seq` uint32

            序列号
          - `virtual_sales` int32

            虚拟销量
          - `follow_stock` string

            活动库存是否跟随商品库存：

            *   `product`: 同商品库存
            *   `discount`: 设置活动库存
          - `stock` int32

            库存数量
          - `collection_id` string

            集合 ID
    - `entitled_customer` object

      授权顾客

      - `customer_ids` string[]

        顾客 ID 列表
      - `customer_segment_ids` string[]

        顾客分组 ID 列表
    - `obtain_product` object

      领取商品

      - `product_ids` string[]

        商品 ID 列表
      - `variant_ids` string[]

        规格 ID 列表
      - `collection_ids` string[]

        集合 ID 列表
      - `sort` object

        排序配置

        - `by` string

          排序字段
        - `direction` string

          排序方向
        - `before` string

          时间排序起始值（单位：秒），用于兼容旧版限时特卖
      - `selection` string

        商品范围选择策略：

        *   `entitled`: 仅包含授权商品
        *   `exclude`: 排除授权商品
        *   `all`: 包含全部商品
      - `sku_extends` object

        规格扩展配置，以规格 ID 为键

        - `property name*` SkuExtendResp

          - `obtain_value` string

            领取值
          - `min_purchase_qty` uint32

            最小购买数量
          - `seq` uint32

            序列号
          - `virtual_sales` int32

            虚拟销量
          - `follow_stock` string

            活动库存是否跟随商品库存：

            *   `product`: 同商品库存
            *   `discount`: 设置活动库存
          - `stock` int32

            库存数量
          - `collection_id` string

            集合 ID
    - `entitled_area` object

      授权地区

      - `areas` object[]

        地区列表

        *   Array \[

        - `country_code` string

          国家代码（如 CN）
        - `province_codes` string[]

          省份代码列表
        *   \]
    - `source_name` string

      来源名称
    - `starts_date` string

      开始日期
    - `ends_date` string

      结束日期
    - `state` string

      营销活动状态：

      *   `valid`: 有效
      *   `deleted`: 已删除
      *   `canceled`: 提前取消
    *   \]
  - `cursor` string

    分页游标
  - `has_more` boolean

    是否有更多记录
  - `total_count` int32

    记录总数

```json
{
  "code": "string",
  "message": "string",
  "data": {
    "discounts": [
      {
        "id": "string",
        "discount_name": "string",
        "display_name": "string",
        "discount_target": "string",
        "discount_type": "string",
        "discount_method": "string",
        "discount_code": "string",
        "progress": "string",
        "starts_at": 0,
        "ends_at": 0,
        "created_at": "string",
        "updated_at": "string",
        "discount_layer": {
          "condition_type": "string",
          "obtain_type": "string",
          "layers": [
            {
              "condition_value": "string",
              "obtain_value": "string",
              "obtain_count": 0
            }
          ]
        },
        "discount_rule": {
          "limit_max_discount": 0,
          "limit_user_discount": 0,
          "limit_order_discount": 0,
          "limit_user_product_type": "string",
          "limit_user_product_discount": 0,
          "stock": 0,
          "follow_stock": "string",
          "virtual_sales": 0,
          "price_rule": "string",
          "extends": "string",
          "product_discount_order": "string",
          "discount_combines": [
            "string"
          ],
          "obtain_full": true,
          "mn_discount_scope": "string",
          "limit_code_max_discount": 0,
          "limit_code_user_discount": 0,
          "enable_product_extends": true
        },
        "entitled_product": {
          "product_ids": [
            "string"
          ],
          "variant_ids": [
            "string"
          ],
          "collection_ids": [
            "string"
          ],
          "sort": {
            "by": "string",
            "direction": "string",
            "before": "string"
          },
          "selection": "string",
          "sku_extends": {}
        },
        "entitled_customer": {
          "customer_ids": [
            "string"
          ],
          "customer_segment_ids": [
            "string"
          ]
        },
        "obtain_product": {
          "product_ids": [
            "string"
          ],
          "variant_ids": [
            "string"
          ],
          "collection_ids": [
            "string"
          ],
          "sort": {
            "by": "string",
            "direction": "string",
            "before": "string"
          },
          "selection": "string",
          "sku_extends": {}
        },
        "entitled_area": {
          "areas": [
            {
              "country_code": "string",
              "province_codes": [
                "string"
              ]
            }
          ]
        },
        "source_name": "string",
        "starts_date": "string",
        "ends_date": "string",
        "state": "string"
      }
    ],
    "cursor": "string",
    "has_more": true,
    "total_count": 0
  }
}
```
