Update coupon redeem field

This API allows you to update the following details of a redeemed coupon:

  • Transaction number
  • Transaction/Bill amount
  • Bill ID
  • Custom fields

This can be used to add the transaction details in a redeemed coupon that was redeemed before the transaction. The custom fields can be used to monitor the status of coupons associated with the rewards catalog. For example, the redemption status of a third-party coupon that was part of the reward catalog.

👍

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 and OAuth authentication
  • Coupon access group

Resource information

URIv2/coupon/redeem
HTTP methodPUT
PaginationNA
Rate limitNA
Batch supportNA

API endpoint example

https://eucrm.cc.capillarytech.com/v2/coupon/redeem

Request body parameters

FieldData TypeDescription
redemptionsObjectObject containing redemption details.
redemptionId*IntegerUnique identifier for the redemption.
billAmount*IntegerThe amount of the bill associated with the redemption.
transactionNumberStringUnique number identifying the transaction.
billIdIntegerUnique identifier for the bill associated with redemption.
customFieldsArrayArray of custom fields.
cf_key_1, cf_key_2StringKeys for custom fields, indicating their purpose.
cf_value_1, cf_value_2StringValues for the custom fields.
userObjectAn object representing the user.
mobileStringThe mobile number of the user.
{
  "redemptions": [
    {
      "redemptionId": 123,
      "billAmount": 100,
      "transactionNumber": "numbr9435064964",
      "billId": 123
    }
    {
      "redemptionId": 123,
      "billAmount": 100,
      "transactionNumber": "numbr9435064964",
      "billId": 123,
      "customFields":{"cf_key_1":"cf_value_1"}, {"cf_key_2":"cf_value_2"}
    }
  ],
  "user": {
    "mobile: “126080386”
  },
}

Response parameters

FieldData TypeDescription
entityObjectRoot object containing all data related to the entity.
redemptionsArrayAn array of redemption objects.
redemptionIdNumberUnique identifier for the redemption.
billAmountNumberThe amount of the bill associated with the redemption.
transactionNumberStringUnique string identifying the transaction.
billIdNumberA unique identifier for the bill associated with redemption.
customFieldsObjectAn object for additional, custom fields.
redemptionStatusObjectObject containing status information about the redemption.
statusBooleanIndicates the success or failure of the redemption.
codeNumberA code representing the status of the redemption.
messageStringA message describing the redemption status.
userObjectAn object representing the user.
idNumberUnique identifier of the user.
profilesArrayAn array of profiles associated with the user.
firstName, lastNameStringUser's first and last name.
fields, allFieldsObjectObjects for additional fields, possibly empty.
identifiersArrayAn array of identifiers for the user.
typeStringType of identifier (e.g., email, mobile).
valueStringThe value of the identifier.
commChannelsArrayAn array of communication channels.
userIdNumberThe user's identifier, similar to id.
accountIdStringAccount identifier, if any (empty in the provided data).
autoUpdateTimeStringTimestamp of the last automatic update.
identifiersAllArrayAn array of all identifiers, similar to identifiers.
status (at entity level)ObjectObject containing overall status information.
totalCountIntegerTotal count of transactions or operations attempted.
failedCountIntegerCount of transactions or operations that failed.
warningsArrayAn array of warnings, if any (empty in the provided data).
errorsArrayAn array of errors, if any (empty in the provided data).
successBooleanIndicates the overall success of the operation.
{
    "entity": {
        "redemptions": [
            {
                "redemptionId": 2509136,
                "billAmount": 0.0,
                "transactionNumber": "updated-trans_for demo",
                "billId": 10000,
                "customFields": {
                    "test": "test"
                },
                "redemptionStatus": {
                    "status": true,
                    "code": 761,
                    "message": "Coupon redemption update successful"
                }
            },
            {
                "redemptionId": 25091316,
                "billAmount": 0.0,
                "transactionNumber": "updated-trans",
                "billId": 9999,
                "customFields": {
                    "test": "test"
                },
                "redemptionStatus": {
                    "status": false,
                    "code": 510,
                    "message": "Invalid Redemption ids present"
                }
            }
        ],
        "user": {
            "id": 374658850,
            "profiles": [
                {
                    "firstName": "plerthprth",
                    "lastName": "gmmlzilbpg",
                    "fields": {},
                    "allFields": {},
                    "identifiers": [
                        {
                            "type": "email",
                            "value": "[email protected]"
                        },
                        {
                            "type": "mobile",
                            "value": "918028464628"
                        },
                        {
                            "type": "externalId",
                            "value": "x918028464628"
                        }
                    ],
                    "commChannels": [],
                    "userId": 374658850,
                    "accountId": "",
                    "autoUpdateTime": "2024-03-06T16:31:34+05:30",
                    "identifiersAll": [
                        {
                            "type": "email",
                            "value": "[email protected]"
                        },
                        {
                            "type": "mobile",
                            "value": "918028464628"
                        },
                        {
                            "type": "externalId",
                            "value": "x918028464628"
                        }
                    ]
                }
            ]
        },
        "status": {
            "status": true,
            "code": 762,
            "message": "Coupon redemption update partially successful"
        },
        "totalCount": 2,
        "failedCount": 1
    },
    "warnings": [],
    "errors": [],
    "success": true
}
Language
Authorization
Basic
base64
:
URL
Click Try It! to start a request and see the response here!