Partner Games API
The Partner Games API allows partners to create, configure, and manage interactive games that engage customers and drive loyalty. Games can generate coupons as rewards when completed.Game Types
Partners can create various types of games:- Stamps: Collection-based games where customers collect stamps to earn rewards
- Wheel: Spin-the-wheel games with random rewards
- Collection: Item collection games
- Quiz: Question and answer challenges
- Memory: Memory matching games
- Scratch: Digital scratch cards
Coupon Generation Settings
Each game can be configured with specific coupon generation settings:allow_multiple_active_coupons
- Type:
boolean
- Default:
true
- Description: Controls whether customers can have multiple unused coupons from the same game simultaneously
- Values:
true
: Customers can accumulate multiple active coupons from this gamefalse
: Only one active coupon per customer per game is allowed
coupon_validity_days
- Type:
integer
ornull
- Default:
null
(unlimited) - Range: 1-3650 days (up to 10 years)
- Description: Sets how many days coupons generated from this game remain valid
- Values:
null
: Coupons never expire30
: Coupons expire after 30 days365
: Coupons expire after 1 year
API Endpoints
Create Game
Request Body
Response
Update Game
Request Body
Get Game Details
Response
List Games
Query Parameters
page
(integer): Page number for paginationper_page
(integer): Items per page (max 100)active
(boolean): Filter by active statusgame_type
(string): Filter by game type
Response
Coupon Generation Logic
When customers complete games, coupons are automatically generated based on the game’s settings:Multiple Coupons Setting
Validity Period Setting
Validation Rules
Game Creation/Update
name
: Required, 3-255 charactersdescription
: Required, 10-10000 charactersgame_type
: Required, one of:stamps
,wheel
,collection
,quiz
,memory
,scratch
reward_description
: Required, 3-1000 charactersis_active
: Boolean, defaulttrue
allow_multiple_active_coupons
: Boolean, defaulttrue
coupon_validity_days
: Integer 1-3650 ornull
, defaultnull
product_ids
: Array of valid product IDs (optional)start_date
: Valid date (optional)end_date
: Valid date, must be after start_date (optional)
Business Logic Examples
Scenario 1: Limited Coupons, Short Validity
- Customer gets only one active coupon at a time
- Each coupon expires in 7 days
- Encourages quick redemption
Scenario 2: Unlimited Coupons, Long Validity
- Customer can accumulate multiple coupons
- Each coupon lasts for 1 year
- Maximizes customer engagement
Scenario 3: Collectible, Never Expiring
- Customer can collect unlimited coupons
- Coupons never expire
- Creates a savings/collection mentality
Error Handling
Common Error Responses
Business Logic Errors
Related APIs
- Partner Cards API - Configure partner loyalty cards
- Partner Staff Coupons API - Verify and manage coupons
- Shop Games API - Customer-facing game functionality