Issue Validation Code (to redeem points)

Before making points/redeem API call, you need to validate the customer by issuing validation code to the registered mobile number/email id.

This API allows you to issue a dynamic validation code to the customer’s registered mobile number/email id which is required to pass while redeeming points. The validation code is valid only for a specific time period post which it expires automatically. If you try to issue validation code within the validity period, same code will be issued again.

The validity period and communicate via is set on the OTPConfigurations page of InTouch > Settings > Organization Setup

  • OTP code validity period: The validity of the validation code in minutes
  • Communicate OTP Via: Mode of sending the validation code, email/sms/both
📘

The validation code is issued either to mobile number, or email id or both, based on the configuration set on the page InTouch > Settings > Organization Setup > OTPConfigurations

API endpoint example

https://eu.api.capillarytech.com/v1.1/points/validationcode?external_id=434547&format=json&points=100

curl --location 'https://eu.api.capillarytech.com/v1.1/points/validationcode?external_id=434547&format=json&points=-100' \
--header 'Authorization: Basic c2FudC5wXzEyMzpiMmVhMGFhYWI1ZThmODg5ZTAzNGE2NjA5NTIwM2FlNw==' \
--header 'Cookie: _cfuvid=KAL3im8y4a6p1m.sKC9ZNCKOc.7BJ5oinn8QtC8fo8Q-1750237083524-0.0.1.1-604800000'

Prerequisites

  • Basic Authentication
  • Default access group

Resource Information

URIv1.1/points/validationcode
Rate Limited?Yes
AuthenticationYes
HTTP MethodGET
Batch SupportNo

Request Parameter

Parameter (Parameters marked in * are mandatory)DatatypeDescription
mobile/email/external_id/card_number/card_external_id*enumPass any of the registered identifier type
value*stringPass the respective identifier value.
pointsintNumber of points to redeem (must be positive).

Response Parameter

ParameterDatatypeDescription
responseObjectRoot object containing the API response.
response.statusObjectContains the status of the API request.
status.successStringIndicates if the request was successful ("true" or "false").
status.codeIntegerHTTP status code (e.g., 200 for success).
status.messageStringHuman-readable message describing the status (e.g., "Operation Successful").
response.validation_codeObjectContains details about the validation code issuance.
validation_code.codeObjectNested object with customer and transaction details.
code.mobileStringCustomer's registered mobile number
code.emailStringCustomer's registered email address
code.external_idStringUnique external identifier for the customer
code.pointsIntegerPoints to be redeemed
code.item_statusObjectStatus of the validation code issuance.
item_status.successStringIndicates if the validation code was issued successfully ("true" or "false").
item_status.codeIntegerSub-status code for the validation process
item_status.messageStringAdditional details about the validation code issuance (e.g., "Validation Code Issued by SMS").
{
    "response": {
        "status": {
            "success": "true",
            "code": 200,
            "message": "Operation Successful"
        },
        "validation_code": {
            "code": {
                "mobile": "919777785205",
                "email": "[email protected]",
                "external_id": "434547",
                "points": -100,
                "item_status": {
                    "success": "true",
                    "code": 200,
                    "message": "Validation Code Issued by SMS"
                }
            }
        }
    }
}

API specific response

Error codeDescriptionReason
400Bad RequestInvalid request parameters
401UnauthorizedInvalid or missing authentication credentials.
816Customer not found for organizationInvalid mobile/email/external_id/card_number/card_external_id
Language
Credentials
Basic
base64
:
URL
Click Try It! to start a request and see the response here!