Redeem Points

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
❗️

Make sure you have the appropriate access control configured. For more information, see access group documentation.

📘

Note

For the v2 equivalent of this API, see Redeem customer points (POST /v2/customers/{id}/redemptions).

Example request

curl -L 'https://eu.api.capillarytech.com/v1.1/points/redeem?skip_validation=false&program_id=973&format=json' \
-H 'Content-Type: application/json' \
-H 'Authorization: Basic 5ZmM2YjZlY2I2MmEy' \
-d '{
    "root": {
        "redeem": [
            {
                "points_redeemed": 1,
                "customer": {
                    "mobile": "919988776655"
                },
               "external_reference_number":"a3fd1a63-1aa3-4c47-9173-398",
               "transaction_number": "bilnum100000", 
                "notes": "Redeemed to transfer points to the friend",
               
                "custom_fields": {
                    "field": [
                        {
                            "name": "point_transfered_to",
                            "value": "9777788221"
                        }
                    ]
                }
            }
        ]
    }
}'

Prerequisites

  • Basic Authentication
  • Default access group
📘

Notes

If you are using validation code, make sure to use it within the validity period.

  • You can check the validity set for the validation code in OTP code validity period field on InTouch > Settings > Organization Setup > OTPConfigurations page.

Body parameters

ParameterData TypeDescription
redeemArrayAn array containing objects representing individual redemption transactions
.points_redeemedIntegerThe number of points that were redeemed in the transaction
..customerObjectAn object containing information about the customer involved in the transaction
...mobile*StringThe mobile phone number of the customer
.transaction_numberStringUnique identifier for the transaction.
.external_reference_numberStringA plain string reference identifier for the points redemption attempt. Each external_reference_number must be unique for a redemption. This is used for an idempotency check. There is no character limit for this parameter.
.notesStringNotes or additional information about the transaction
.validation_codeStringValidation code for the transaction.
.custom_fieldsObjectOrganization-specific custom fields. The custom field must exist in the organization.
..fieldObjectObject containing the key-value pairs for the custom field.
...nameStringKey of the custom field. For example, if the custom field is "redemption_channel", provide the same.
...valueStringValue for the provided custom field name. For example, if the custom field is "redemption_channel", provide a valid enum for the field such as App, Website, In-store, POS.

Query parameters

ParameterData TypeDescription
user_group2_primary_user_idStringUnique user ID of the primary member of the group associated with the points to redeem.
user_group2_idStringUnique ID of the group associated with the points to redeem.
user_group2_external_idStringUnique external ID of the group associated with the points to redeem.
user_group2_primary_user_sourceStringSource in which the primary user's identifier is available.
Allowed values: FACEBOOK, WEB_ENGAGE, WECHAT, INSTORE, MARTJACK, TMALL, TAOBAO, JD, ECOMMERCE, WEBSITE, LINE, MOBILE_APP.
user_group2_primary_user_accountIdStringAccount ID of the source with multiple accounts such as WECHAT.
user_group2_primary_user_identifier_typeStringIdentifier type used for the primary member.
Allowed values: mobile, email, cardnumber, cardExternalId, id.
user_group2_primary_user_identifier_valueStringValue of the specified identifier type.
skip_validationBooleanPass true to skip customer validation to redeem points.
program_idStringUnique ID of the program from which points need to be redeemed. Applicable for orgs with multi-loyalty program enabled.
validation_typeStringValidation type used to redeem points.
Allowed values: MISSED_CALL, SMS.
❗️

Note

You must provide at least one of the parameters marked with ** for group level points redemption.

Example response

{
    "response": {
        "status": {
            "success": "true",
            "code": 200,
            "message": "Success"
        },
        "responses": {
            "points": {
                "mobile": "919777788221",
                "email": "[email protected]",
                "external_id": "123456",
                "user_id": "564670755",
                "redemption_id": "7t4y2a",
                "points_redeemed": "1",
                "redemption_purpose": "",
                "redeemed_value": 1,
                "redeemed_local_value": 1,
                "balance": 1990,
                "side_effects": {
                    "effect": [
                        {
                            "id": 27141811,
                            "case_value": "false",
                            "num_points": 1,
                            "currency_value": 1,
                            "validation_code": "NS3U05",
                            "points_redemption_summary_id": "27141811",
                            "redeemed_on_bill_number": "bilnum100000",
                            "redeemed_on_bill_id": -1,
                            "type": "points"
                        }
                    ]
                },
                "item_status": {
                    "success": "true",
                    "code": 800,
                    "message": "Points Redeemed"
                }
            }
        }
    }
}
{
    "response": {
        "status": {
            "success": "true",
            "code": 200,
            "message": "Success"
        },
        "responses": {
            "points": {
                "mobile": "919998872203",
                "email": "[email protected]",
                "external_id": "",
                "user_id": "568376576",
                "redemption_id": "uN1oA9",
                "points_redeemed": "10",
                "redemption_purpose": "",
                "redeemed_value": 10,
                "redeemed_local_value": 10,
                "balance": 10000,
                "is_group_redemption": true,
                "side_effects": {
                    "effect": [
                        {
                            "id": 28453291,
                            "case_value": "false",
                            "num_points": 10,
                            "currency_value": 10,
                            "validation_code": "",
                            "points_redemption_summary_id": "28453291",
                            "redeemed_on_bill_number": "txn-166",
                            "redeemed_on_bill_id": -1,
                            "type": "points"
                        }
                    ]
                },
                "item_status": {
                    "success": "true",
                    "code": 800,
                    "message": "Points Redeemed"
                }
            }
        }
    }
}

