Create Vendor Redemption

Vendor Redemption API enables a brand to interact with third-party vendor systems for redeeming rewards. Example: The brand wants to issue a gift card through a third-party vendor, ABC. This API provides the necessary details to the ABC vendor to process the reward redemption.

👍

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

URIapi_gateway/rewards/core/v1/vendor/redemption/create
HTTP MethodPOST
PaginationNo
Batch supportNo
Rate limit informationNone

API endpoint example

https://eucrm.cc.capillarytech.com/api_gateway/rewards/core/v1/vendor/redemption/create

Request body parameters

ParameterData TypeDescription
brandIdIntegerThe unique ID of the brand.
vendorIdStringThe unique ID of the vendor.
nameStringThe name defined by the brand for the vendor reward.
redemptionTypeEnumSpecifies the method by which a customer can redeem rewards.
--actionsArray of ObjectsAn array containing action objects to be executed.
-nameStringThe name of the action to be executed.
-execOrderIntegerThe execution order of the action.
-apiUrlStringThe URL to which the API request is made.
-apiTypeStringThe HTTP method to be used for the API request.
-apiBodyStringThe API body for the external API endpoint, allowing you to include additional data like custom fields, fulfillment status, and the reward transaction ID.
-apiHeadersObjectAn object containing the headers to be sent with the API request.
--acceptStringThe accept header indicating the expected response format.
--Content-TypeStringThe content type header indicating the format of the request body.
--AuthorizationStringThe authorization header containing the authentication credentials.
-apiBodyStringThe API body for the external API endpoint, allowing you to include additional data like custom fields, fulfillment status, and the reward transaction ID.
--contextKeysObjectAn object containing context keys for extracting values from the response.
--voucherStringDefines a key which is a temporary variable that holds data from an API's response. You define it to extract specific information like a voucher code from an API's reply and then use that same key to pass the data into the request body of a subsequent API. Example: “contextKeys”: {“voucher”: “response.coupon.code”} stores the voucher code. You then use “apiBody”: {“voucherCode”: “${voucher}”} to insert it into the next API call.
-responseKeysArray of StringsAn array of keys to be extracted from the API response for subsequent use.
--voucherStringDefines a key which determines what data is returned in the final response to the client. After your APIs have executed, you specify which of your collected context key values should be included in the final output. Example: “responseKeys”: [“status”, “voucher”] ensures the final response only contains the values stored in the specified voucher key.
{
    "status": {
        "success": true,
        "code": 5012,
        "message": "Vendor redemption created successfully"
    },
    "redemption": {
        "id": 24332,
        "name": "Tiles",
        "redemptionType": "MILES",
        "enabled": true,
        "lastUpdatedOn": null,
        "lastUpdatedOnDateTime": null,
        "actionCount": 1
    }
}
{
  "vendorId" : 1,
  "brandId" : 1,
  "enabled" : true,
  "redemptionType" : "VENDOR_ONLY_REWARD",
  "name" : "Vendor Redemption",
  "responseKeys" : [ "status", "voucher" ],
  "actions" : [ {
    "name" : "Action",
    "enabled" : true,
    "apiType" : "POST",
    "apiUrl" : "https://partial.com/coupon/issue",
    "apiBody" : "{\"transactionId_property\": \"${rewardTransactionId}\",\"customFields_property\": {\"customField_1_property\": \"${customfield_CF1}\"}, \"fulfillmentStatus_property\": \"${fulfillmentStatus}\"}",
    "execOrder" : 1,
    "retryAction" : false,
    "contextKeys" : {
      "voucher" : "response.coupon.code",
      "status" : "response.status"
    },
    "apiHeaders" : {
      "accept" : "application/json"
    }
  } ]
}

Response parameters

ParameterDatatypeDescription
successBooleanIndicates whether the API call was successful or not.
codeIntegerThe code associated with the response.
messageStringA message providing details about the response.
idIntegerThe unique identifier for the redemption object.
nameStringThe name associated with the redemption object.
redemptionTypeEnumThe type of redemption.
enabledBooleanIndicates whether the redemption is currently enabled.
lastUpdatedOnDateIndicates the timestamp when the vendor redemption was updated. The timestamp is in Epoch time format.
actionCountIntegerThe count of the number of redemptions.
lastUpdatedByLongThe unique identifier of the user who last updated the vendor redemption record.
createdByStringThe unique identifier of the user who created the vendor redemption.
createdOnStringIndicates the timestamp when the vendor redemption was created. The timestamp is in Epoch time format.
{
    "status": {
        "success": true,
        "code": 5012,
        "message": "Vendor redemption created successfully"
    },
    "redemption": {
        "id": 27802,
        "name": "jotest",
        "redemptionType": "VOUCHER",
        "enabled": true,
        "lastUpdatedOn": 1748344737000,
        "lastUpdatedOnDateTime": "2025-05-27T11:18:57Z",
        "actionCount": 1,
        "createdBy": 75161973,
        "lastUpdatedBy": 75161973,
        "createdOn": 1748344737000,
        "createdOnDateTime": "2025-05-27T11:18:57Z"
    }
}
``<code>json

</code>``json
With custom field, fulfilment and transaction id
{
  "vendorId" : 1,
  "brandId" : 1,
  "enabled" : true,
  "redemptionType" : "VENDOR_ONLY_REWARD",
  "name" : "Vendor Redemption",
  "responseKeys" : [ "status", "voucher" ],
  "actions" : [ {
    "name" : "Action",
    "enabled" : true,
    "apiType" : "POST",
    "apiUrl" : "https://partial.com/coupon/issue",
    "apiBody" : "{\"transactionId_property\": \"\$\{rewardTransactionId\}\",\"customFields_property\": {\"customField_1_property\": \"\$\{customfield_CF1\}\"}, \"fulfillmentStatus_property\": \"\$\{fulfillmentStatus\}\"}",
    "execOrder" : 1,
    "retryAction" : false,
    "contextKeys" : {
      "voucher" : "response.coupon.code",
      "status" : "response.status"
    },
    "apiHeaders" : {
      "accept" : "application/json"
    }
  } ]
}
Language
Credentials
Basic
base64
:
URL
Click Try It! to start a request and see the response here!