Get Rewards
Introduction
This operation retrieves click choices for a given campaign code and business partner id.
Method | Service | API Name | Service Type |
---|---|---|---|
GET | campaigns | rewards → Explore | Synchronous |
URI: {baseUrl}/campaigns/v1/rewards/{bpId}/{campaignCode}
Header Elements
The header must contain the elements needed to authenticate the request.
Parameter | Description | Type | Required |
---|---|---|---|
authorization | This is where you will send your encoded JWT auth token you obtained from Get Auth Token. Must be in the form: Authorization: Bearer {auth-token-string} | String | Yes |
Request Elements
The following query parameters must be sent with every request.
Parameter | Description | Type | Required |
---|---|---|---|
bpId | Business Partner Identifier (BPID) The unique identifier for the business partner. This value will be provided to you by your Account Manager. | Integer | Yes |
campaignCode | The campaign code for the campaign you wish to retrieve rewards for. | String | Yes |
Sample Request
Example: https://certification.promob2b.bhnapi.com/campaigns/v1/rewards/98765/32-12345
GET https://certification.promob2b.bhnapi.com/campaigns/v1/rewards/12345/20-1234 HTTP/1.1
Host: akahc21-test:8180
accept: application/json'
Content-Type: application/json'
Authorization: Bearer eyJraWQiOiJOZm9uOFI3T0xkTmNPUlNSUVhzdW13WXlOZzRtblB1LTA3ZzhKTEw2NGZvIiwiYWxnIjoiUlMyNTYifQ.eyJ2ZXIiOjEsImp0aSI6IkFULnQ4NnVfaTJHeG01T1p0TmlOSHNjTnJDaGZTNUgtcVhLelJYZTBoMkMtYjQiLCJpc3MiOiJodHRwczovL2Rldi05OTMxMDcub2t0YXByZXZpZXcuY29tL29hdXRoMi9hdXNqanZwZzNhYTl5c05XeTBoNyIsImF1ZCI6Imh0dHBzOi8vd3d3LmJobmV0d29yay5jb20vYXBpIiwiaWF0IjoxNTg0NTYyMjM5LCJleHAiOjE1ODQ1NjU4MzksImNpZCI6IjBvYWprcXdoNnRTR1JXVWN3MGg3Iiwic2NwIjpbIiovKiJdLCJzdWIiOiIwb2Fqa3F3aDZ0U0dSV1VjdzBoNyJ9.PfT7O9Kae-8UEIqjZI5CDV4DdiP2z60I_LTYHIcYMLGYMW6jzvaZLQL9LJvhXpi9uzY5cFhAROOJGK7Uwf616DzTRKJ1_SmcNbxCxuzOknR0tvh6aeLepeVhDW6gdJGic9dW3YYWX2fUdyACCZjjQ3ME_26Oy3qaJj5j89jlJgxTE-QZHDUeCnE5oxRzQQaEF6bXXZ_X_yWEM4bS4PJcp99ysmJO838U0afC9pczatx_LEy2PnET2pP6RNLYx-oq0_LgrdjlV-7C92LQylqzxas-yZbtN7jHD4JvUt6TJchOnce2wQKoId4-rF_Z8NdTzMYfqcgg_L_v2ZbT8xzMRA
Response Elements
Name | Description | Type | Required |
---|---|---|---|
timestamp | Timestamp when the request completed processing. | Integer | Yes |
status | Status of the response. This will match the HTTP Status Code in the header of the response. Example: 404 | Integer | Yes |
error | If the request was not processed successfully this will indicate the error condition encountered. Example: "Not Found" | String | No |
message | The detailed error message. This will be null if the request completed successfully.Example: "Campaign Code 32-99999 could not be found" | String | No |
path | The path called in the request excluding the baseUrl. | String | Yes |
Type | Response Type. As of the current version the response will always be "FULL". | String | Yes |
clickChoiceRewardOption | List of ClickChoiceRewardOption | List | Yes |
Click Choice Reward Option
Name | Description | Type | Required |
---|---|---|---|
rewardType | Reward type such as Check, Gift Card, Prepaid Card. Possible values: - e-Code - Fixed Amount Debit Card - Fixed Amount Gift Card - Fixed Amount Gift Check - Fixed Amount Merchant Card - Fixed Amount Virtual Debit Card - Product - Variable Amount Check - Variable Amount Client Issued Check - Variable Amount Debit Card - Variable Amount Direct Deposit - Variable Amount Gift Card - Variable Amount Merchant Card - Variable Amount PayPal Reward - Variable Amount Reloadable Debit Card | String | Yes |
rewardName | Specific name of the reward such as Park & Company Consolidated Visa Prepaid Card | String | Yes |
attributeValue | The value that must be passed when creating a submission to indicate the reward chose by the consumer online. | String | No |
Sample Response
{
"status": 200,
"error": null,
"message": null,
"path": "/campaigns/v1/rewards/12345/20-1234",
"timestamp": 1585624996868,
"type": "FULL",
"clickChoiceRewardOption": [{
"rewardType": "Variable Amount Check",
"rewardName": "Park and Company Check",
"attributeValue": "chk"
}, {
"rewardType": "Variable Amount Debit Card",
"rewardName": "Park and Company Virtual Wallet",
"attributeValue": "VC"
}
]
}
Updated almost 5 years ago