Generate Campaign Reward
This API is used to generate a campaign reward for a customer based on voucher and campaign
Endpoint
URL : {BaseURL}/api/v1/campaign-rewards/generate
Method : POST
Header : Content-Type : Application/JSON
Header : Authorization : {{Token}}
Request
This section describes the request parameters and provides examples of JSON requests used to generate a campaign reward.
Description Parameter Request
| Field | Data Type | Mandatory | Format | Description |
|---|---|---|---|---|
| campaignId | String (36) | YES | UUID | Unique identifier for the campaign. |
| customerEmail | String (200) | NO | User's email address. | |
| customerName | String (200) | NO | Alphanumeric | Name of the user. |
| customerPhoneNumber | String (200) | NO | Numeric | User's phone number. |
| voucherId | String (36) | YES | UUID | Unique identifier for the voucher. |
Sample JSON Request
curl --location --globoff '{{BaseURL}}/api/v1/campaign-rewards/generate' \
--header 'accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"campaignId": "a1c4998d-d473-49de-a766-f593dc5beyyy",
"customerEmail": "",
"customerName": "",
"customerPhoneNumber": "",
"voucherId": "3c3488ce-817d-44d9-8b47-e152dd047yyy"
}'
Response
This section describes the response parameters and provides JSON response examples returned after a campaign reward is successfully generated.
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. |
| companyId | String (36) | YES | UUID | Unique identifier for the company. |
| refId | String (36) | YES | UUID | Unique reference ID for the generate campaign reward request. |
| transactionId | String (36) | YES | UUID | Unique identifier for the transaction. |
| voucherId | String (36) | YES | UUID | Unique identifier for the voucher. |
Sample JSON Response
{
"requestID": "204020db-b2e3-4bb7-bdf9-660c7ecc9a7b",
"rc": 200,
"message": "success",
"data": {
"transactionId": "df571f22-d6a2-427a-b6c4-0c352a962yyy",
"refId": "0402bc27-e4a7-44e4-9180-ad308380b5b3",
"voucherId": "3c3488ce-817d-44d9-8b47-e152dd047yyy",
"companyId": "7059942f-d617-4438-9a69-6b44fd51fyyy"
}
}