Issue user reward

This API is used to issue a reward to the user based on mobile number/ email ID/ external ID

๐Ÿ‘

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/user/reward/{reward Id}/issue?username={store}&skip_validation=true
HTTP MethodPOST
PaginationNo
Batch supportNo
Rate limit informationNone

API endpoint example

https://eucrm.cc.capillarytech.com/api_gateway/rewards/core/v1/user/reward/{reward Id}/issue?username={store}&skip_validation=true

Request path parameters

Parameter NameData TypeDescription
Reward ID*StringUnique identifier of the reward. It can be obtained by creating the Reward.

Request query parameters

Parameter NameData TypeDescription
username*StringTill username
skip_validationBooleanA validation code is used to redeem points for the transaction. skip_validation is set to true as brands configured in Marvel bypass validation code.

Request body parameters

ParameterData TypeDescription
mobileStringThe mobile phone number associated with the transaction.
Email*StringThe email ID of the customer.
External ID*StringThe external ID of the customer.
brandStringBrand identifier, possibly indicating the company or product line.
transactionNumberStringUnique identifier for the transaction.
notesStringAdditional notes or comments related to the transaction.
rewardOwnershipROObjectOwner validation for issuance of rewards only when the owner's details are provided.
ownerTypeEnumModule for which the reward was created. Supported values: Loyalty program, Milestones, Campaigns, Journeys, Goodwill.
ownerIdStringUnique identifier of the owner to claim the reward. Ex:12345678
rewardsArrayA list of rewards associated with the transaction.
-rewardIdIntegerThe unique identifier of a specific reward.
-quantityIntegerThe quantity or redemption value of the specific reward issued.
-paymentConfigObjectPayment configuration details for the reward.
Note: Payment Config Block is optional for Single Payment Config Rewards.
--idIntegerUnique identifier for the payment configuration. (id can be obtained from Get reward by ID.)
tenderObjectThe tender details contain the customer transaction details used to purchase the reward. For example, if the customer has opted for a CASH+POINTS payment mode and uses the card to pay for the reward, then the card information is captured here.
totalAmountIntegerThe total amount the customer is required to pay to purchase the reward.
methodOfPaymentEnumThe method the customer uses to pay for the reward. For example: If a customer is using a card as the payment method, you can enter the method of payment as "card".
methodOfPaymentIdStringA unique identifier for the payment method used.
tenderIdIntegerA unique identifier for the tender.
amountIntegerThe amount paid from the payment mode.
customFieldsObjectThe list of custom fields associated with the reward issued to the customer. A custom field allows you to add extra information related to the reward.
You can add the custom field in the issue reward call once the custom field is created using the create custom field API.
fulfillmentDetailsObjectThe list of fulfillment details associated with the reward. There can be multiple stages that the reward undergoes, such as BOOKED, ON THE WAY, DELIVERED.
For example, A brand can have a fulfillment status as the Reward is SHIPPED before delivering the reward to the customer.
You can create a fulfillment status using the Create fulfillment status API and use it in the issue reward call.

{
  "mobile": "919456430850",
  "brand": "BUKL",
  "transactionNumber": "23444",
  "notes": "test"
}
{
  "externalId": "919456430850",
  "brand": "BUKL",
  "transactionNumber": "01987"
}
{
  "emailId": "[email protected]",
  "brand": "BUKL",
  "transactionNumber": "23444",
  "notes": "test"
}
{
    "mobile": "917411982768",
    "brand": "SAHANA_TEST",
    "rewardOwnershipRO": {
        "ownerType": "CAMPAIGNS",
        "ownerId": "abc7"
    }
}
{
    "mobile": "919825752814",
    "brand": "testOrg_marvel_20230822_147",
    "transactionNumber": "2344s4",
    "paymentConfig":{
        "id":55
    },"tender":{
        "totalAmount":100,
        "tenders":[
            {
                "methodOfPayment":"CARD",
                "methodOfPaymentId":"HDFC",
                "tenderId":"123",
                "amount":40
            },
            {
                "methodOfPayment":"CARD",
                "methodOfPaymentId":"ICICI",
                "tenderId":"123456",
                "amount":60
            }
        ]
    }
}
{
    "brand": "brand",
    "transactionNumber": "123456789",
    "mobile": "916677777777",
    "customFields":{
        "issue-reward-3":"issue-reward-values"
    },
    "fulfillmentDetails":{
        "status":"DELIVERED"
    }
}

Response parameters

ParameterData TypeDescription
successBooleanIndicates whether the operation to issue a reward was successful.
codeIntegerThe HTTP status code related to the reward issuance operation.
messageStringDescriptive message about the reward issuance outcome.
pointsRedeemedStringThe number of points redeemed in the transaction.
couponCodeStringA unique code representing the coupon issued.
codeExpiryStringThe expiration date and time of the coupon code.
promotionNullInformation about any promotion associated with the transaction.
vendorNullDetails about the vendor involved in the transaction, if any.
paymentModeStringThe mode of payment used in the transaction (e.g., "POINTS").
idIntegerUnique identifier for the payment configuration.
pointsFloatThe exact number of points used in the payment configuration.
fulfillmentDetailsNullDetails about the fulfillment process of the transaction, if any.
customFieldsNullAny additional custom fields associated with the transaction.

{
    "status": {
        "success": true,
        "code": 200,
        "message": "Reward issued successfully"
    },
    "intouch": {
        "pointsRedeemed": "50",
        "couponCode": "01514728726691158319",
        "codeExpiry": "2025-04-10 00:00:00"
    },
    "promotion": null,
    "vendor": null,
    "paymentConfig": {
        "paymentMode": "POINTS",
        "id": 55,
        "points": 50.0000
    },
    "fulfillmentDetails": null,
    "customFields": null
}

API-specific error codes

Error codeDescription
400Invalid payment mode passed. Payment configuration id is mandatory
3004Brand not found
8003fail to issue reward as Reward is disabled or not started yet or expired
8004fail to issue reward as points are not redeemable
8010Reward issued partially
12005Reward constraint evaluation failed. Request failed. Max limit for the DAYS is reached. Allowed limit is 15 For Level CUSTOMER
12016Invalid payment mode passed.
12034User Doesn't Belong To Segment Partition Defined For Reward SegmentId:PartitionId 6136:2675, 6135:2674
Language
Authorization
Basic
base64
:
URL
Click Try It! to start a request and see the response here!