Retrieve Reward Program

Action: GET
Endpoint: /rewardprograms/{token}

To retrieve a reward program, send a GET request to the /rewardprograms/{token} endpoint. Include the reward program token as a path parameter to identify the reward program.

URL Path Parameters

Name Type Required? Description Allowable Values
token string Yes Identifies the reward program to retrieve. Existing reward program token.

Issue a GET to /rewardprograms to retrieve reward program tokens.

Sample Response Body

{
"type" : "CAMPAIGN",
"name" : "my_reward",
"priority" : 0,
"active" : true,
"reward" : {
"value" : "0.10",
"descriptor" : "CENTS_PER_GALLON"
},
"actions" : [ {
"name" : "EarnRewardAction",
"argument" : {
"value" : "AUTH,CLEAR,SALE",
"descriptor" : "TRANSACTION_EVENT"
}
} ],
"token" : "my_reward_token",
"earn_conditions" : [ {
"name" : "PURCHASE_THRESHOLD",
"argument" : {
"value" : "50.00",
"descriptor" : "CASH_AMOUNT"
}
}, {
"name" : "REWARD_EXPIRATION_TIME",
"argument" : {
"value" : "30",
"descriptor" : "DAYS"
}
}, {
"name" : "PURCHASE_EXPIRATION_TIME",
"argument" : {
"value" : "30",
"descriptor" : "DAYS"
}
} ],
"burn_conditions" : [ {
"name" : "PURCHASE_THRESHOLD",
"argument" : {
"value" : "20",
"descriptor" : "GALLONS",
"constraint" : "MAX"
}
} ],
"created_time" : "2015-04-24T19:44:58Z",
"last_modified_time" : "2015-04-24T19:44:58Z",
"campaign" : {
"active" : true,
"name" : "my_campaign_2",
"token" : "my_campaign_2_token",
"start_date" : "2014-11-21",
"end_date" : "2043-11-21"
}
}


List Reward Programs

Action: GET
Endpoint: /rewardprograms

To list all reward programs for all campaigns, send a GET request to the /rewardprograms endpoint.

This endpoint supports field filtering and pagination.

Sample Response Body

{
"campaign": {
"active": false,
"name": "",
"token": "",
"store_tokens": "java.util.ArrayList<java.lang.String>",
"start_date": "",
"end_date": ""
},
"created_time": "",
"last_modified_time": "",
"token": "",
"active": false,
"start_date": "",
"end_date": "",
"reward": {
"value": "",
"descriptor": ""
},
"earn_conditions": [
{
"name": "",
"argument": {
"constraint": "argument_constraint",
"value": "",
"descriptor": "value_descriptor"
}
}
],
"burn_conditions": [
{
"name": "",
"argument": {
"constraint": "argument_constraint",
"value": "",
"descriptor": "value_descriptor"
}
}
],
"name": "",
"actions": [
{
"name": "",
"argument": {
"constraint": "argument_constraint",
"value": "",
"descriptor": "value_descriptor"
}
}
],
"priority": 0,
"tags": ""
}


List Active Reward Programs

Action: GET
Endpoint: /rewardprograms/active

To list all active reward programs, send a GET request to the /rewardprograms/active endpoint.

This endpoint supports field filtering and pagination.

Sample Response Body

{
"count" : 2,
"start_index" : 0,
"end_index" : 1,
"is_more" : false,
"data" : [ {
"name" : "my_reward",
"priority" : 0,
"active" : true,
"reward" : {
"value" : "0.10",
"descriptor" : "CENTS_PER_GALLON"
},
"actions" : [ {
"name" : "EarnRewardAction",
"argument" : {
"value" : "AUTH,CLEAR,SALE",
"descriptor" : "TRANSACTION_EVENT"
}
} ],
"token" : "my_reward_token",
"earn_conditions" : [ {
"name" : "PURCHASE_THRESHOLD",
"argument" : {
"value" : "50.00",
"descriptor" : "CASH_AMOUNT"
}
}, {
"name" : "REWARD_EXPIRATION_TIME",
"argument" : {
"value" : "30",
"descriptor" : "DAYS"
}
}, {
"name" : "PURCHASE_EXPIRATION_TIME",
"argument" : {
"value" : "30",
"descriptor" : "DAYS"
}
} ],
"burn_conditions" : [ {
"name" : "PURCHASE_THRESHOLD",
"argument" : {
"value" : "20",
"descriptor" : "GALLONS",
"constraint" : "MAX"
}
} ],
"created_time" : "2015-04-24T19:44:58Z",
"last_modified_time" : "2015-04-24T19:44:58Z",
"campaign" : {
"active" : true,
"name" : "my_campaign_2",
"token" : "my_campaign_2_token",
"start_date" : "2014-11-21",
"end_date" : "2043-11-21"
}
}, {
"name" : "my_gas_reward",
"priority" : 0,
"active" : true,
"reward" : {
"value" : "0.10",
"descriptor" : "CENTS_PER_GALLON"
},
"actions" : [ {
"name" : "EarnRewardAction",
"argument" : {
"value" : "AUTH,CLEAR,SALE",
"descriptor" : "TRANSACTION_EVENT"
}
} ],
"token" : "my_gas_reward_token",
"earn_conditions" : [ {
"name" : "PURCHASE_THRESHOLD",
"argument" : {
"value" : "50.00",
"descriptor" : "CASH_AMOUNT"
}
}
} ]
}


List Active Reward Programs for Campaign

Action: GET
Endpoint: /rewardprograms/campaign/{token}

To list all active rewards programs for a campaign, send a GET request to the /rewardprograms/campaign/{token} endpoint. Include the campaign's token as a path parameter to identify the campaign.

This endpoint supports field filtering and pagination.

URL Path Parameters

Name Type Required? Description Allowable Values
token string No Identifies the campaign whose associated reward programs you want to list. Existing campaign token.

Issue a GET to /campaigns to retrieve campaign tokens.

Sample Response Body

{
"count": 1,
"start_index": 0,
"end_index": 0,
"is_more": false,
"data": [
{
"name": "my_reward",
"priority": 0,
"active": true,
"reward": {
"value": "0.10",
"descriptor": "CENTS_PER_GALLON"
},
"actions": [
{
"name": "EarnRewardAction",
"argument": {
"value": "AUTH,CLEAR,SALE",
"descriptor": "TRANSACTION_EVENT"
}
}
],
"token": "my_reward_token",
"earn_conditions": [
{
"name": "PURCHASE_THRESHOLD",
"argument": {
"value": "50.00",
"descriptor": "CASH_AMOUNT"
}
},
{
"name": "REWARD_EXPIRATION_TIME",
"argument": {
"value": "30",
"descriptor": "DAYS"
}
},
{
"name": "PURCHASE_EXPIRATION_TIME",
"argument": {
"value": "30",
"descriptor": "DAYS"
}
}
],
"burn_conditions": [
{
"name": "PURCHASE_THRESHOLD",
"argument": {
"value": "20",
"descriptor": "GALLONS",
"constraint": "MAX"
}
}
],
"created_time": "2015-04-24T19:44:58Z",
"last_modified_time": "2015-04-24T19:44:58Z",
"campaign": {
"active": true,
"name": "my_campaign_2",
"token": "my_campaign_2_token",
"start_date": "2014-11-21",
"end_date": "2043-11-21"
}
}
]
}