put https://{host}/api_gateway/rewards/core/v1/vendor/redemption//brand/
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 ? | Unique identifier of the redemption . |
brandId* | integer | Unique identifier of the brand. You can get the brand ID from this API |
Request Body Parameters
Parameter | Data Type | Description |
---|---|---|
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. |
actions | Object | Specifies the Name, Endpoint URL, API Type, API Headers and the API Body of the internal API that executes a specific action. |
- apiUrl | String | The URL to which the API request is made. For example, "apiUrl": "https://partial.com/reward/issue" specifies the endpoint where the request to issue a reward will be made. |
- apiBodyField | ||
- apiBody | String | The API body for the external API endpoint specified in “apiUrl”. You can also include custom fields, fulfilment status and reward transaction ID. The fulfilment status and the reward transaction ID are variables resolved in the backend according to the associated transaction. - Custom Field: Enables brands to add additional data in the API request. Use the format customfield_customFieldName. For example, a custom field named "Address: Bangalore" should be written as customfield_Address then it will replace the value of custom field with Bangalore. Note: Only custom field created withISSUE REWARDscope is supported. - Fulfillment Status: Enables to update the fulfilment status. Use the parameter fulfillmentStatus, formatted in camelCase. - Reward Transaction ID: Enables to add the reward transaction ID. This helps the vendor to identify the transaction associated with the issued reward. Use the parameter rewardTransactionId, formatted in camelCase. NOTE: - The API body supports other parameters that can be included based on the brand's specific requirements or integration needs. - Internal Capillary APIs can also be used. |
- name | String | The name of the action to be executed. |
- execOrder | Integer | The execution order of the action. |
- apiType | String | The HTTP method to be used for the API request. |
- retryAction | Boolean ? | Indicates whether the action should be retried on failure (true/false). |
- actionId | Integer? | Unique identifier for the action. |
- enabled | Boolean? | Specifies if the action is active (true/false). |
- apiHeaders | Object | An object containing the headers to be sent with the API request. |
-- Authorization | String | The authorization header containing the authentication credentials. |
-- Content-Type | String | The content type header indicating the format of the request body. |
- 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. |
responseKeys | Array? | List of response keys expected from the vendor API. |
vendorId | String | Unique ID of the vendor. |
enabled | Boolean? | Indicates whether this vendor redemption configuration is active (true/false). |
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
Parameters | Data Type | 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. |
{
"status": {
"success": true,
"code": 5016,
"message": "Vendor redemption updated successfully"
},
"redemption": {
"id": 25772,
"name": "miles",
"redemptionType": "MILES",
"enabled": true,
"lastUpdatedOn": 1744720255000,
"lastUpdatedOnDateTime": "2025-04-15T12:30:55Z",
"actionCount": 2
}
}