function MCAPI::listUpdateMember in Mailchimp 6.2
Same name and namespace in other branches
- 5.2 MCAPI.class.php \MCAPI::listUpdateMember()
- 5 MCAPI.class.php \MCAPI::listUpdateMember()
- 6 MCAPI.class.php \MCAPI::listUpdateMember()
- 7 MCAPI.class.php \MCAPI::listUpdateMember()
Edit the email address, merge fields, and interest groups for a list member. If you are doing a batch update on lots of users, consider using listBatchSubscribe() with the update_existing and possible replace_interests parameter.
Related
@example mcapi_listUpdateMember.php
Parameters
string $id the list id to connect to. Get by calling lists():
string $email_address the current email address of the member to update OR the "id" for the member returned from listMemberInfo, Webhooks, and Campaigns:
array $merge_vars array of new field values to update the member with. See merge_vars in listSubscribe() for details.:
string $email_type change the email type preference for the member ("html", "text", or "mobile"). Leave blank to keep the existing preference (optional):
boolean $replace_interests flag to determine whether we replace the interest groups with the updated groups provided, or we add the provided groups to the member's interest groups (optional, defaults to true):
Return value
boolean true on success, false on failure. When using MCAPI.class.php, the value can be tested and error messages pulled from the MCAPI object
File
- ./
MCAPI.class.php, line 1518
Class
Code
function listUpdateMember($id, $email_address, $merge_vars, $email_type = '', $replace_interests = true) {
$params = array();
$params["id"] = $id;
$params["email_address"] = $email_address;
$params["merge_vars"] = $merge_vars;
$params["email_type"] = $email_type;
$params["replace_interests"] = $replace_interests;
return $this
->callServer("listUpdateMember", $params);
}