Skip to main content

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
FieldData TypeMandatoryFormatDescription
campaignIdString
(36)
YESUUIDUnique identifier for the campaign.
customerEmailString
(200)
NOEmailUser's email address.
customerNameString
(200)
NOAlphanumericName of the user.
customerPhoneNumberString
(200)
NONumericUser's phone number.
voucherIdString
(36)
YESUUIDUnique 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
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.
companyIdString
(36)
YESUUIDUnique identifier for the company.
refIdString
(36)
YESUUIDUnique reference ID for the generate campaign reward request.
transactionIdString
(36)
YESUUIDUnique identifier for the transaction.
voucherIdString
(36)
YESUUIDUnique 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"
}
}