Redemption Rule 🤝
APIs to create, update or delete Redemption Rules and Configurations
Available Endpoints
POST
integrations/client/redemption/rule
PUT
integrations/client/redemption/config/{ruleId}
PUT
integrations/client/redemption/config/rule
PUT
integrations/client/redemption/config
DELETE
integrations/client/redemption/config/{ruleId}
Object Documentation
Redemption Rule
id
integer
Id of the redemption rule
pointsToRedeem
double
Points needed for the rule to be redeemed
valueOfPoint
double
In the case of a rule of type general_settings
, this attribute specifies the monetary value of one point
ruleType
string
Indicates the type of the rule and can be one of the following:
free_shipping_settings
For rule that redeems a free shipping coupon
percentage_discount_settings
For rule that redeems a percentage based discount coupon
free_product_settings
For rule that redeems a free product coupon
fixed_rate_settings
For rule that redeems a coupon that discounts a fixed amount
general_settings
For general rule that allows user to trade points for their monetary value
custom
startDate
DateTime
Starting date when the rule can be applied (If null then it starts from the date it is created )
endDate
DateTime
Ending date when the rule will expire (If null then it will not expire)
coupon
Object
availableTo
Object
Coupon Object
couponType
string
No
Coupon type, can be one of the following:
fixed_discount
percentage_discount
free_shipping
free_product
fixed_rate_discount
custom
discountValue
double
Yes, in case of coupon type percentage_discount
and fixed_discount
Value of coupon, for example if the coupon rewards a fixed amount of points then the amount of points will be in discountValue
minOrderValue
double
No
Minimum order value that this coupon can be applied to
product
object
Yes, in case of coupon type free_product
In the case of a free product coupon this object indicates the details of the product,
The object has the the following attributes:
productId
productName
variantId
variantName
collections
array
No
Array of Collection objects in the case where the coupon can only be applied to specific collections, the collection object has the following attributes:
collectionId
integer
collectionName
string
group
Object
Yes, in case of coupon type custom
AvailableTo Object
level
object
A Level object indicating the VIP tier that the rule is available to,
The Level object has the following attributes:
levelName
string
levelId
integer
tags
array
An array of tag names that the rule is available to
Coupon Group Object
handle
string
Handle of the group
title
string
Title of the group
url
string
URL of the group
iconPath
string
A path indicating the Icon of the Coupon Group
description
string
Description of the group
maxPerPlayer
integer
Maximum number of times a customer can achieve coupons from this group
startDate
DateTime
Date at which coupons can start to be redeemed from this group
expiryDate
DateTime
Date at which you can no longer redeem coupons from this group
isAvailable
boolean
A boolean flag indicating if there are coupon available to be redeemed from this group
isValid
boolean
Flag indicating if the group is valid (Current Date is between start and expiry dates)
isActive
boolean
Flag indicating if the group is active or not (Client marked the group as active or not and group’s dates are valid)
POST - Create Redemption Rule
This API is used to create a redemption rule for a client
Request
Header
Authorization
string
Yes
Partner Access Token, The token is of type Bearer
storeId
string
Yes
Id of the store on the partner's system
Body
A client can only have one free_shipping
rule
pointsToRedeem
double
Yes
Points needed for the rule to be redeemed
valueOfPoint
double
No
In the case of a rule of type general_settings
, this attribute specifies the monetary value of one point
ruleType
string
Yes
Indicates the type of the rule and can be one of the following:
free_shipping_settings
For rule that redeems a free shipping coupon
percentage_discount_settings
For rule that redeems a percentage based discount coupon
free_product_settings
For rule that redeems a free product coupon
fixed_rate_settings
For rule that redeems a coupon that discounts a fixed amount
general_setting
For general rule that allows user to trade points for their monetary value
custom
startDate
DateTime
No
Starting date when the rule can be applied (If null then it starts from the date it is created )
endDate
DateTime
No
Ending date when the rule will expire (If null then it will not expire)
coupon
Object
Yes
availableTo
Object
No
Sample Request
Response
Body
Sample Response
PUT - Update Redemption Rule
This API is used to Update a client's redemption rule
Request
Header
Authorization
string
Yes
Partner Access Token, The token is of type Bearer
storeId
string
Yes
Id of the store on the partner's system
Path Parameters
ruleId
integer
Id of the redemption rule
Body
Only parameters that will be updated should be sent
Response
Body
PUT - Update Default Rule
This API is used to Update the default redemption rule.
The default redemption rule defines the value of a point and allows the customer to exchange their points into monetary value based on the rule's configurations
Request
Header
Authorization
string
Yes
Partner Access Token, The token is of type Bearer
storeId
string
Yes
Id of the store on the partner's system
Body
Only parameters that will be updated should be sent
valueOfPoint
double
This attribute specifies the monetary value of one point
isActive
boolean
A Boolean indicating if the rule is active (Default value is true)
Sample Request
Response
Body
valueOfPoint
double
This attribute specifies the monetary value of one point
isActive
boolean
A Boolean indicating if the rule is active (Default value is true)
id
integer
Id of the default rule
Sample Response
PUT - Update Redemption Configurations
This API allows you to edit a client's configurations
Request
Header
Authorization
string
Yes
Partner Access Token, The token is of type Bearer
storeId
string
Yes
Id of the store on the partner's system
Body
Only parameters that will be updated should be sent
isRedemptionActive
boolean
A boolean flag indicating if the Redemption program is active for the client
pointsExpiryPeriod
integer
Number of days that the points will expire after being rewarded
Sample Request
Response
Body
isRedemptionActive
boolean
A boolean flag indicating if the Redemption program is active for the client
pointsExpiryPeriod
integer
Number of days that the points will expire after being rewarded
DELETE - Delete Redemption Rule
This API allows deletes a client's redemption rule
Request
Header
Authorization
string
Yes
Partner Access Token, The token is of type Bearer
storeId
string
Yes
Id of the store on the partner's system
Path Parameters
Default rule cannot be deleted
ruleId
integer
Id of the redemption rule
Response
No Response Body
Sample Response
Last updated