The data of the redemption history in a campaign will show all the rewards that have been redeemed. The data will include the list of rewards that have been used, expired, or still available. The presented list will vary depending on the campaign type, which is specified in the campaign details.
Redemption history list
You can retrieve the redemption history list by calling the API Get History List.
curl --location --request GET 'https://buzzebees-dev.azure-api.net/api/redeem/?skip=&byConfig=&config=&device_app_id=&app_id=&'
--header 'Content-Type: application/x-www-form-urlencoded; charset=utf-8'
--header 'Ocp-Apim-Subscription-Key: {Subscription-Key}'
--header 'Ocp-Apim-Trace: 1 '
--header 'App-Id: {App-Id}'
--header 'Authorization: token {token}'
BzbsHistoryHelper.list(intSkip: {intSkip}) { (result) in
if let error = result.error {
fail(error)
return
}
if result.isSuccess {
success(result.redemptionList)
}
}
apiClient.historyApi.redeemHistoryList({ByConfig}, {Config}, {Skip}, {Top})
The result returned will be an array of all the campaigns for which the user has redeemed rewards. However, in the redemption history section, there will be additional statuses displayed.
Display conditions for each campaign type.
- Draw
- Display prize announcement status without the need for a button to view the code, and prevent users from accessing further details.
- Free and Deal
If a reward has expired or has already been used, the campaign status can be displayed without allowing users to access further details. However, if the reward has not yet expired and has not been used by the merchant, users can view additional details.
To open the serial popup:
Serial code = reward redemption code
expireIn = expiration time of the redemption code
redeemDate = date of redemption
defaultPrivilegeMessage
= message for displaying details according to the configuration in the BOFbarcode
= default tab for displaying the code, which can be configured in the BOF. - Interface:
- Display the privilege status without the need for a button to view the code. Include a URL to render in the web view page.
The details mentioned above can be viewed through the API Get History List
Use campaign in history list
To view the details of each campaign, call the API redeem use to update the serial, expireIn, defaultPrivilegeMessage, and other necessary information required for displaying the results.
curl --location --request POST 'https://buzzebees-dev.azure-api.net/api/redeem/{redeemkey}/use'
--header 'Content-Type: application/x-www-form-urlencoded; charset=utf-8'
--header 'Ocp-Apim-Subscription-Key: {Subscription-Key}'
--header 'Ocp-Apim-Trace: 1 '
--header 'App-Id: {App-Id}'
--header 'Authorization: token {token}'
--form 'app_id="123456"'
BzbsHistoryHelper.use(redeemKey: {redeemKey}) { result in
if let error = result.error {
fail(error)
return
}
if result.isSuccess {
self.redeemPurchase = result.purchase
if let campaignInfo = result.campaignUpdateInfo {
self.campaignDetail = BzbsCampaign(dict: campaignInfo)
}
if result.actionAfterRedeem == .openWebsite {
self.redeemOpenWebsite()
} else {
self.redeemSuccessCallback?()
}
}
}
apiClient.historyApi.use({RedeemKey})
After that, you will have complete details of each campaign according to each campaign type.