Deactivated (on hold) Campaigns List
Returns a list of the deactivated campaigns for an account.
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 |
|
|
|
account_id |
|
greatwidgets |
|
Required |
|
|
|
type |
|
campaigns_inactive_list |
|
Required |
|
|
|
|
|
|
|
|
|
|
|
campaign_type |
|
points,
giftcard,
events,
earned,
buyx |
|
Optional |
|
|
|
|
|
|
|
|
|
|
|
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 list of deactivated campaigns returned is based on the permissions of the user_id that is making the call. Only manager-level users can make this call.
- The type_restrict parameter is optional, and can be combined with the searchField. If it's not given, all campaign types are returned. If you want multiple campaign types, list each type separated by a comma, which makes it slightly different than achieving the same thing using searchField=campaign_type, which is restricted to a single campaign type.
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'] = 'campaigns_inactive_list';
- $data['account_id'] = 'greatwidgets';
Success XML Response:
- <response status="success">
- <campaigns>
- <campaign>
- <id>1234567890123456</id>
- <name>Widget Rewards</name>
- <type>points</type>
- <points_ratio>5</points_ratio>
- <reward_ratio>15</reward_ratio>
- </campaign>
- <campaign>
- <id>2345678901234567</id>
- <name>Sales Bucks</name>
- <type>earned</type>
- <earned_per_event>4.95</earned_per_event>
- </campaign>
- <campaign>
- <id>3456789012345678</id>
- <name>Frequent Shopper Rewards</name>
- <type>buyx</type>
- <item>
- <id>45678</id>
- <description>Coffees and Teas</description>
- <earn_ratio>10</earn_ratio>
- ...
- </item>
- </campaign>
- ...
- </campaign>
- </response>
Notes:
There are 5 campaign types:
- points (Points-based campaigns)
- giftcard (Currency-based campaigns)
- events (Event-based campaigns
- earned (Currency earned per event campaigns)
- buyx (Buy X Get 1 Free type campaigns)
Gift Card and events-based campaigns do not have ratios to report.
Example PHP request to list ONLY Gift Cards and Points deactivated campaigns:
If you are using PHP, the $data array would look like this:
- $data['user_id'] = 'john1970';
- $data['user_password'] = '1959caadac9b13dcb3';
- $data['type'] = 'campaigns_inactive_list';
- $data['account_id'] = 'greatwidgets';
- $data['campaign_type'] = 'giftcard, points';
Success XML Response:
- <response status="success">
- <campaigns>
-
- <campaign>
- <id>2345678901234567</id>
- <name>My Stored Value Card</name>
- <type>giftcard</type>
- </campaign>
- <campaign>
- <id>1234567890123456</id>
- <name>Widget Rewards</name>
- <type>points</type>
- <points_ratio>5</points_ratio>
- <reward_ratio>15</reward_ratio>
- </campaign>
- ...
- </campaign>
- </response>
Error XML Response:
- <response status="error">
- <error>Error message</error>
- </response>
|