**版本：202201**

# 查询优惠券列表

**GET** `/openapi/2022-01/coupons`

分页获取系统中可用的优惠券列表。

## 请求

**Query参数**

- `page` int32

  Page number
- `limit` int32

  Limit count per page
- `progress` string

  按优惠券进度筛选。

  *   not_started: 未开始。
  *   ongoing: 进行中。
  *   finished: 已结束。
- `type` string

  按优惠券类型筛选。

  *   fixed_amount: 固定金额折扣。
  *   percentage: 百分比折扣。
  *   voucher: 代金券。
- `keywords` string

  Search coupons' title

## 响应

**200**

200

**application/json**

**数据结构 | 示例 | Result**

**数据结构**

- `page` integer

  **默认值：** `0`

  **示例：** `0`
- `limit` integer

  **默认值：** `0`

  **示例：** `10`
- `total` integer

  **默认值：** `0`

  **示例：** `2`
- `data` object[]

  *   Array [

  - `id` string

    **示例：** `202314454241654711`
  - `store_id` integer

    **默认值：** `0`

    **示例：** `11218`
  - `life_cycle_type` string

    **示例：** `begin_end`
  - `survival_time` integer

    **默认值：** `0`

    **示例：** `86400`
  - `starts_at` integer

    **默认值：** `0`

    **示例：** `1673246985`
  - `ends_at` integer

    **默认值：** `0`

    **示例：** `-1`
  - `status` integer

    **默认值：** `0`

    **示例：** `0`
  - `discount_type` string

    **示例：** `percentage`
  - `value_type` string

    **示例：** `percentage`
  - `value` string

    **示例：** `10`
  - `usage_limit` integer

    **默认值：** `0`

    **示例：** `-1`
  - `once_per_customer` integer

    **默认值：** `0`

    **示例：** `0`
  - `title` string

    **示例：** `coupon1`
  - `stock` integer

    **默认值：** `0`

    **示例：** `0`
  - `code` string

    **示例：**
  - `prerequisite` integer

    **默认值：** `0`

    **示例：** `0`
  - `is_admin_show` integer

    **默认值：** `0`

    **示例：** `0`
  - `target_selection` string

    **示例：** `all`
  - `progress` string

    **示例：** `ongoing`
  - `using_state` string

    **示例：**
  - `allocation_limit_amount` string

    **示例：** `0`
  - `entitled_area_list` array
  - `prerequisite_quantity_range` object[]

    *   Array [

    - `greater_than_or_equal_to` string

      **示例：**
    - `value` string

      **示例：**
    - `value_condition` string

      **示例：**
    - `target_type` string

      **示例：**
    - `target_data`
    - `target_data_variant`
    - `target_data_collection`
    *   ]
  - `prerequisite_subtotal_range` object[]

    *   Array [

    - `greater_than_or_equal_to` string

      **示例：**
    - `value` string

      **示例：**
    - `value_condition` string

      **示例：**
    - `target_type` string

      **示例：**
    - `target_data`
    - `target_data_variant`
    - `target_data_collection`
    *   ]
  - `entitled_product_ids` array
  - `entitled_variant_ids` array
  - `entitled_sort` array
  - `times_used` integer

    **默认值：** `0`

    **示例：** `1`
  - `sort` object

    - `by` string

      **示例：** `sales`
    - `direction` string

      **示例：** `desc`
  - `use_with_other` integer

    **默认值：** `0`

    **示例：** `0`
  - `prerequisite_customer_ids` array
  - `prerequisite_customer_segment_ids` array
  - `config` object

    - `banner_url` string

      **示例：**
    - `banner_size` string

      **示例：**
    - `count_down` object

      - `show_count_down` boolean

        **默认值：** `true`

        **示例：** `false`
      - `format` string

        **示例：**
      - `background_color_start` string

        **示例：**
      - `background_color_end` string

        **示例：**
      - `color` string

        **示例：**
      - `count_down_background_color` string

        **示例：**
      - `count_down_color` string

        **示例：**
      - `detail_page_show_code` boolean

        **默认值：** `true`

        **示例：** `false`
  - `allocation_method` string

    **示例：**
  - `allocation_limit` integer

    **默认值：** `0`

    **示例：** `0`
  - `customer_selection` string

    **示例：**
  - `entitled_collection_ids` array
  - `tips` object

    - `msg` string

      **示例：**
    - `countdown` string

      **示例：**
    - `countdown_day` string

      **示例：**
    - `use_code` string

      **示例：**
    - `copy_code` string

      **示例：**
  - `entitled_extra_list`
  - `prerequisite_customer_range`
  - `buysPrerequisiteValue` integer

    **默认值：** `0`

    **示例：** `0`
  - `getsMaxOrderUseValue` integer

    **默认值：** `0`

    **示例：** `0`
  - `getsDiscountValue` integer

    **默认值：** `0`

    **示例：** `0`
  - `only_valid_first_order_customer` boolean

    **默认值：** `true`

    **示例：** `false`
  *   ]

