Skip to main content

Redeem Points

Details

Used to redeem points from exisiting customer.

URL : <base_url>/rewards/redeem

Method : POST

Authentication required : YES

Request parameters

In the request URL, provide the following parameter in the URL

ParameterTypeExampleDescription
numberstring+18761234567required
reference_numberstring1235673737Optional parameter.
reward_idinteger1required.
cashier_pininteger123456required.

Success Response

Code : 200 OK

Content :

{
"success": true,
"has_reference_number": false,
"activity_id": 43
}

Error Responses

Condition : Invalid loyalty config.

Code : 400 BAD REQUEST

Content :

{
"message": "The given data was invalid.",
"errors": {
"loyalty": "Loyalty service not active for this account."
}
}

Condition : Invalid loyalty subscription.

Code : 400 BAD REQUEST

Content :

{
"message": "The given data was invalid.",
"errors": {
"loyalty": "Invalid loyalty subscription."
}
}

Condition : Invalid spend amount.

Code : 400 BAD REQUEST

Content :

{
"message": "The given data was invalid.",
"errors": {
"spend": "Minimum spend is (1000)."
}
}

Condition : Cashier.

Code : 400 BAD REQUEST

Content :

{
"message": "The given data was invalid.",
"errors": {
"cashier_pin": "Invalid cashier pin."
}
}

Condition : Reward.

Code : 400 BAD REQUEST

Content :

{
"message": "The given data was invalid.",
"errors": {
"reward_id": "Invalid reward id."
}
}