> For the complete documentation index, see [llms.txt](https://docs.perkville.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.perkville.com/integrations/integrating-perkville/integrating-your-app-with-perkville/vouchers-page.md).

# Vouchers page

When customers redeem their points, they receive a voucher that can be displayed within your mobile app. You can create a dedicated page for showcasing vouchers and each voucher's details.

<figure><img src="https://2181708597-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSiE75SeColbiBVbet0NZ%2Fuploads%2FlX3pXzXmaM8ChB3lfCjT%2Fvoucher_Perkville_page.png?alt=media&amp;token=4016db28-dbc8-4d5c-a667-74aa7a31d786" alt="" width="371"><figcaption></figcaption></figure>

Use the [**User Voucher** endpoint](https://www.perkville.com/developers/docs/v2/#v2_rewards_program_2_anchor) for customer‑facing voucher lists and details. This endpoint returns user‑friendly fields (title, description, fine print, image) and is ordered the same way we show vouchers in Perkville.

### Caching (recommended)

Cache voucher lists and voucher details locally in the app. This avoids unnecessary API calls when users move back and forth between screens.

* Refresh the cache after a redemption is completed.
* Refresh if a voucher is marked as used.
* Otherwise, use a short TTL or background refresh.

### What to show for each voucher

At minimum, display:

* **Title**
* **Status** (USED, UNUSED, EXPIRED, etc.)
* **Created date**
* **Expiration date** (if present)
* **Point cost**
* **Redemption instructions / details** (if present)
* **Location** (if present)
* **Image** (if present)

#### Displaying codes/urls

We recommend displaying values in the following priority:

* `reward_url` to an external site
* QR code of the `external_coupon_code`
* Barcode of the `voucher_id`

### Allowed actions

Using [**User Vouchers** endpoint](https://www.perkville.com/developers/docs/v2/#v2_rewards_program_user_voucher_view_anchor):

* Customers can **mark a voucher as USED** via a **PATCH** request.
* A voucher can only be marked as USED if its current status is **UNUSED**.

If the voucher is already USED, EXPIRED, VOIDED, or PROCESSING, the “Mark as used” action should be disabled


---

# 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://docs.perkville.com/integrations/integrating-perkville/integrating-your-app-with-perkville/vouchers-page.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.
