Contains web service functions for operating with member data.
GET /#account_id/members
Get a basic listing of all members in an account.
| Parameters: | deleted (boolean) – Accepts True or 1. Optional flag to include deleted members. |
|---|---|
| Returns: | A list of members in the given account. |
GET /#account_id/members/#member_id
Get detailed information on a particular member, including all custom fields.
| Parameters: | deleted (boolean) – Accepts True or 1. Optional flag to include deleted members. |
|---|---|
| Returns: | A single member if one exists. |
| Raises : | Http404 if no member is found. |
GET /#account_id/members/email/:email
Get detailed information on a particular member, including all custom fields, by email address instead of ID.
| Parameters: | deleted (boolean) – Accepts True or 1. Optional flag to include deleted members. |
|---|---|
| Returns: | A single member if one exists. |
| Raises : | Http404 if no member is found. |
GET /#account_id/members/#member_id/optout
If a member has been opted out, returns the details of their optout, specifically date and mailing_id.
| Returns: | Member opt out date and mailing if member is opted out. |
|---|---|
| Raises : | Http404 if no member is found. |
POST /#account_id/members
Add new members or update existing members.
| Parameters: | members (array) – An array of members to update |
|---|
A member is a dictionary of member emails and field values to import. The only required field is “email”. All other fields are treated as the name of a member field.
| Parameters: | source_filename (string) – An arbitrary string to associate with this import. |
|---|
This should generally be set to the filename that the user uploaded.
| Parameters: |
|
|---|---|
| Returns: |
An import id |
POST /#account_id/members/add
Adds or updates an audience member
| Parameters: |
|
|---|---|
| Returns: |
The member_id of the new or updated member, and whether the member was added or an existing member was updated |
PUT /#account_id/members/delete
Delete an array of members.
The members will be marked as deleted and cannot be retrieved.
| Parameters: | member_ids (array) – An array of member ids to delete. |
|---|---|
| Returns: | True if all members are successfully deleted, otherwise False. |
PUT /#account_id/members/status
Change the status for an array of members.
The members will have their member_status_id updated.
| Parameters: |
|
|---|---|
| Returns: |
True if the members are successfully updated, otherwise False. |
PUT /#account_id/members/#member_id
Update a single member’s information.
Update the information for an existing member. Note that this method allows the email address to be updated (which cannot be done with a POST, since in that case the email address is used to identify the member).
| Parameters: |
|
|---|---|
| Returns: |
True if the member was updated successfully |
| Raises : |
Http404 if no member is found. |
DELETE /#account_id/members/#member_id
Delete the specified member.
The member, along with any associated response and history information, will be completely removed from the database.
| Returns: | True if the member is deleted. |
|---|---|
| Raises : | Http404 if no member is found. |
GET /#account_id/members/#member_id/groups
Get the groups to which a member belongs.
| Returns: | An array of groups. |
|---|---|
| Raises : | Http404 if no member is found. |
PUT /#account_id/members/#member_id/groups
Add a single member to one or more groups.
| Parameters: | group_ids (array) – Group ids to which to add this member. |
|---|---|
| Returns: | An array of ids of the affected groups. |
| Raises : | Http404 if no member is found. |
PUT /#account_id/members/#member_id/groups/remove
Remove a single member from one or more groups.
| Parameters: | group_ids (array) – Group ids from which to remove this member. |
|---|---|
| Returns: | An array of references to the affected groups. |
| Raises : | Http404 if no member is found. |
DELETE /#account_id/members
Delete all members.
| Parameters: | member_status_id (string) – This is ‘a’ctive, ‘o’ptout, or ‘e’error. |
|---|---|
| Returns: | Returns true. |
DELETE /#account_id/members/#member_id/groups
Remove the specified member from all groups.
| Returns: | True if the member is removed from all groups. |
|---|---|
| Raises : | Http404 if no member is found. |
PUT /#account_id/members/groups/remove
Remove multiple members from groups.
| Parameters: |
|
|---|---|
| Returns: |
True if the members are deleted, otherwise False. |
| Raises : |
Http404 if any of the members or groups do not exist |
GET /#account_id/members/#member_id/mailings
Get the entire mailing history for a member.
| Returns: | Message history details for the specified member. |
|---|
GET /#account_id/members/imports/#import_id/members
Get a list of members affected by this import.
| Returns: | A list of members in the given account and import. |
|---|
GET /#account_id/members/imports/#import_id
Get information and statistics about this import.
| Returns: | Import details for the given import_id. |
|---|
GET /#account_id/members/imports
Get information about all imports for this account.
| Returns: | An array of import details. |
|---|
DELETE /#account_id/members/imports/delete
Update an import record to be marked as ‘deleted’.
| Returns: | True if the import is marked as deleted. |
|---|---|
| Raises : | Http404 if the import record does not exist |
PUT /#account_id/members/#group_id/copy
Copy all account members of one or more statuses into a group.
| Parameters: | member_status_id (array) – ‘a’ctive, ‘o’ptout, and/or ‘e’rror. |
|---|---|
| Returns: | True |
| Raises : | Http404 if the group does not exist. |
PUT /#account_id/members/status/:status_from/to/:status_to
| Parameters: | group_id – Optional. Limit the update to members of the specified group |
|---|---|
| Returns: | True |
| Raises : | Http404 if the specified status is invalid |