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

# Reward object

> The reward object represents a redeemable reward in the loyalty program.

Rewards are configured by the merchant and can be redeemed by customers using their points. Each reward generates a Shopify discount code on redemption.

## Attributes

| Field             | Type            | Description                                                                                         |
| ----------------- | --------------- | --------------------------------------------------------------------------------------------------- |
| `name`            | string          | Reward display name                                                                                 |
| `description`     | string \| null  | Optional description                                                                                |
| `discount_type`   | string          | Type of discount: `fixed`, `percentage`, `free-shipping`, `free-product`                            |
| `reward_type`     | string          | `loyalty` for a standard reward, or `vip` for a VIP tier reward                                     |
| `points_cost`     | integer         | Points required to redeem this reward                                                               |
| `discount_amount` | number          | The discount value (e.g. `5.00` for £5 off)                                                         |
| `minimum_spend`   | number \| null  | Minimum order value required to use the discount                                                    |
| `is_active`       | boolean         | Whether the reward is currently available                                                           |
| `max_redemptions` | integer \| null | Maximum total redemptions allowed, or `null` for unlimited                                          |
| `expiry_days`     | integer \| null | Number of days the discount code is valid after redemption                                          |
| `tier_name`       | string \| null  | The VIP tier this reward is exclusive to, by name. `null` when available to all members             |
| `redemption_mode` | string          | `standard` for a fixed redemption, or `flexible` when the customer chooses how many points to spend |
| `free_product`    | object \| null  | The granted product, for `free-product` rewards (see below). `null` for all other reward types      |
| `created_at`      | string          | ISO 8601 timestamp                                                                                  |
| `updated_at`      | string          | ISO 8601 timestamp                                                                                  |

### Free product details

For `free-product` rewards, `free_product` describes the product the customer receives:

| Field            | Type           | Description                                                |
| ---------------- | -------------- | ---------------------------------------------------------- |
| `product_name`   | string \| null | The product's name                                         |
| `product_id`     | string \| null | The Shopify product ID                                     |
| `variant_id`     | string \| null | The Shopify variant ID, when a specific variant is granted |
| `product_amount` | number \| null | Quantity of the product granted                            |

## Example

```json theme={null}
{
  "type": "reward",
  "id": "reward_abc",
  "attributes": {
    "name": "£5 off your next order",
    "description": null,
    "discount_type": "fixed",
    "reward_type": "loyalty",
    "points_cost": 500,
    "discount_amount": 5.00,
    "minimum_spend": 20.00,
    "is_active": true,
    "max_redemptions": null,
    "expiry_days": 30,
    "tier_name": null,
    "redemption_mode": "standard",
    "free_product": null,
    "created_at": "2024-01-01T00:00:00.000Z",
    "updated_at": "2024-01-01T00:00:00.000Z"
  }
}
```
