Service: UpdateEmailAddress

The UpdateEmailAddress service allows you to update existing email addresses within a Flexmail mailing list.

Service Details

SOAP Action: UpdateEmailAddress
SOAP Return Object: UpdateEmailAddressResp

Input

The following table describes the parameters used for calling the UpdateEmailAddress service.

Table: instance of UpdateEmailAddressReq

Parameter Mandatory Type Description
header Y APIRequestHeader Header for authentication
mailingListId Y Integer Id of the mailing list to update
emailAddressType Y EmailAddressType Email address type
sources / Array of SourcesType Optional sources array

Output

The following table describes the parameters returned from the UpdateEmailAddress service.

Table: instance of UpdateEmailAddressResp

Parameter Mandatory Type Description
header / APIResponseHeader Header containing authentication information
errorCode / Integer Numerical value of the error
errorMessage / String Short literal description of the error

Table: response codes of UpdateEmailAddressResp.

0 No error
220 Authentication error, see header object for detailed information
221 Mailing list id is mandatory
222 Mailing list id is invalid
223 Either Flexmail id or reference id is required to update
224 Invalid Flexmail id
225 Email address already exists
226 Email address could not be found
227 Email address is mandatory
228 Email address is invalid

Example

This example shows you the update of an email address in a mailing list with id 4563.

<?php
$header->userId = USER_ID;
$header->userToken = USER_TOKEN;

$updateEmailAddressReq->header = $header;
$updateEmailAddressReq->mailingListId= 4563; 
$updateEmailAddressReq->emailAddressType->flexmailId= 123456;
$updateEmailAddressReq->emailAddressType->emailAddress="johnny.conner@example.com";
$updateEmailAddressReq->emailAddressType->name="Johnny";
$updateEmailAddressReq->emailAddressType->surname="Conner";
$updateEmailAddressResp = $SoapClient->__soapCall("UpdateEmailAddress", array($updateEmailAddressReq));

if ($updateEmailAddressResp->errorCode == 0) {
	echo "Email address updated";
} else {
	echo " Email address update failed: " . $updateEmailAddressResp->errorMessage;
}
?>