The UpdateMailingList service allows you to update existing mailinglists within Flexmail.
SOAP Action: UpdateMailingList
SOAP Return Object: UpdateMailingListResp
The following table describes the parameters used for calling the UpdateMailingList service.
Parameter | Mandatory | Type | Description |
---|---|---|---|
header | Y | APIRequestHeader | Header for authentication |
mailingListId | Y | Integer | Id of the mailing list to update |
mailingListName | Y | String | Name of the mailing list to update |
mailingListLanguage | Y | String | Language of the mailing list: English: EN French: FR Dutch: NL |
The following table describes the parameters returned from the UpdateMailingList service.
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 |
0 | No error |
---|---|
220 | Authentication error, see header object for detailed information |
221 | Mailing list id is mandatory |
222 | Mailing list name is invalid |
223 | Mailing list language is invalid |
224 | Mailing list already exists |
226 | Mailing list name too long |
This example shows you the update of a mailing list with category id 4563. We are updating the name of the mailing list.
<?php $header->userId = USER_ID; $header->userToken = USER_TOKEN; $updateMailingListReq->header = $header; $updateMailingListReq->mailingListId= 4563; $updateMailingListReq->mailingListName= "My updated mailing list"; $updateMailingListReq->mailingListLanguage = "EN"; $updateMailingListResp = $SoapClient->__soapCall("UpdateMailingList", array($updateMailingListReq)); if ($updateMailingListResp->errorCode == 0) { echo "Mailing list updated"; } else { echo "Mailing list update failed: " . $updateMailingListResp->errorMessage; } ?>