post https://{host}/api_gateway/rewards/core/v1/vendor/redemption/create
Vendor Redemption is an API workflow that enables the system to interact with third-party vendor systems for reward redemption.
This API is used to create a vendor redemption for the organization. You can use this API to define the redemption type and the details for how the customer will exchange the redemption.
Example: A Customer wants to exchange loyalty points for a value of INR 100. You can pass the cash amount to INR 100 using the vendor API.
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
- Authentication: Basic or OAuth authentication
- Default access group
Resource information
URI | api_gateway/rewards/core/v1/vendor/redemption/create |
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/vendor/redemption/create
Request body parameters
Parameter | Data Type | Description |
---|---|---|
brandId * | Integer | Unique ID of the brand. |
vendorId * | String | Unique ID of the vendor. |
name * | String | Name defined by the brand for the vendor reward. |
redemptionType * | Enum | Specifies the method by which the customer can redeem rewards. Supported values: GAMES, AUCTION, CART_PROMOTION, CASH_WALLET, VENDOR_ONLY_REWARD, VOUCHER, CASH_BACK, INTOUCH_REWARD, PHYSICAL_REWARD, CHARITY, MILES, GIFT_CARD, SWEEPSTAKES, VENDOR_INTOUCH_REWARD, CARD_DISC. VENDOR_ONLY_REWARD: These are either points or coupons created at the vendor end. VENDOR_INTOUCH_REWARD: These are vendor rewards created at the Capillary end. It is not recommended to use the Vendor Intouch reward redemption type. Instead, you can use the Vendor only reward redemption type to issue coupons directly through the vendor API. You can find more information here.For example, "MILES" indicates that the customer can use miles accumulated through the loyalty program for redemption against payment or points. |
action | Object | Specifies the endpoint URL and the api body of the internal API that executes a specific action. For example, "apiUrl": "https://crm-nightly-new.cc.capillarytech.com/v1.1/request/add?program_id=2851" specifies the endpoint where the request to add goodwill points will be made. |
name | String | The name of the action to be executed. |
execOrder | Integer | The execution order of the action. |
apiUrl | String | The URL to which the API request is made. This defines the internal API URL. |
apiType | String | The HTTP method to be used for the API request. |
apiHeaders | Object | An object containing the headers to be sent with the API request. |
accept | String | The accept header indicating the expected response format . |
Content-Type | String | The content type header indicating the format of the request body. |
Authorization | String | The authorization header containing the authentication credentials. |
apiBody | String | The JSON-formatted string representing the body of the API request. |
root | Object | The root object of the JSON body. |
request | Array of Objects | An array of request objects. |
customer | Object | An object containing customer details. |
mobile | String | The mobile number of the customer. |
comments | String | Comments or notes related to the API service request. |
reason | String | The reason for issuing goodwill points. |
type | String | The type of the request. |
base_type | String | The base type of the points. |
points | String | The number of points to be awarded. |
contextKeys | Object | An object containing context keys for extracting values from the response. |
voucher | String | The context key for extracting the voucher ID from the response. |
{
"brandId": 47,
"vendorId": 138,
"name": "Miles",
"redemptionType": "MILES",
"actions": [
{
"name": "add good will points",
"execOrder": 1,
"apiUrl": "https://crm-nightly-new.cc.capillarytech.com/v1.1/request/add?program_id=2851",
"apiType": "POST",
"apiHeaders": {
"accept": "application/json",
"Content-Type": "application/json",
"Authorization": "Basic bHVjaWF1dG9fdGlsbF8xMDoyMDJjYjk2MmFjNTkwNzViOTY0YjA3MTUyZDIzNGI3MA=="
},
"apiBody": "{\"root\":{\"request\":[{\"customer\":{\"mobile\":\"${mobile}\"},\"comments\":\"APIServicerequest-Awarding200points.\",\"reason\":\"IssueGoodwillpoints\",\"type\":\"GOODWILL\",\"base_type\":\"POINTS\",\"points\":\"${redemptionValue}\"}]}}",
"contextKeys": {
"voucher": "response.requests.request.get(0).id"
}
}
],
"responseKeys": [
"voucher"
]
}
Response parameters
Parameter | Datatype | Description |
---|---|---|
success | Boolean | Indicates whether the API call was successful or not. |
code | Integer | The code associated with the response. |
message | String | A message providing details about the response. |
id | Integer | The unique identifier for the redemption object. |
name | String | The name associated with the redemption object. |
redemptionType | Enum | The type of redemption. |
enabled | Boolean | Indicates whether the redemption is currently enabled. |
lastUpdatedOn | Null | The last update timestamp of the redemption object. |
actionCount | Integer | The count of the number of redemptions. |
{
"status": {
"success": true,
"code": 5012,
"message": "Vendor redemption created successfully"
},
"redemption": {
"id": 5666,
"name": "Miles",
"redemptionType": "MILES",
"enabled": true,
"lastUpdatedOn": null,
"actionCount": 1
}
}