Create a loyalty reward
Add a reward to a program's catalog.
Endpoint
POST/loyalty-rewards
Body parameters
| Name | Type | Required | Description |
|---|---|---|---|
organization_id | integer | Yes | Your organization ID. Must be the program's organization. |
program_id | integer | Yes | ID of the loyalty program. |
name | string | Yes | Reward name (1 to 160 characters). |
cost | number | Yes | Balance needed, greater than 0. |
reward_type | string | No | free_item, discount_fixed, discount_percent or custom (default). |
discount_value | number | For discount types | Amount (discount_fixed) or percentage up to 100 (discount_percent). |
description | string | null | No | Description. |
image_url | string | null | No | Image URL. |
product_id | integer | null | No | Related product. |
min_tier_id | integer | null | No | Minimum tier, from the same program. |
stock | integer | null | No | Total units available. null = unlimited. |
code_validity_days | integer | null | No | Days a reward code stays valid. null = no expiry. |
status | string | No | active (default) or inactive. |
sort_order | integer | No | Display order. Default 0. |
Request
Response
json
Errors
All are 400 Bad Request:
| Message | Cause |
|---|---|
Program not found in this organization | program_id is not a program of organization_id. |
A discount reward needs a discount value | discount_fixed / discount_percent without a positive discount_value. |
A percentage discount cannot exceed 100 | discount_percent with discount_value above 100. |
The minimum tier must belong to the same program | min_tier_id is not a tier of the program. |
Report an issue with this documentation
Please log in to report issues with our documentation.