Deactivated (on hold) Campaigns List
Returns a list of the deactivated campaigns for an account.
Headers
|
|
Key |
|
Value |
|
Note |
|
|
|
api_access_key |
|
user_api_key |
|
Optional |
|
   
The data to be submitted to the API is composed of the following fields:
|
|
field |
|
Example |
|
Note |
|
|
|
API |
|
1.5 |
|
Required |
|
|
|
user_id |
|
john1970 |
|
Required |
|
|
|
user_api_key |
|
1959caadac9b13dcb3 |
|
Required if not included in the headers |
|
|
|
account_id |
|
greatwidgets |
|
Required |
|
|
|
type |
|
campaigns_inactive_list |
|
Required |
|
|
|
|
|
|
|
|
|
|
|
type_restrict |
|
points,
giftcard,
events,
earned,
buyx |
|
Optional |
|
|
|
|
|
|
|
|
|
|
|
searchField |
|
campaign_name or
campaign_type
|
|
Optional |
|
|
|
searchOper |
|
eq (equal)
ne (not equal)
bw (begins with)
bn (does not begin with)
ew (ends with)
en (does not end with)
cn (contains)
nc (does not contain)
nu (is null/empty)
nn (is not null/empty)
in (is in - comma-separated list)
ni (is not in - comma-separated list)
|
|
Optional |
|
|
|
searchValue |
|
London |
|
Optional |
|
|
|
|
|
|
|
|
|
|
|
sortField |
|
campaign_name or
campaign_type
|
|
Optional |
|
|
|
sortOrder |
|
DESC or
ASC
|
|
Optional |
|
|
|
|
|
|
|
|
|
|
|
offset |
|
0 |
|
Optional |
|
|
|
length |
|
10 |
|
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:
Example PHP Request:
If you are using PHP, the $data array would look like this:
- $data['API'] = '1.5';
- $data['user_id'] = 'john1970';
- $data['user_api_key'] = '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['API'] = '1.5';
- $data['user_id'] = 'john1970';
- $data['user_api_key'] = '1959caadac9b13dcb3';
- $data['type'] = 'campaigns_inactive_list';
- $data['account_id'] = 'greatwidgets';
- $data['type_restrict2'] = 'giftcard, points';
Success XML Response:
- <response status="success">
- <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>
|