**版本：202201**

# 查询折扣码列表

**GET** `/openapi/2022-01/price_rules/:price_rule_id/discount_codes`

返回指定价格规则下的所有折扣码。

## 请求

**Path参数**

- `price_rule_id` string (required)

  价格规则 ID。

## 响应

**200**

200

**application/json**

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

**数据结构**

- `discount_code` object

  - `id` string

    **示例：** `f819c126-a581-4d66-a909-08282dd35916`
  - `price_rule_id` string

    **示例：** `588fea0b-f15d-4c1d-9390-23661f0194fa`
  - `code` string

    **示例：** `VIJK8GB0`
  - `created_at` string

    **示例：** `2022-06-17 07:48:29`
  - `updated_at` string

    **示例：** `2022-06-17 07:48:29`
  - `use_with_other` string

    **示例：** `1`
  - `usage_count` string

    **示例：** `0`

```json
{
  "discount_code": {
    "id": "f819c126-a581-4d66-a909-08282dd35916",
    "price_rule_id": "588fea0b-f15d-4c1d-9390-23661f0194fa",
    "code": "VIJK8GB0",
    "created_at": "2022-06-17 07:48:29",
    "updated_at": "2022-06-17 07:48:29",
    "use_with_other": "1",
    "usage_count": "0"
  }
}
```

```json
{
    "discount_code": {
        "id": "f819c126-a581-4d66-a909-08282dd35916",
        "price_rule_id": "588fea0b-f15d-4c1d-9390-23661f0194fa",
        "code": "VIJK8GB0",
        "created_at": "2022-06-17 07:48:29",
        "updated_at": "2022-06-17 07:48:29",
        "use_with_other": "1",
        "usage_count": "0"
    }
}
```
