Skip to main content

Purchase Reward Using Point

This API is used to perform the process of redeeming points to purchase a reward.

Endpoint

URL : {BaseURL}/api/v1/rewards/generate
Method : POST
Header : Content-Type : Application/JSON
Header : Authorization : {{pwa_token}}

Request

This section describes the request parameters and provides examples of JSON requests used to redeem points to purchase a reward.
Description Parameter Request
FieldData TypeMandatoryFormatDescription
rewardIdString
(36)
YESUUIDUnique identifier for the reward.
Sample JSON Request
curl --location --globoff '{{BaseURL}}/api/v1/rewards/generate' \
--header 'Authorization: {{pwa_token}}' \
--header 'Content-Type: application/json' \
--data '{
"rewardId": "24381878-3c12-4c42-b038-b3340945fyyy"
}'

Response

This section describes the response parameters and provides JSON response examples returned by the API when redeeming points to purchase a reward.
Description Parameter Response
FieldData TypeMandatoryFormatDescription
requestIDString
(36)
YESUUIDUnique identifier for the request.
rcInteger
(3)
YESNumericResponse code indicating the status of the operation.
MessageString
(200)
YESAlphanumericA descriptive message regarding the response.
dataJSON ObjectYESJSON ObjectDetail information from data.
transactionIdString
(36)
YESUUIDUnique identifier for the transaction. Omitted from response if left empty.
pointRuleIdString
(36)
YESUUIDThe ID of the point rule applied.
refIdString
(15)
YESAlphanumericUnique reference ID for the transaction.
pointInteger
(10)
YESNumericThe number of points involved in the transaction. Omitted if empty.
Sample JSON Response
{
"requestID": "61deb594-39cb-40e5-9979-fa4955157e3e",
"rc": 200,
"message": "success",
"data": {
"transactionId": "4a769fac-3b79-4a8b-9327-0e255d7caf9f",
"pointRuleId": "24381878-3c12-4c42-b038-b3340945f3ab",
"refId": "PZNBX7K9QWMAO44",
"point": 100
}
}