Description
Initiate point redemption for a brand’s customer.
A sms with a validation code will be sent to the customer if the brand requires redemptions to be verified.
Important: An error will be returned if customer does not have enough points
Warning: This operation requires outlet access permissions enabled, contact an admin should you require it
Parameters
Parameter | Type | Value | Required |
operation_name | String | redeemPointPromotion | true |
variables | JSON | $JSON_OBJECT | true |
$JSON_OBJECT Structure
Key | Type | Value | Required |
brandId | String | $SHARED_BRAND_ID | true |
phoneNumber | String | $PHONE_NUMBER | true |
extension | String | $EXTENSION | true |
outletId | String | $OUTLET_ID | true |
promotionId | String | $PROMOTION_ID | true |
transactionNumber | String | $TRANSACTION_NUMBER | false |
Important: Append country code to phone number string
Important: Only MY extension numbers are supported at this current time
Tip: $PROMOTION_ID can be found via Active Point Promotion
Tip: $SHARED_BRAND_ID and $OUTLET_ID can be obtained via Accessible Brands
Example
Request
curl \
-X POST \
-H "Content-Type: application/json" \
-H "Token: $TOKEN" \
-d '{
"operation_name": "redeemPointPromotion",
"variables": {
"phoneNumber": "60123123123",
"extension": "MY",
"brandId": $SHARED_BRAND_ID,
"outletId": $OUTLET_ID,
"promotionId": $PROMOTION_ID
}
}' \
https://mulahpoints.com/third_party
Response
{
"data": {
"thirdPartyRedeemPointPromotion": {
"result": $SUCCESS_MESSAGE,
"redemptionId": $REDEMPTION_ID,
"cost": $COST,
"monetoryCost": $MONETORY_COST,
"transactionNumber": $TRANSACTION_NUMBER,
"errors": [
{message: $ERROR_MESSAGE}
]
}
},
"errors": []
}