Update Vendor Redemption API enables a brand to modify an existing vendor redemption configuration with updated details.
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
<https://{host}/api_gateway/rewards/core/v1/vendor/redemption/{id}/brand/{brandId}
Path Parameters
Parameter | Data Type | Description |
---|---|---|
id* | Integer | The unique identifier of the redemption. |
brandId* | Integer | The unique identifier of the brand. You can get the brand ID from this API. |
Request Body Parameters
Parameter | Data Type | Description |
---|---|---|
| String | The name defined by the brand for the vendor reward. |
| Enum | Specifies the method by which the customer can redeem rewards.
Supported values: VENDOR_ONLY_REWARD |
| Object | Specifies the Name, Endpoint URL, API Type, API Headers, and the API Body of the internal API that executes a specific action. |
| String | The URL to which the API request is made. For example, |
| ||
| String | The API body for the external API endpoint specified in |
| String | The name of the action to be executed. |
| Integer | The execution order of the action. |
| String | The HTTP method to be used for the API request. |
| Boolean | Indicates whether the action should be retried on failure ( |
| Integer | A unique identifier for the action. |
| Boolean | Specifies if the action is active ( |
| Object | An object containing the headers to be sent with the API request. |
| String | The authorization header containing the authentication credentials. |
| String | The content type header indicating the format of the request body. |
| Object | An object containing context keys for extracting values from the response. |
| String | The context key for extracting the voucher ID from the response. |
| Array | A list of response keys expected from the vendor API. |
| String | The unique ID of the vendor. |
| Boolean | Indicates whether this vendor redemption configuration is active ( |
curl --location --request PUT 'https://eu.api.capillarytech.com/api_gateway/rewards/core/v1/vendor/redemption/25772/brand/61' \
--header 'Content-Type: application/json' \
--header 'Accept: */*' \
--header 'Authorization: Basic Z2VvcmdlLmpvaG5zb246OTg4OTU2NWI4ODVhMmY4ZWE1MTk1MjA2NWEwYTEzNzg=' \
--header 'Cookie: _cfuvid=sjLi_VBF4c21ARYHyb89m7Ie4hT.cyU.hrMuLKMO8c8-1743398935789-0.0.1.1-604800000; _cfuvid=BG9uxQz5z1ZL.UwBkabqmxay.hK4lYZLLcohcMXHPfc-1744720306503-0.0.1.1-604800000' \
--data '{
"name": "miles",
"redemptionType": "MILES",
"actions": [
{
"apiUrl": "https://eucrm.cc.capillarytech.com/v1.1/coupon/issue",
"apiBodyField": "{\"root\": {\"coupon\": [{\"customer\": {\"mobile\": \"${mobile}\"}, \"series_id\": 716308}]}}",
"apiBody": "{\"root\": {\"coupon\": [{\"customer\": {\"mobile\": \"${mobile}\"}, \"series_id\": 716308}]}}",
"name": "test12345",
"execOrder": 1,
"apiType": "POST",
"retryAction": false,
"actionId": 20811,
"enabled": true,
"apiHeaders": {
"Authorization": "Basic Ymxpc3M6MWY5OTRhMjQ1M2M0MWM3YzVjZTJmNGRjNzU5MWI1NzY=",
"Content-Type": "application/json"
},
"contextKeys": {
"voucher": "response.coupon.code"
}
}
],
"responseKeys": [
"voucher"
],
"vendorId": "124",
"enabled": true
}'
Response Parameters
Parameter | Data Type | Description |
---|---|---|
success | Boolean | Indicates whether the API call was successful. |
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 | Date | The timestamp when the vendor redemption was updated, in Epoch time format. |
lastUpdatedBy | Long | The till ID of the user who last updated the vendor redemption record. |
createdBy | String | The till ID of the user who created the vendor redemption. |
createdOn | String | The timestamp when the vendor redemption was created, in Epoch time format. |
{
"status": {
"success": true,
"code": 5016,
"message": "Vendor redemption updated successfully"
},
"redemption": {
"id": 25772,
"name": "miles",
"redemptionType": "MILES",
"enabled": true,
"lastUpdatedOn": 1747903919000,
"lastUpdatedOnDateTime": "2025-05-22T08:51:59Z",
"actionCount": 4,
"createdBy": null,
"lastUpdatedBy": 75161973,
"createdOn": 1744720255000,
"createdOnDateTime": "2025-04-15T12:30:55Z"
}
}