**Version: 202506**

# List discount codes

**GET** `/openapi/2025-06/price_rules/:price_rule_id/discount_codes`

Retrieves all discount codes associated with a specific price rule.

## Request

**Path Parameters**

- `price_rule_id` string (required)

  Price rule ID

## Responses

**200**

OK

**application/json**

**Schema | Example**

**Schema**

- `code` string

  error code
- `message` string

  error message
- `data` object

  - `discount_code` object[]

    Discount code

    *   Array [

    - `id` string

      Discount ID
    - `price_rule_id` string

      Price rule ID
    - `code` string

      Discount code
    - `created_at` string

      Creation timestamp, in ISO-8601 format
    - `updated_at` string

      Last update timestamp, in ISO-8601 format
    - `use_with_other` int32

      Whether discount can be used with others
    - `usage_count` int32

      Number of times used
    *   ]

```json
{
  "code": "string",
  "message": "string",
  "data": {
    "discount_code": [
      {
        "id": "string",
        "price_rule_id": "string",
        "code": "string",
        "created_at": "string",
        "updated_at": "string",
        "use_with_other": 0,
        "usage_count": 0
      }
    ]
  }
}
```
