> ## Documentation Index
> Fetch the complete documentation index at: https://docs.thanx.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Activate Reward

> This endpoint activates the reward, transitioning reward state from available to active. For bonus points (also know as static rewards), this endpoint sets the reward state to used after activation (see [overview](/consumer/rewards/overview) for more information).

<Note>
  Please review proper request headers [here](/consumer/usage/headers).
</Note>

<Info>
  When a reward has `uses_dynamic_coupon_codes: true`, activating the reward will generate a unique coupon code from the associated coupon pool. The generated code will be returned in the `coupon_code` field of the response.
</Info>

### Parameters

<ParamField path="id" type="string" required>
  The reward ID
</ParamField>

<ParamField path="location_id" type="string" optional>
  The location ID at which the reward was redeemed
</ParamField>

### Response

<Snippet file="entities/reward.mdx" />

<RequestExample>
  ```bash Activate Reward theme={null}
  curl https://api.thanxsandbox.com/rewards/:id/activate \
    -X PATCH \
    -H "Content-Type: application/json"  \
    -H "Accept-Version: v4.0" \
    -H "Accept: application/json" \
    -H "Authorization: Bearer ${token}" \
    -H "X-ClientId: ${client_id}" 
  ```
</RequestExample>

<ResponseExample>
  ```json theme={null}
  {
    "reward": {
      "id": "222441e34626",
      "olo_uid": "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmn",
      "user_id": "werofsdf",
      "merchant_id": "weroif",
      "campaign_id": "85133c3c1258",
      "state": "active",
      "earn": {
        "type": "intro"
      },
      "redeem": {
        "type": "manual",
        "text": "$10 off",
        "detail": "Long description",
        "window": 60,
        "venue": "all"
      },
      "coupon_code": {
        "code": null,
        "type": null,
        "display": null
      },
      "fine_print": "Can't be used for alcohol purchases",
      "instructions": "Example staff instructions",
      "available_at": "2019-12-25T19:00:00Z",
      "activated_at": "2020-01-01T20:00:00Z",
      "retire_at": null,
      "used_at": null,
      "images": {
        "index": {
          "small": "https://...png",
          "large": "https://...png"
        },
        "detail": {
          "small": "https://...png",
          "large": "https://...png"
        },
        "advertising": {
          "small": "https://...png",
          "large": "https://...png"
        }
      },
      "uses_dynamic_coupon_codes": false
    }
  }
  ```
</ResponseExample>
