---
title: "Redemption Below Threshold"
method: POST
path: "swell/redemption_code/below_threshold"
---

# Redemption Below Threshold

`POST swell/redemption_code/below_threshold` (webhook)

Sent when a **Custom Coupon** reward is running low on uploaded codes: when the unused codes reach the reward's threshold, then half, a quarter and an eighth of it, and 0.

To receive it, add `swell/redemption_code/below_threshold` to `events` when you [create a filter](ref:create-filter), then [create a store subscription](ref:create-subscription) for each store that installed your app. Yotpo sends the event to your target URL as a `POST` with this JSON body.

Set the threshold on the Custom Coupon in your Yotpo Loyalty admin.

## Headers

- `X-Yotpo-Webhooks-Event-Type` string, required
- `X-Yotpo-Webhooks-Tenant-Type` string, required
- `X-Yotpo-Webhooks-Tenant-Id` string, required
- `WebhookMessageId` string, required
- `WebhookMessageIdPerTarget` string, required

## Payload

- object
  - `topic` string: The event name, `swell/redemption_code/below_threshold`.
  - `name` string: The display name of the event.
  - `redemption_option` object: An object describing the redemption option that is running low on redemption codes.
    - `id` integer: The reward (redemption option) ID.
    - `name` string: The reward name, for example `$10 off`.
    - `description` string, nullable: The reward description shown to customers.
    - `icon` string: The reward image: an image URL or a Font Awesome class name such as `fa-dollar`.
    - `cost_text` string, nullable: The points cost as display text, for example `500 points`.
    - `amount` integer, nullable: The points the reward costs. `0` for `variable` rewards, where the customer chooses how many points to redeem.
    - `applies_to_product_type` string, nullable: Which products the reward applies to, for example `ALL`.
    - `duration` string, nullable: How long the reward lasts, for example `single_use`.
    - `type` string: The reward type, for example `Coupon`.
    - `discount_amount_cents` integer, nullable: The discount in cents for fixed-amount rewards.
    - `discount_rate_cents` integer, nullable: For `variable` rewards, the discount in cents for each point redeemed.
    - `discount_percentage` integer, nullable: The discount percentage for percentage rewards. `null` or `0` for other types.
    - `discount_type` string, nullable: How the discount works, for example `fixed_amount`, `percentage`, `variable`, `custom_reward` or `donation`.
  - `redemption_option_id` integer: The unique identifier of the redemption option that has hit the thresholds.
  - `redemption_option_name` string: The reward name.
  - `number_of_unused_codes` integer: The number of unused codes left in the redemption option.

## Acknowledgement `200`

Return any 2xx status quickly to acknowledge the event. Without one, Yotpo retries at least 10 times with exponential backoff.

---

[API](https://skmtc.dev/yotpo/apis/app-developer-api.md) - [All operations](https://skmtc.dev/yotpo/apis/app-developer-api/llms.txt) - [OpenAPI document](https://skmtc.dev/yotpo/apis/app-developer-api/revisions/5bcae8239b6e?raw)