```json
{
  "page": 0,
  "limit": 10,
  "total": 2,
  "data": [
    {
      "id": "202314454241654711",
      "store_id": 11218,
      "life_cycle_type": "begin_end",
      "survival_time": 86400,
      "starts_at": 1673246985,
      "ends_at": -1,
      "status": 0,
      "discount_type": "percentage",
      "value_type": "percentage",
      "value": "10",
      "usage_limit": -1,
      "once_per_customer": 0,
      "title": "coupon1",
      "stock": 0,
      "code": "",
      "prerequisite": 0,
      "is_admin_show": 0,
      "target_selection": "all",
      "progress": "ongoing",
      "using_state": "",
      "allocation_limit_amount": "0",
      "entitled_area_list": [
        null
      ],
      "prerequisite_quantity_range": [
        {
          "greater_than_or_equal_to": "",
          "value": "",
          "value_condition": "",
          "target_type": "",
          "target_data": {},
          "target_data_variant": {},
          "target_data_collection": {}
        }
      ],
      "prerequisite_subtotal_range": [
        {
          "greater_than_or_equal_to": "",
          "value": "",
          "value_condition": "",
          "target_type": "",
          "target_data": {},
          "target_data_variant": {},
          "target_data_collection": {}
        }
      ],
      "entitled_product_ids": [
        null
      ],
      "entitled_variant_ids": [
        null
      ],
      "entitled_sort": [
        null
      ],
      "times_used": 1,
      "sort": {
        "by": "sales",
        "direction": "desc"
      },
      "use_with_other": 0,
      "prerequisite_customer_ids": [
        null
      ],
      "prerequisite_customer_segment_ids": [
        null
      ],
      "config": {
        "banner_url": "",
        "banner_size": "",
        "count_down": {
          "show_count_down": false,
          "format": "",
          "background_color_start": "",
          "background_color_end": "",
          "color": "",
          "count_down_background_color": "",
          "count_down_color": "",
          "detail_page_show_code": false
        }
      },
      "allocation_method": "",
      "allocation_limit": 0,
      "customer_selection": "",
      "entitled_collection_ids": [
        null
      ],
      "tips": {
        "msg": "",
        "countdown": "",
        "countdown_day": "",
        "use_code": "",
        "copy_code": ""
      },
      "entitled_extra_list": {},
      "prerequisite_customer_range": {},
      "buysPrerequisiteValue": 0,
      "getsMaxOrderUseValue": 0,
      "getsDiscountValue": 0,
      "only_valid_first_order_customer": false
    }
  ]
}
```

