API DOCUMENTATION Last Update: Apr 2022

Membership Programs - Update

Allows to update the configuration of an existing Membership Program.

 

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_memberships Required
action update Required
account_id greatwidgets Required
membership_program_name Amazing Rewards Club Required
membership_style A, or B Required
See notes
membership_program_id 5208143496464281 Required
membership_time_range 12 Required
membership_time_unit M Required
D=Days M=Months Y=Years
membership_custom_qualifier_name Nights Required only for membership type B
membership_campaigns_included all, or campaign ID 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 types available: A = Based on Points Accrued (amount of points earned by the customer over a period of time). B = Based on Custom Qualifier (allows you to define a particular activity that is being tracked, example: number of nights that a customer is staying at a hotel).
  • Membership customer qualifier name: The membership custom qualifier name is only requierd for membership type "B". Example: membership_custom_qualifier_name= Nights (if you are tracking how many nights a customer needs to stay at a hotel in order to qualify for a higher membership level.)
  • Time range: number of days (D), months (M), or years (Y) that you want to include in order to define which customers qualify for each membership level.
  • Time unit: D for days, M for months, and Y for years.

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_memberships';
  6. $data['action'] = 'update';
  7. $data['membership_program_id'] = '5208143496464281';
  8. $data['membership_program_name'] = 'Amazing Rewards Club'
  9. $data['membership_style'] = 'A';
  10. $data['membership_time_range'] = '12';
  11. $data['membership_time_unit'] = 'M';
  12. $data['membership_campaigns_included'] = 'all';

 

Success XML Response:

  1. <response status="success">
  2. <membership_program_id>5208143496464281</membership_program_id>
  3. </response>

 

Error XML Response:

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