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

Parameter

Data Type

Description

brandId*

Integer

The unique ID of the brand.

vendorId*

String

The unique ID of the vendor.

name*

String

The 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's not recommended to use the Vendor Intouch reward redemption type. Instead, use the Vendor only reward redemption type to issue coupons directly through the vendor API. You can find more information

action

Object

Specifies the Name, Endpoint URL, API Type, API Headers, and the API Body of the internal API that executes a specific action.

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. For example, "apiUrl": "https://partial.com/reward/issue" specifies the endpoint where the request to issue a reward will be made.

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 API body for the external API endpoint specified in apiUrl allows you to include additional data.
This includes custom fields, fulfillment status, and reward transaction ID, all of which are variables resolved by the backend based on the associated transaction.* Custom Field: Add extra data to your API request. Use the format customfield_customFieldName. For instance, if you have a custom field named "Address: Bangalore," write it as customfield_Address. The system will then replace this with the value "Bangalore." Keep in mind that only custom fields created with ISSUE_REWARD scope are supported.*


Fulfillment Status: Update the fulfillment status by using the parameter fulfillmentStatus, formatted in camelCase.*
Reward Transaction ID: Include the reward transaction ID to help the vendor identify the transaction linked to the issued reward. Use the parameter rewardTransactionId, formatted in camelCase.


Note:*
The API body also supports other parameters as per your brand's specific requirements or integration needs.

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.

lastUpdatedOnDateTime

String

Last Updated date and time of the field in ISO 8601 format (YYYY-MM-DDTHH:MM:SSZ).


{
    "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!