```json
{
    "page": 0,
    "limit": 10,
    "total": 2,
    "data": [
        {
            "id": "202314454241654711",
            "store_id": 11218,
            "life_cycle_type": "begin_end",
            "survival_time": 86400,
            "starts_at": 1673246985,
            "ends_at": -1,
            "status": 0,
            "discount_type": "percentage",
            "value_type": "percentage",
            "value": "10",
            "usage_limit": -1,
            "once_per_customer": 0,
            "title": "coupon1",
            "stock": 0,
            "code": "",
            "prerequisite": 0,
            "is_admin_show": 0,
            "target_selection": "all",
            "progress": "ongoing",
            "using_state": "",
            "allocation_limit_amount": "0",
            "entitled_area_list": [],
            "prerequisite_quantity_range": [
                {
                    "greater_than_or_equal_to": "",
                    "value": "",
                    "value_condition": "",
                    "target_type": "",
                    "target_data": null,
                    "target_data_variant": null,
                    "target_data_collection": null
                }
            ],
            "prerequisite_subtotal_range": [
                {
                    "greater_than_or_equal_to": "",
                    "value": "",
                    "value_condition": "",
                    "target_type": "",
                    "target_data": null,
                    "target_data_variant": null,
                    "target_data_collection": null
                }
            ],
            "entitled_product_ids": [],
            "entitled_variant_ids": [],
            "entitled_sort": [],
            "times_used": 1,
            "sort": {
                "by": "sales",
                "direction": "desc"
            },
            "use_with_other": 0,
            "prerequisite_customer_ids": [],
            "prerequisite_customer_segment_ids": [],
            "config": {
                "banner_url": "",
                "banner_size": "",
                "count_down": {
                    "show_count_down": false,
                    "format": "",
                    "background_color_start": "",
                    "background_color_end": "",
                    "color": "",
                    "count_down_background_color": "",
                    "count_down_color": "",
                    "detail_page_show_code": false
                }
            },
            "allocation_method": "",
            "allocation_limit": 0,
            "customer_selection": "",
            "entitled_collection_ids": [],
            "tips": {
                "msg": "",
                "countdown": "",
                "countdown_day": "",
                "use_code": "",
                "copy_code": ""
            },
            "entitled_extra_list": null,
            "prerequisite_customer_range": null,
            "buysPrerequisiteValue": 0,
            "getsMaxOrderUseValue": 0,
            "getsDiscountValue": 0,
            "only_valid_first_order_customer": false
        },
        {
            "id": "202310134632812624",
            "store_id": 11218,
            "life_cycle_type": "begin_end",
            "survival_time": 86400,
            "starts_at": 1673246985,
            "ends_at": -1,
            "status": 0,
            "discount_type": "percentage",
            "value_type": "percentage",
            "value": "10",
            "usage_limit": -1,
            "once_per_customer": 0,
            "title": "coupon2",
            "stock": 0,
            "code": "",
            "prerequisite": 0,
            "is_admin_show": 0,
            "target_selection": "all",
            "progress": "ongoing",
            "using_state": "",
            "allocation_limit_amount": "0",
            "entitled_area_list": [],
            "prerequisite_quantity_range": [
                {
                    "greater_than_or_equal_to": "",
                    "value": "",
                    "value_condition": "",
                    "target_type": "",
                    "target_data": null,
                    "target_data_variant": null,
                    "target_data_collection": null
                }
            ],
            "prerequisite_subtotal_range": [
                {
                    "greater_than_or_equal_to": "",
                    "value": "",
                    "value_condition": "",
                    "target_type": "",
                    "target_data": null,
                    "target_data_variant": null,
                    "target_data_collection": null
                }
            ],
            "entitled_product_ids": [],
            "entitled_variant_ids": [],
            "entitled_sort": [],
            "times_used": 0,
            "sort": {
                "by": "sales",
                "direction": "desc"
            },
            "use_with_other": 0,
            "prerequisite_customer_ids": [],
            "prerequisite_customer_segment_ids": [],
            "config": {
                "banner_url": "",
                "banner_size": "",
                "count_down": {
                    "show_count_down": false,
                    "format": "",
                    "background_color_start": "",
                    "background_color_end": "",
                    "color": "",
                    "count_down_background_color": "",
                    "count_down_color": "",
                    "detail_page_show_code": false
                }
            },
            "allocation_method": "",
            "allocation_limit": 0,
            "customer_selection": "",
            "entitled_collection_ids": [],
            "tips": {
                "msg": "",
                "countdown": "",
                "countdown_day": "",
                "use_code": "",
                "copy_code": ""
            },
            "entitled_extra_list": null,
            "prerequisite_customer_range": null,
            "buysPrerequisiteValue": 0,
            "getsMaxOrderUseValue": 0,
            "getsDiscountValue": 0,
            "only_valid_first_order_customer": false
        }
    ]
}
```
