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

# Get a Test User's Rewards

> Returns a test user's available, active and used rewards, for example to confirm a grant.

> [!NOTE]
>
> Please review proper request headers [here](https://docs.thanx.com/consumer/usage/headers.md).

<Snippet file="sandbox/auth.mdx" />

Works like [Get Rewards](https://docs.thanx.com/consumer/rewards/get-rewards.md), but reads the rewards of any member of your sandbox merchant without that user's token.

### Parameters

**user\_id** `string` *required*

The user's `id`. The user must be a member of your merchant.

**states** `array[string]`

Only rewards in these states are returned: `available`, `active`, `used`. The default returns all three. Use array bracket notation: `states[]=available`, or `states[]=available&states[]=active` for several.

**redemption\_venue** `array[string]`

Only rewards redeemable at these venues are returned: `all`, `online`, `instore`. The default returns all three. Use the same bracket notation.

<Snippet file="pagination/params.mdx" />

### Response

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

<Snippet file="pagination/response.mdx" />

### Errors

| Status | Code | Message | When |
| - | - | - | - |
| `400` | `BAD_REQUEST` | e.g. `states does not have a valid value` | A filter value isn't one of the allowed values |
| `400` | `CLIENT_ID_HEADER_INVALID` | `X-ClientId header is invalid` | The `X-ClientId` header is missing or doesn't match an app |
| `403` | `FORBIDDEN` | `You do not have access to this resource.` | Called in production, or your `X-ClientId` isn't tied to exactly one merchant |
| `404` | `RESOURCE_NOT_FOUND` | `User not found` | No active user with this `user_id` is a member of your merchant |

```bash Get a Test User's Rewards theme={null}
curl "https://api.thanxsandbox.com/users/${user_id}/rewards?states[]=available" \
  -X GET \
  -H "Accept-Version: v4.0" \
  -H "Accept: application/json" \
  -H "X-ClientId: ${client_id}"
```

```json theme={null}
{
  "pagination": {
    "current_page": 1,
    "per_page": 10,
    "total_pages": 1
  },
  "rewards": [
    {
      "id": "222441e34626",
      "user_id": "fhwer123",
      "merchant_id": "ghwou3457f",
      "campaign_id": "85133c3c1258",
      "state": "available",
      "earn": {
        "type": "granted"
      },
      "redeem": {
        "type": "manual",
        "text": "$5 off",
        "detail": "Get $5 off your next purchase",
        "window": 60,
        "venue": "all"
      },
      "coupon_code": {
        "code": null,
        "type": null,
        "display": null
      },
      "fine_print": "Can't be combined with other offers",
      "instructions": "Example staff instructions",
      "available_at": "2026-11-17T15:10:00Z",
      "activated_at": null,
      "retire_at": null,
      "used_at": null,
      "redemption_location_id": 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
    }
  ]
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.