API DOCUMENTATION Last Update: Apr 2022

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:

  1. $data['user_id'] = 'john1970';
  2. $data['user_password'] = '1959caadac9b13dcb3';
  3. $data['type'] = 'campaigns_inactive_list';
  4. $data['account_id'] = 'greatwidgets';

 

Success XML Response:

  1. <response status="success">
  2. <campaigns>
  3. <campaign>
  4. <id>1234567890123456</id>
  5. <name>Widget Rewards</name>
  6. <type>points</type>
  7. <points_ratio>5</points_ratio>
  8. <reward_ratio>15</reward_ratio>
  9. </campaign>
  10. <campaign>
  11. <id>2345678901234567</id>
  12. <name>Sales Bucks</name>
  13. <type>earned</type>
  14. <earned_per_event>4.95</earned_per_event>
  15. </campaign>
  16. <campaign>
  17. <id>3456789012345678</id>
  18. <name>Frequent Shopper Rewards</name>
  19. <type>buyx</type>
  20. <item>
  21. <id>45678</id>
  22. <description>Coffees and Teas</description>
  23. <earn_ratio>10</earn_ratio>
  24. ...
  25. </item>
  26. </campaign>
  27. ...
  28. </campaign>
  29. </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:

  1. $data['user_id'] = 'john1970';
  2. $data['user_password'] = '1959caadac9b13dcb3';
  3. $data['type'] = 'campaigns_inactive_list';
  4. $data['account_id'] = 'greatwidgets';
  5. $data['campaign_type'] = 'giftcard, points';

 

Success XML Response:

  1. <response status="success">
  2. <campaigns>
  3. <campaign>
  4. <id>2345678901234567</id>
  5. <name>My Stored Value Card</name>
  6. <type>giftcard</type>
  7. </campaign>
  8. <campaign>
  9. <id>1234567890123456</id>
  10. <name>Widget Rewards</name>
  11. <type>points</type>
  12. <points_ratio>5</points_ratio>
  13. <reward_ratio>15</reward_ratio>
  14. </campaign>
  15. ...
  16. </campaign>
  17. </response>

Error XML Response:

  1. <response status="error">
  2. <error>Error message</error>
  3. </response>