> ## 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.

# Grant Reward

> This endpoint grants the user a reward associated with the campaign provided.

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

<Warning>This endpoint is only available in SANDBOX</Warning>

### Parameters

<ParamField body="campaign_id" type="string" required>
  The campaign id to grant the reward for. Must be the campaign's **hashid** (e.g., `85133c3c1258`), not the numeric program ID.
</ParamField>

<ParamField body="user_id" type="string" required>
  The user to grant the reward for
</ParamField>

### Response

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

<RequestExample>
  ```bash Grant Reward theme={null}
  curl https://api.thanxsandbox.com/rewards/grant \
    -X POST \
    -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": "available",
      "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>
