> 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/integrations-and-data-exchange/imports-exports/exports/ui-exports/campaign-codes.md).

# Campaign Codes

**File format:** CSV

#### Sample CSV file

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

```csv
codeId,code,status,createdAt,usedByMemberId,usedAt
6f29398a-f49d-4d3e-92a8-20118dbe4773,CNDG3W5D65AS,unused,2026-03-10T04:32:08+01:00,,
735aa96d-65fc-46a1-8dd2-d43c6235c52b,5ZMFNF7QFJ3Z,unused,2026-03-10T04:32:08+01:00,,
```

#### Field reference

<table><thead><tr><th width="196">Field</th><th>Description</th></tr></thead><tbody><tr><td><code>codeId</code></td><td>Open Loyalty UUID for the code</td></tr><tr><td><code>code</code></td><td>The redemption code string</td></tr><tr><td><code>status</code></td><td><code>unused</code> once generated/uploaded; changes once a member redeems the code</td></tr><tr><td><code>createdAt</code></td><td>Timestamp the code was generated or uploaded (ISO 8601, with offset)</td></tr><tr><td><code>usedByMemberId</code></td><td>UUID of the member who redeemed the code — empty while <code>unused</code></td></tr><tr><td><code>usedAt</code></td><td>Timestamp the code was redeemed — empty while <code>unused</code></td></tr></tbody></table>

{% hint style="info" %}
The sample above only shows the `unused` state. `usedByMemberId` and `usedAt` populate once a member redeems the code — confirm the exact `status` value used for redeemed codes against your own export if you're building automation around this field.
{% endhint %}

#### How to export

Codes are exported per campaign, from the campaign's redemption codes list. Once scheduled, the export appears in **Imports & Exports → Exports** for download, like other report exports.


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://help.openloyalty.io/integrations-and-data-exchange/imports-exports/exports/ui-exports/campaign-codes.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
