post https://{host}/api_gateway/rewards/core/v1/user/reward//issue?username=&skip_validation=true
This API is used to issue a reward to the user based on mobile number/ email ID/ external ID
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 information
URI | /api_gateway/rewards/core/v1/user/reward/{reward Id}/issue?username={store}&skip_validation=true |
HTTP Method | POST |
Pagination | No |
Batch support | No |
Rate limit information | None |
API endpoint example
https://eucrm.cc.capillarytech.com/api_gateway/rewards/core/v1/user/reward/{reward Id}/issue?username={store}&skip_validation=true
Request path parameters
Parameter Name | Data Type | Description |
---|---|---|
Reward ID* | String | Unique identifier of the reward. |
Request query parameters
Parameter Name | Data Type | Description |
---|---|---|
username* | String | 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. |
Request body parameters
Parameter | Data Type | Description |
---|---|---|
mobile | String | The mobile phone number associated with the transaction. |
Email* | String | The email ID of the customer. |
External ID* | String | The external ID of the customer. |
brand | String | Brand identifier, possibly indicating the company or product line. |
transactionNumber | String | Unique identifier for the transaction. |
notes | String | Additional notes or comments related to the transaction. |
rewardOwnershipRO | Object | Owner validation for issuance of rewards only when the owner's details are provided. |
ownerType | Enum | Module for which the reward was created. Supported values: Loyalty program, Milestones, Campaigns, Journeys, Goodwill. |
ownerId | String | Unique identifier of the owner to claim the reward. Ex:12345678 |
rewards | Array | A list of rewards associated with the transaction. |
-rewardId | Integer | The unique identifier of a specific reward. |
-quantity | Integer | The quantity of the specific reward issued. |
-paymentConfig | Object | Payment configuration details for the reward. |
--id | Integer | Unique identifier for the payment configuration. |
--paymentMode | Enum | The type of payment mode supported to redeem the reward. Supported values: POINTS, FREE, CASH, POINTS_CASH,CONV_RATIO. For more information, refer to Supported payment modes. |
tender | Object | The tender details contain the customer transaction details. For example, if the customer has opted for a CASH+POINTS payment mode and uses the card to pay for the reward, then the card information is captured here. |
totalAmount | Integer | The total amount the customer is required to pay to purchase the reward. |
methodOfPayment | Enum | The method the customer uses to pay for the reward. |
methodOfPaymentId | String | You can enter the identifier for the payment method. |
tenderId | Integer | Enter a unique identifier for the tender. |
amount | Integer | The amount paid from the payment mode. |
{
"mobile": "919456430850",
"brand": "BUKL",
"transactionNumber": "23444",
"notes": "test"
}
{
"externalId": "919456430850",
"brand": "BUKL",
"transactionNumber": "01987"
}
{
"emailId": "[email protected]",
"brand": "BUKL",
"transactionNumber": "23444",
"notes": "test"
}
{
"mobile": "917411982768",
"brand": "SAHANA_TEST",
"rewardOwnershipRO": {
"ownerType": "CAMPAIGNS",
"ownerId": "abc7"
}
}
{
"mobile": "919825752814",
"brand": "testOrg_marvel_20230822_147",
"transactionNumber": "2344s4",
"notes": "This is test",
"rewards": [
{
"rewardId": 56037,
"quantity": 1,
"paymentConfig": {
"id": 18,
"paymentMode":"CONV_RATIO",
"points":400
}
}
],
"tender":{
"totalAmount":100,
"tenders":[
{
"methodOfPayment":"CARD",
"methodOfPaymentId":"HDFC",
"tenderId":"123",
"amount":40
},
{
"methodOfPayment":"CARD",
"methodOfPaymentId":"ICICI",
"tenderId":"123456",
"amount":60
}
]
}
}
Response parameters
Parameter | Data Type | Description |
---|---|---|
success | Boolean | Indicates if the request was successful |
code | Integer | HTTP status code of the response |
message | String | Description of the response status |
pointsRedeemed | String | Number of points redeemed |
couponCode | String | The coupon code issued |
codeExpiry | String | Expiry date and time of the coupon |
promotion | String | Information about the promotion |
vendor | String | Information about the vendor |
{
"status": {
"success": true,
"code": 200,
"message": "Reward issued successfully"
},
"intouch": {
"pointsRedeemed": "50",
"couponCode": "T4NLN0ZV",
"codeExpiry": "2023-06-09 00:00:00"
},
"promotion": null,
"vendor": null
}
API-specific error codes
Error code | Description |
---|---|
8003 | fail to issue reward as Reward is disabled or not started yet or expired |
3004 | Brand not found |
8004 | fail to issue reward as points are not redeemable |
12005 | Reward constraint evaluation failed. Request failed. Max limit for the DAYS is reached. Allowed limit is 15 For Level CUSTOMER |