Get all the information for a particular member of a list
- Section:
- List Related
- Parameters:
| uid | the id for your user account. Get by calling login($user, $pass) |
| id | the list id to connect to |
| email_address | the member email address to get information for |
- Returns:
- array - array of list member info (see Returned Fields for details)
- Returned Fields:
| string | email | The email address associated with this record |
| string | email_type | The type of emails this customer asked to get: html or text |
| array | merges | An associative array of all the merge tags and the data for those tags for this email address |
| string | status | The subscription status for this email address, either subscribed, unsubscribed or cleaned |
| date | timestamp | The time this email address was added to the list |
Examples (1)
[1] mcapi_listMemberInfo.php
<?php
/**
This Example shows how to pull the Info for a Member of a List using the MCAPI.php
class and do some basic error checking.
**/
// Include the MailChimp API code. Do Not Edit This!
include('inc/MCAPI.class.php');
include('config.inc.php'); //contains username & password
// Connect to the MailChimp server with the user's credentials.
$acct = new MCAPI($mailChimpUser, $mailChimpPass);
$retval = $acct->listMemberInfo( $listId, $member_email );
if (!$retval){
echo "\tCode=".$acct->errorCode."\n"; echo "\tMsg=".$acct->errorMessage."\n"; } else {
//do something useful!
}
?>