API DOCUMENTATION Last Update: Apr 2022

Membership Programs - List

Retrieves the list of existing Membership Programs and their levels for a given account.


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 1959ca5645adac9b13dcb3 Required
account_id greatwidgets Required
type manage_memberships Required
action list Required
include_membership_levels Y 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

 

 

Example PHP Request:

If you are using PHP, the $data array would look like this:

  1. $data['API'] = '1.5';
  2. $data['user_id'] = 'john1970';
  3. $data['user_api_key'] = '1959caadac9b13dcb3';
  4. $data['type'] = 'manage_memberships';
  5. $data['action'] = 'list';
  6. $data['account_id'] = 'greatwidgets';
  7. $data['include_membership_levels'] = 'Y';

 

Success XML Response

  1. <response status="success">
  2. <membership>
  3. <membership_program_id>5208143496464281</membership_program_id>
  4. <membership_program_name>Amazing Rewards Club</membership_program_name>
  5. <membership_custom_qualifier_name></membership_custom_qualifier_name>
  6. <membership_style>A</membership_style>
  7. <membership_time_range>12</membership_time_range>
  8. <membership_time_unit>M</membership_time_unit>
  9. <membership_campaigns_included>all</membership_campaigns_included>
  10. <membership_levels>
  11. <membership_level_id_id>43</membership_level_id>
  12. <membership_program_id>2303626404596905</membership_program_id>
  13. <membership_level_qualifier>0</membership_level_qualifier>
  14. <membership_level_multiplier>1</membership_level_multiplier>
  15. <membership_level_description>Basic</membership_level_description>
  16. </membership_levels>
  17. <membership_levels>
  18. <membership_level_id_id>44</membership_level_id>
  19. <membership_program_id>2303626404596905</membership_program_id>
  20. <membership_level_qualifier>2500</membership_level_qualifier>
  21. <membership_level_multiplier>1.20</membership_level_multiplier>
  22. <membership_level_description>Bronze</membership_level_description>
  23. </membership_levels>
  24. <membership_levels>
  25. <membership_level_id_id>45</membership_level_id>
  26. <membership_program_id>2303626404596905</membership_program_id>
  27. <membership_level_qualifier>5000</membership_level_qualifier>
  28. <membership_level_multiplier>1.30</membership_level_multiplier>
  29. <membership_level_description>Silver</membership_level_description>
  30. </membership_levels>
  31. <membership_levels>
  32. <membership_level_id_id>46</membership_level_id>
  33. <membership_program_id>2303626404596905</membership_program_id>
  34. <membership_level_qualifier>10000</membership_level_qualifier>
  35. <membership_level_multiplier>1.50</membership_level_multiplier>
  36. <membership_level_description>Gold</membership_level_description>
  37. </membership_levels>
  38. </membership>
  39. </response>


Error XML Response:

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