> For the complete documentation index, see [llms.txt](https://help.openloyalty.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.openloyalty.io/technical-guide/data-exports/data-structure-and-types/rewards.md).

# Rewards

The Rewards file contains information about the rewards configured in Open Loyalty.

{% hint style="info" %}
**Delta export.** Each daily file contains rewards created or updated during that day. Upsert on `rewardId` and keep the row with the latest `updatedAt`.
{% endhint %}

**File:** `analytics/Rewards/rewards_YYYY_MM_DD.csv`\
**Primary key:** `rewardId`

A sample file is provided below:

{% file src="/files/clEhPBOxPjDJky4owldM" %}

**Available Data:**

<table><thead><tr><th width="151.66015625">Column</th><th width="117.2265625">Type</th><th width="115.203125">Can be empty</th><th>Description</th></tr></thead><tbody><tr><td><code>rewardId</code></td><td>uuid</td><td>No</td><td>Unique ID of the reward</td></tr><tr><td><code>tenantId</code></td><td>uuid</td><td>No</td><td>ID of the tenant where the reward is created</td></tr><tr><td><code>type</code></td><td>enum</td><td>No</td><td>Type of the reward</td></tr><tr><td><code>name</code></td><td>string</td><td>Yes</td><td>Name of the reward</td></tr><tr><td><code>brandName</code></td><td>string</td><td>Yes</td><td>Brand name details</td></tr><tr><td><code>levels</code></td><td>json array</td><td>No</td><td>IDs of the targeted tiers</td></tr><tr><td><code>levelNames</code></td><td>—</td><td>—</td><td>Names of the targeted tiers</td></tr><tr><td><code>segments</code></td><td>json array</td><td>No</td><td>IDs of the targeted segments</td></tr><tr><td><code>segmentNames</code></td><td>—</td><td>—</td><td>Names of the targeted segments</td></tr><tr><td><code>categories</code></td><td>json array</td><td>No</td><td>IDs of the reward categories</td></tr><tr><td><code>categoryNames</code></td><td>—</td><td>—</td><td>Names of the reward categories</td></tr><tr><td><code>tax</code></td><td>decimal</td><td>Yes</td><td>Tax value</td></tr><tr><td><code>taxPriceValue</code></td><td>—</td><td>—</td><td>Tax price value</td></tr><tr><td><code>active</code></td><td>boolean</td><td>Empty = false</td><td>Whether the reward is active</td></tr><tr><td><code>costInPoints</code></td><td>decimal</td><td>Yes</td><td>Reward cost in points</td></tr><tr><td><code>activity</code></td><td>json object</td><td>Yes</td><td>Time period when the reward is active</td></tr><tr><td><code>visibility</code></td><td>json object</td><td>Yes</td><td>Time period when the reward is visible</td></tr><tr><td><code>price</code></td><td>—</td><td>—</td><td>Price of the reward</td></tr><tr><td><code>labels</code></td><td>—</td><td>—</td><td>Custom attributes set for the reward</td></tr><tr><td><code>featured</code></td><td>—</td><td>—</td><td>Featured flag of the reward</td></tr><tr><td><code>public</code></td><td>—</td><td>—</td><td>Public flag of the reward</td></tr><tr><td><code>usageLimit</code></td><td>—</td><td>—</td><td>Redemption limit for the reward</td></tr><tr><td><code>fulfillmentTracking</code></td><td>—</td><td>—</td><td>Tracking for the reward's redemption</td></tr><tr><td><code>pointValue</code></td><td>—</td><td>—</td><td>Point value of the reward</td></tr><tr><td><code>daysInactive</code></td><td>—</td><td>—</td><td>How long the coupon is pending</td></tr><tr><td><code>daysValid</code></td><td>—</td><td>—</td><td>How long the coupon is valid</td></tr><tr><td><code>couponGenerator</code></td><td>—</td><td>—</td><td>Rules set for the coupon generator</td></tr><tr><td><code>couponValue</code></td><td>—</td><td>—</td><td>Value of a static coupon</td></tr><tr><td><code>usageLeft</code></td><td>—</td><td>—</td><td>Number of rewards left</td></tr><tr><td><code>dateValid</code></td><td>—</td><td>—</td><td>Custom date when the reward expires</td></tr><tr><td><code>createdAt</code></td><td>datetime</td><td>No</td><td>Date when the reward was created</td></tr><tr><td><code>updatedAt</code></td><td>datetime</td><td>No</td><td>Date when the reward was updated</td></tr></tbody></table>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://help.openloyalty.io/technical-guide/data-exports/data-structure-and-types/rewards.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