Response parameters

ParameterData TypeDescription
responseObjectThe root object that contains all the details of the response.
.statusObjectAn object containing the status details of the response.
..successStringA string indicating the success status of the response.
..codeIntegerThe HTTP status code associated with the response.
..messageStringA general message providing additional information about the status of the response.
.responsesObjectAn object containing detailed response data.
..pointsObjectAn object containing detailed information about the points involved in the transaction.
...mobileStringThe mobile phone number associated with the account involved in the transaction.
...emailStringThe email address associated with the account involved in the transaction.
...external_idStringAn external identifier for the transaction.
...user_idStringThe user ID associated with the account involved in the transaction.
...redemption_idStringA unique identifier for the redemption transaction.
...points_redeemedStringThe number of points that were redeemed in the transaction.
...redemption_purposeStringThe purpose of the redemption.
...redeemed_valueIntegerThe value of the points that were redeemed.
...redeemed_local_valueIntegerThe local value of the points that were redeemed.
...balanceIntegerThe remaining balance of points in the account after the redemption.
...is_group_redemptionBooleantrue when the redemption was processed as a cross-member First Expiry, First Out (FEFO) redemption. Present only when ENABLE_CROSS_MEMBER_REDEMPTION is enabled for the org and the transacting customer is an active member of a UserGroup2 group. Not present for standard individual or UserGroup2 group redemptions using user_group2_* params.
...side_effectsObjectAn object containing information about any side effects of the redemption.
....effectArray of ObjectsAn array containing objects representing individual effects of the redemption.
.....idIntegerA unique identifier for an individual effect.
.....case_valueStringA string indicating whether a certain case is true for the effect. If your loyalty program doesn't have tracker cases configured for redemptions, the Points Engine returns "false" to indicate: no case matching was performed, tracker-based redemption rules are not active, and standard redemption rules were applied.
.....num_pointsNumberThe number of points involved in the effect.
.....currency_valueIntegerThe currency value associated with the effect.
.....validation_codeStringA validation code associated with the effect.
.....points_redemption_summary_idStringA summary ID associated with the points redemption.
.....redeemed_on_bill_numberStringThe bill number associated with the redemption.
.....redeemed_on_bill_idIntegerThe bill ID associated with the redemption.
.....typeStringThe type of effect.
...item_statusObjectAn object containing the status details of the item in the response.
....codeIntegerThe HTTP status code associated with the item status (800 indicates points were redeemed).
....messageStringA general message providing additional information about the status of the item in the response.

Error & warning codes

CodeError numberTypeDescription
521ErrorThe system is processing another request for the same customer. A customer-level lock is held for the duration of each request. If a second request for the same customer arrives before the first completes, the system cannot acquire the lock and rejects the request with 521. This is expected behavior. Retry the failed request after a short delay. To avoid elevated 521 rates in bulk flows, send requests for the same customer sequentially and implement a retry with backoff.
3316ErrorGroup redemption action executed from a non-group redemption payload. Raise a JIRA ticket to the Capillary product support team and disable the configuration ENABLE_GROUP_PROGRAMS_REDEMPTION.
801ErrorTrying to redeem invalid points. The system validates that points_redeemed is strictly greater than 0. Any value that is null, 0, or negative is treated as invalid. Provide a valid value for points_redeemed.
828ErrorPoints redemption not configured for the group. The group does not have points redemption set up in the system.
878ErrorInvalid decimal precision in points redeemed. The points_redeemed field must have a maximum of three decimal places. For example, 1.1111 or 10.12345 would trigger this error.
1632ErrorInvalid or non-existent groupId. The groupId provided is missing, invalid, or does not exist.
Query Params
string
enum
Allowed:
Body Params
root
object
Responses

Language
Credentials
Basic
base64
:
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json