The DeleteMailingList service allows you to delete existing mailing lists within Flexmail.
SOAP Action: DeleteMailingList
SOAP Return Object: DeleteMailingListResp
The following table describes the parameters used for calling the DeleteMailingList service.
Parameter | Mandatory | Type | Description |
---|---|---|---|
header | Y | APIRequestHeader | Header for authentication |
mailingListId | Y | Integer | Id of the mailing list to delete |
The following table describes the parameters returned from the DeleteMailingList 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 id is invalid |
223 | Internal error |
This example shows you the deletion of a mailing list width id 4563.
<?php $header->userId = USER_ID; $header->userToken = USER_TOKEN; $deleteMailingListReq->header = $header; $deleteMailingListReq->mailingListId = 4563; $deleteMailingListResp = $SoapClient->__soapCall("DeleteMailingList",array($deleteMailingListReq)); if ($deleteMailingListResp->errorCode == 0) { echo "Mailing list deleted"; } else { echo "Mailing list delete failed: " . $deleteMailingListResp->errorMessage; } ?>