**Version: 202601**

# Redeem discount code

**POST** `/openapi/2026-01/loyalty/members/:member_id/redemption-campaigns/:campaign_id/redeem`

Use points to redeem a discount code from a campaign

## Request

**Path Parameters**

- `member_id` string (required)

  Member ID from path; must equal the storefront token member\_id
- `campaign_id` string (required)

  Redemption campaign ID from path

**application/json**

**Body | Example**

**Body (required)**

- `idempotency_key` string

  Idempotency key. Same key within one hour replays the first response

```json
{
  "idempotency_key": "string"
}
```

## Responses

**200**

OK

**application/json**

**Schema | Example**

**Schema**

- `code` string

  error code
- `message` string

  error message
- `data` object

  - `member_id` string

    Member ID
  - `deducted_points` int64

    Points deducted in this redemption
  - `transaction_id` string

    Points transaction ID
  - `discount_code` string

    Generated discount code
  - `discount_code_activity` object

    Discount code activity payload

    - `name` string

      Campaign name
    - `discount_type` string

      Discount type: percentage / fixed\_amount / free\_shipping / bxgy
    - `discount_value` string

      Discount value; percentage carries a numeric string (e.g. "10"); fixed\_amount carries an amount string (e.g. "10.00"); free\_shipping / bxgy leave it empty
    - `prerequisite_type` string

      Prerequisite condition type: none / subtotal / quantity
    - `prerequisite_value` string

      Prerequisite condition value; amount string when subtotal, quantity when quantity
    - `max_free_shipping` string

      Max free-shipping amount (free-shipping only); -1 means unlimited. String preserves decimals
    - `applicable_rule` object

      Applicable resource rule

      - `applicable_type` string

        Applicable type: all / include\_products / include\_collections
      - `applicable_product_ids` string[]

        Product IDs when applicable\_type=include\_products
      - `applicable_variant_ids` string[]

        Variant IDs when applicable\_type=include\_products
      - `applicable_collection_ids` string[]

        Collection IDs when applicable\_type=include\_collections
    - `obtain_products` object

      Obtain products rule (BXGY only)

      - `applicable_rule` object

        Applicable rule for obtainable products

        - `applicable_type` string

          Applicable type: all / include\_products / include\_collections
        - `applicable_product_ids` string[]

          Product IDs when applicable\_type=include\_products
        - `applicable_variant_ids` string[]

          Variant IDs when applicable\_type=include\_products
        - `applicable_collection_ids` string[]

          Collection IDs when applicable\_type=include\_collections
      - `product_count` uint32

        Obtain product count
      - `obtain_type` string

        Obtain discount type: free / percentage / fixed\_amount
      - `obtain_value` string

        Obtain discount value; decimal string
    - `use_with_other` boolean

      Allow stacking with other discounts
    - `limit_user_discount` int32

      Per-member campaign usage cap; -1 means unlimited
    - `limit_code_user_discount` int32

      Per-member per-code usage cap; -1 means unlimited
    - `limit_order_discount` int32

      Per-order usage cap; -1 means unlimited
    - `limit_code_max_discount` int32

      Per-code total usage cap; -1 means unlimited
    - `started_at` string

      Campaign start time; ISO 8601 UTC
    - `ended_at` string

      Campaign end time; ISO 8601 UTC. Empty string means open-ended
  - `redeemed_at` string

    Redeemed at, ISO-8601

```json
{
  "code": "string",
  "message": "string",
  "data": {
    "member_id": "string",
    "deducted_points": 0,
    "transaction_id": "string",
    "discount_code": "string",
    "discount_code_activity": {
      "name": "string",
      "discount_type": "string",
      "discount_value": "string",
      "prerequisite_type": "string",
      "prerequisite_value": "string",
      "max_free_shipping": "string",
      "applicable_rule": {
        "applicable_type": "string",
        "applicable_product_ids": [
          "string"
        ],
        "applicable_variant_ids": [
          "string"
        ],
        "applicable_collection_ids": [
          "string"
        ]
      },
      "obtain_products": {
        "applicable_rule": {
          "applicable_type": "string",
          "applicable_product_ids": [
            "string"
          ],
          "applicable_variant_ids": [
            "string"
          ],
          "applicable_collection_ids": [
            "string"
          ]
        },
        "product_count": 0,
        "obtain_type": "string",
        "obtain_value": "string"
      },
      "use_with_other": true,
      "limit_user_discount": 0,
      "limit_code_user_discount": 0,
      "limit_order_discount": 0,
      "limit_code_max_discount": 0,
      "started_at": "string",
      "ended_at": "string"
    },
    "redeemed_at": "string"
  }
}
```
