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:
- $data['API'] = '1.5';
- $data['user_id'] = 'john1970';
- $data['user_api_key'] = '1959caadac9b13dcb3';
- $data['account_id'] = 'greatwidgets';
- $data['type'] = 'manage_membership_levels';
- $data['action'] = 'new';
- $data['membership_program_id'] = '5208143496464281'
- $data['membership_level_qualifier'] = '25000';
- $data['membership_level_multiplier'] = '2';
- $data['membership_level_description'] = 'Gold';
Success XML Response:
- <response status="success">
- <membership_level_id>55</membership_level_id>
- </response>
Error XML Response:
- <response status="error">
- <error>Error message</error>
- </response>
|