|
Campaign Rewards List
Returns a list of the rewards available for a given campaign.
The data to be submitted to the API is composed of the following fields:
|
|
field |
|
Example |
|
Note |
|
|
|
user_id |
|
john1970 |
|
Required |
|
|
|
user_password |
|
1959caadac9b13dcb3 |
|
Required |
|
|
|
type |
|
campaign_rewards |
|
Required |
|
|
|
account_id |
|
greatwidgets |
|
Required |
|
|
|
campaign_id |
|
1111222233334444 |
|
Required |
|
|
|
|
|
|
|
|
|
|
|
Output Format: |
|
|
|
output |
|
JSON or XML |
|
Optional. If not provided, defaults to XML |
|
|
|
callback |
|
someFunctionName |
|
Optional: JSONP format |
|
|
|
condensed |
|
yes |
|
Optional (No white space) Applies only to JSON(P) output |
|
|
|
|
|
|
|
|
|
Notes:
- When using this call, the 'account_id' MUST be the unique Owner ID that is found in the "Edit Account Information" page reached from the main page / control panel.
- The 'campaign_id' MUST be the unique Campaign ID that is found in the "Edit Campaign" page reached from the main page / control panel listing of campaigns.
Example PHP Request:
If you are using PHP, the $data array would look like this:
- $data['user_id'] = 'john1970';
- $data['user_password'] = '1959caadac9b13dcb3';
- $data['type'] = 'campaign_rewards';
- $data['account_id'] = 'greatwidgets';
- $data['campaign_id'] = '1111222233334444';
Success XML Response:
- <response status="success">
- <campaign>
- <id>1111222233334444</id>
- </campaign>
- <rewards>
- <reward>
- <id>356</id>
- <level>1000</level>
- <description>Free Widget</description>
- </reward>
- <reward>
- <id>417</id>
- <level>1500</level>
- <description>Free Service</description>
- <reward_id>156739948736</reward_id>
- <reward_custom_field_1>7654382</reward_custom_field_1>
- </reward>
- ...
- </rewards>
- </response>
Notes:
- When identifying the reward to the API, you MUST use the <id> that is returned in the XML construct, NOT the <reward_id> which corresponds to the optional reward_identifier field.
- Rewards are only available for the following type of campaigns:
- Points-based campaigns
- Event-based campaigns
- For Buy X Get 1 Free type campaigns, this will return the products/services previously defined to be able to be accumulated, and the number of times that item needs to be purchased before it should be available as a reward.
Error XML Response:
- <response status="error">
- <error>Error message</error>
- </response>
|
|