Issue bulk reward

This API is used to issue multiple rewards to the user based on mobile number/ email Id.

While issuing bulk rewards,

  1. The intouch points required to purchase the rewards are summed up and isRedeemable call checks if the customer has enough points or not.

    1. If the customer has enough points, then all the rewards in the issue bulk call are issued in a single shot
    2. If the customer doesn't have enough points, then the issue bulk call is failed and no reward is issued.
  2. If the isRedeemable call is successful, then the system will issue the rewards to the user.

    1. Let's say, one reward is coupon, another is cart promotion in the request payload. Coupon is issued but cart promotion issual failed, this can happen and the coupon will be issued. Here in this case, partial issual will be successful.
  3. Ensure that the quantity field is included in the single issue reward call to maintain consistency with the bulk issue reward call.


    👍

    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/rewards/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/rewards/issue?username=swati&skip_validation=true

    Request body parameters

ParameterData TypeDescription
mobile*StringMobile phone number of the customer.
Email IDStringEmail ID of the customer.
brandStringBrand associated with the transaction.
transactionNumberStringUnique identifier for the transaction.
quantity*IntegerQuantity of the specified reward. (quantity cannot be null and should be greater than 1 for bulk reward issue)
rewardsArrayArray of rewards associated with the transaction.
rewardIdIntegerUnique identifier for a reward.
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.

Request query parameters

ParameterData TypeDescription
Username*StringUsername name of the store.
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.
{
   "mobile": "919456430850",
   "brand": "BUKL",
   "transactionNumber": "transacqwert",
   "rewards": [
      
       {
           "rewardId": 13,
           "quantity": 1
       },
       {
           "rewardId": 12,
           "quantity": 1
       }
   ]
}

{
    "mobile": "919825752814",
    "brand": "testOrg_marvel_20230822_147",
    "transactionNumber": "2344s4",
    "notes": "This is test",
    "rewards": [
        {
            "rewardId": 63306,
            "quantity": 1,
            "paymentConfig": {
                "id": 90
            }
           {
           "rewardId": 12,
           "quantity": 1,
          "paymentConfig":{
          "id":90
        }

       }
          
        }
    ]
}

{
    "brand": "lekhanaBrand",
    "transactionNumber": "123456789",
    "rewards": [
        {
            "rewardId": 9252,
            "quantity": 1,
            "customFields": {
                "issue-reward-1": "issue-reward-values"
            },
            "fulfillmentDetails": {
                "status": "SHIPPED"
            }
        }
    ],
    "mobile": "916677777777"
}

Response parameters

ParameterData TypeDescription
statusObjectGeneral status of the response.
successBooleanIndicates success status.
codeIntegerStatus code of the API call.
messageStringMessage describing the status.
rewardsArrayArray of rewards details.
statusObjectStatus of each individual reward.
successBooleanIndicates success status of the reward.
codeIntegerStatus code for the reward.
messageStringMessage describing the status of the reward.
rewardIdIntegerUnique identifier for the reward.
requestedQuantityIntegerQuantity of the reward requested.
pointsReferenceIdStringReference ID for points used.
intouchArrayArray of intouch details.
pointsRedeemedStringNumber of points redeemed.
couponCodeStringCoupon code provided.
codeExpiryStringExpiry date and time for the coupon code.
promotionsArrayArray of associated promotions.
vendorArrayArray of associated vendors.
{
   "status": {
       "success": true,
       "code": 200,
       "message": "Reward issued successfully"
   },
   "rewards": [
       {
           "status": {
               "success": true,
               "code": 200,
               "message": "Reward issued successfully"
           },
           "rewardId": 63306,
           "requestedQuantity": 1,
           "pointsReferenceId": "VKAZF2",
           "intouch": [
               {
                   "pointsRedeemed": "50",
                   "couponCode": "JLB71ZRI",
                   "codeExpiry": "2023-06-09 00:00:00"
               },
            "rewardId": 12,
           "requestedQuantity": 1,
           "pointsReferenceId": "ASDFF2",
           "intouch": [
               {
                   "pointsRedeemed": "50",
                   "couponCode": "QWERTY12",
                   "codeExpiry": "2024-06-09 00:00:00"
               }
             
           ],
           "promotions": [],
           "vendor": [],
           "restrictions": null
       }
   ]
}


API-specific error codes

Error codeDescription
8003Fail to issue reward
8010Reward issued partially
12034User Doesn't Belong To Segment Partition Defined For Reward SegmentId:PartitionId 6136:2675, 6135:2674
12005Reward constraint evaluation failed. Request failed. Max limit for the {frequencyType} is reached. Allowed limit is {constraintLimitValue} For Level {LEVEL}
Language
Authorization
Basic
base64
:
URL
Click Try It! to start a request and see the response here!