API DOCUMENTATION Last Update: Apr 2022

Membership Levels - Create New

Create a new Membership Level for a given Membership Program. The Membership Level configuration contains the conditions that customers have to meet in order to belong to that Membership Level. Example: Customers need to earn at least 25000 points in the last 12 months in order to belong to the Gold Membership Level.

 

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
type manage_membership_levels Required
action new Required
account_id greatwidgets Required
membership_program_id 1503061175851366 Required
membership_level_description Gold Required
membership_level_qualifier 500 Required
membership_level_multiplier 1.5 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:

  • Membership level qualifier: Determines the minimum amount of points (or custom qualifier events) that customers need to meet in order to belong to a particular Membership Level.
  • Membership level multiplier: Determines the bonus/extra points that customers will earn when they belong to a particular Membership Level.
  • A base membership level is needed: All Membership Programs must have a base Membership Level. Example: 0 points needed to be in the Basic Level, membership_level_multiplier= 1 (no additional points earned) This will allow the system to label all participating customers as members of a basic/beginning level.

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['account_id'] = 'greatwidgets';
  5. $data['type'] = 'manage_membership_levels';
  6. $data['action'] = 'new';
  7. $data['membership_program_id'] = '5208143496464281'
  8. $data['membership_level_qualifier'] = '25000';
  9. $data['membership_level_multiplier'] = '2';
  10. $data['membership_level_description'] = 'Gold';

 

Success XML Response:

  1. <response status="success">
  2. <membership_level_id>55</membership_level_id>
  3. </response>

 

Error XML Response:

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