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
| Field | Data Type | Mandatory | Format | Description |
|---|---|---|---|---|
| rewardId | String (36) | YES | UUID | Unique 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
| Field | Data Type | Mandatory | Format | Description |
|---|---|---|---|---|
| requestID | String (36) | YES | UUID | Unique identifier for the request. |
| rc | Integer (3) | YES | Numeric | Response code indicating the status of the operation. |
| Message | String (200) | YES | Alphanumeric | A descriptive message regarding the response. |
| data | JSON Object | YES | JSON Object | Detail information from data. |
| transactionId | String (36) | YES | UUID | Unique identifier for the transaction. Omitted from response if left empty. |
| pointRuleId | String (36) | YES | UUID | The ID of the point rule applied. |
| refId | String (15) | YES | Alphanumeric | Unique reference ID for the transaction. |
| point | Integer (10) | YES | Numeric | The 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
}
}