Need An Email Marketing Solution For All Of Your Customers?

Partner With VerticalResponse!

editListMember


The editListMember() method edits a single list member. If the new list member values fail validation, an exception is thrown.

The list member’s hash and email address must be provided in its member_data so that the member can be identified.

Note: a list member’s hash will change if its email address is changed.

Input

[vrtypens:editListMemberArgs]

session_id [xsd:string] (required)
Your API session id.
list_member [vrtypens:ListMember] (required)
A ListMember object representing the member to edit. It must have its “list_id” attribute set, and the “member_data” dictionary must include the “hash” and “email_address” parameters.
validate_postal_address [xsd:boolean]
If this is set to true, included postal address fields will be evaluated for validity. If they fail, a fault is thrown.

Output

[vrtypens:ListMember]
The output is always true.

Examples

PHP

$vrapi->editListMember( array(
	'session_id'  => $sid,
	'list_member' => array(
		'list_id'     => $lid,
		'list_type'   => 'email',
		'member_data' => array(
			array('name'  => 'email_address', 'value' => 'email@example.com',),
			array('name'  => 'hash', 'value' => '99e3cf416f',),
			array('name' => 'first_name', 'value'=> 'Pete',),
		),
	),
) );

Ruby

vr.editListMember({
	'session_id'  => sid,
	'list_member' => {
		'list_id'     => lid,
		'list_type'   => 'email',
		'member_data' => [
			{'name' => 'email_address', 'value'=> 'email@example.com',},
			{'name'  => 'hash', 'value' => '99e3cf416f'},
			{'name' => 'first_name', 'value'=> 'Pete'}
		]           
	}
})

Java

int edit_member_data_needed = 3;
NVPair[] editListMemberData = new NVPair [edit_member_data_needed];  
int xb = 0;

editListMemberData [xb++] = new NVPair ("hash", "99e3cf416f");
editListMemberData [xb++] = new NVPair ("first_name", "Pete");
editListMemberData [xb++] = new NVPair ("email_address", "email@example.com");

int editListMember_ListID = 520200303;

ListMember listMember = new ListMember();
	listMember.setList_id(editListMember_ListID);
	listMember.setMember_data(editListMemberData);

EditListMemberArgs editListMemberArgs = new EditListMemberArgs();
	editListMemberArgs.setSession_id(sessionID);
	editListMemberArgs.setList_member(listMember);

vr.editListMember(editListMemberArgs);

C#.NET

NVPair[] member_data = new NVPair[3];

NVPair email = new NVPair();
	email.name = "email_address";
	email.value= "email@example.com";
	member_data[0] = email;

NVPair hash = new NVPair();
	hash.name = "hash";
	hash.value= "99e3cf416f";
	member_data[1] = hash;

NVPair first_name = new NVPair();
	first_name.first_name = "first_name";
	first_name.value= "Pete";
	member_data[2] = first_name;

ListMember list_member = new ListMember();
	list_member.list_type = "email";
	list_member.list_id   = iListId;
	list_member.member_data = member_data;

editListMemberArgs objeLMArgs = new editListMemberArgs();
	objeLMArgs.session_id = sessionId;
	objeLMArgs.list_member = list_member;
                    
try
{
	objVR.editListMember(objeLMArgs);
}
catch (Exception e)
{
	System.Console.WriteLine(e.Message);
}

Perl

$vrapi->editListMember( {
	session_id => $sid,
	list_member => {
		list_id => $lid,
		list_type => 'email',
		member_data => [
			{name => 'email_address', value => 'email@example.com',},
			{name => 'hash', value => '99e3cf416f',},
			{name => 'first_name', value => 'Pete'}
			],
		},
	}
);