post https://{host}/api_gateway/rewards/core/v1/user/rewards/issue?username=&skip_validation=true
This API is used to issue multiple rewards to the user based on mobile number/ email Id.
While issuing bulk rewards,
-
The intouch points required to purchase the rewards are summed up and isRedeemable call checks if the customer has enough points or not.
- If the customer has enough points, then all the rewards in the issue bulk call are issued in a single shot
- If the customer doesn't have enough points, then the issue bulk call is failed and no reward is issued.
-
If the isRedeemable call is successful, then the system will issue the rewards to the user.
- Let's say, one reward is coupon, another is cart promotion in the request payload. Coupon is issued but cart promotion issual failed, this can happen and the coupon will be issued. Here in this case, partial issual will be successful.
Note
For detailed information about our APIs and for hands-on testing, refer documentation in API overview and step-by-step guide on making your first API call in Make your first API call .
Prerequisites- Basic Authentication
- Default access group
Resource informationURI /api_gateway/rewards/core/v1/user/rewards/issue?username={store}&skip_validation=true HTTP Method POST Pagination No Batch support No Rate limit information None API endpoint examplehttps://eucrm.cc.capillarytech.com/api_gateway/rewards/core/v1/user/rewards/issue?username=swati&skip_validation=true
Request body parameters
Parameter | Data Type | Description |
---|---|---|
mobile* | String | Mobile phone number of the customer. |
Email ID | String | Email ID of the customer. |
brand | String | Brand associated with the transaction. |
transactionNumber | String | Unique identifier for the transaction. |
rewards | Array | Array of rewards associated with the transaction. |
rewardId | Integer | Unique identifier for a reward. |
quantity | Integer | Quantity of the specified reward. |
Request query parameters
Parameter | Data Type | Description |
---|---|---|
Username* | String | Username name of the store. |
skip_validation | Boolean | A validation code is used to redeem points for the transaction. skip_validation is set to true as brands configured in Marvel bypass validation code. |
{
"mobile": "919456430850",
"brand": "BUKL",
"transactionNumber": "transacqwert",
"rewards": [
{
"rewardId": 13,
"quantity": 1
},
{
"rewardId": 12,
"quantity": 1
}
]
}
Response parameters
Parameter | Data Type | Description |
---|---|---|
status | Object | General status of the response. |
success | Boolean | Indicates success status. |
code | Integer | Status code of the API call. |
message | String | Message describing the status. |
rewards | Array | Array of rewards details. |
status | Object | Status of each individual reward. |
success | Boolean | Indicates success status of the reward. |
code | Integer | Status code for the reward. |
message | String | Message describing the status of the reward. |
rewardId | Integer | Unique identifier for the reward. |
requestedQuantity | Integer | Quantity of the reward requested. |
pointsReferenceId | String | Reference ID for points used. |
intouch | Array | Array of intouch details. |
pointsRedeemed | String | Number of points redeemed. |
couponCode | String | Coupon code provided. |
codeExpiry | String | Expiry date and time for the coupon code. |
promotions | Array | Array of associated promotions. |
vendor | Array | Array of associated vendors. |
{
"status": {
"success": true,
"code": 200,
"message": "Reward issued successfully"
},
"rewards": [
{
"status": {
"success": true,
"code": 200,
"message": "Reward issued successfully"
},
"rewardId": 13,
"requestedQuantity": 1,
"pointsReferenceId": "VKAZF2",
"intouch": [
{
"pointsRedeemed": "50",
"couponCode": "JLB71ZRI",
"codeExpiry": "2023-06-09 00:00:00"
}
],
"promotions": [],
"vendor": [],
"restrictions": null
}
]
}
API-specific error codes
Error code | Description |
---|---|
8003 | Fail to issue reward |
8010 | Reward issued partially |