Redemption Rule 🤝
APIs to create, update or delete Redemption Rules and Configurations
Available Endpoints
Type | Description | Endpoint |
---|---|---|
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
Attribute | Type | Description |
---|---|---|
| integer | Id of the redemption rule |
| double | Points needed for the rule to be redeemed |
| double | In the case of a rule of type |
| string | Indicates the type of the rule and can be one of the following:
|
| DateTime | Starting date when the rule can be applied (If null then it starts from the date it is created ) |
| DateTime | Ending date when the rule will expire (If null then it will not expire) |
| Object | A coupon object describing the coupon that is awarded when the rule is redeemed |
| Object | An AvailableTo object specifying the availability of the rule (To whom this rule will be available)
|
Coupon Object
Attribute | Type | Required | Description |
---|---|---|---|
couponType | string | No | Coupon type, can be one of the following:
|
| double | Yes, in case of coupon type | Value of coupon, for example if the coupon rewards a fixed amount of points then the amount of points will be in |
| double | No | Minimum order value that this coupon can be applied to |
| object | Yes, in case of coupon type | In the case of a free product coupon this object indicates the details of the product, The object has the the following attributes:
|
| 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:
|
| Object | Yes, in case of coupon type | An object describing the coupon group in case of a |
AvailableTo Object
Attribute | Type | Description |
---|---|---|
| object | A Level object indicating the VIP tier that the rule is available to, The Level object has the following attributes:
|
| array | An array of tag names that the rule is available to |
Coupon Group Object
Attribute | Type | Description |
---|---|---|
| string | Handle of the group |
| string | Title of the group |
| string | URL of the group |
| string | A path indicating the Icon of the Coupon Group |
| string | Description of the group |
| integer | Maximum number of times a customer can achieve coupons from this group |
| DateTime | Date at which coupons can start to be redeemed from this group |
| DateTime | Date at which you can no longer redeem coupons from this group |
| boolean | A boolean flag indicating if there are coupon available to be redeemed from this group |
| boolean | Flag indicating if the group is valid (Current Date is between start and expiry dates) |
| 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
Attribute | Type | Required | Description |
---|---|---|---|
| string | Yes | Partner Access Token, The token is of type Bearer |
| string | Yes | Id of the store on the partner's system |
Body
A client can only have one free_shipping
rule
Attribute | Type | Required | Description |
---|---|---|---|
| double | Yes | Points needed for the rule to be redeemed |
| double | No | In the case of a rule of type |
| string | Yes | Indicates the type of the rule and can be one of the following:
|
| DateTime | No | Starting date when the rule can be applied (If null then it starts from the date it is created ) |
| DateTime | No | Ending date when the rule will expire (If null then it will not expire) |
| Object | Yes | A coupon object describing the coupon that is awarded when the rule is redeemed |
| Object | No | An AvailableTo object specifying the availability of the rule (To whom this rule will be available)
|
Sample Request
Response
Body
Sample Response
PUT - Update Redemption Rule
This API is used to Update a client's redemption rule
Request
Header
Attribute | Type | Required | Description |
---|---|---|---|
| string | Yes | Partner Access Token, The token is of type Bearer |
| string | Yes | Id of the store on the partner's system |
Path Parameters
Parameter | Type | Description |
---|---|---|
| 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
Attribute | Type | Required | Description |
---|---|---|---|
| string | Yes | Partner Access Token, The token is of type Bearer |
| string | Yes | Id of the store on the partner's system |
Body
Only parameters that will be updated should be sent
Attribute | Type | Description |
---|---|---|
| double | This attribute specifies the monetary value of one point |
| boolean | A Boolean indicating if the rule is active (Default value is true) |
Sample Request
Response
Body
| double | This attribute specifies the monetary value of one point |
| boolean | A Boolean indicating if the rule is active (Default value is true) |
| integer | Id of the default rule |
Sample Response
PUT - Update Redemption Configurations
This API allows you to edit a client's configurations
Request
Header
Attribute | Type | Required | Description |
---|---|---|---|
| string | Yes | Partner Access Token, The token is of type Bearer |
| string | Yes | Id of the store on the partner's system |
Body
Only parameters that will be updated should be sent
Attribute | Type | Description |
---|---|---|
| boolean | A boolean flag indicating if the Redemption program is active for the client |
| integer | Number of days that the points will expire after being rewarded |
Sample Request
Response
Body
Attribute | Type | Description |
---|---|---|
| boolean | A boolean flag indicating if the Redemption program is active for the client |
| 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
Attribute | Type | Required | Description |
---|---|---|---|
| string | Yes | Partner Access Token, The token is of type Bearer |
| string | Yes | Id of the store on the partner's system |
Path Parameters
Default rule cannot be deleted
Parameter | Type | Description |
---|---|---|
| integer | Id of the redemption rule |