Service: DeleteMailingList

The DeleteMailingList service allows you to delete existing mailing lists within Flexmail.

Service Details

SOAP Action: DeleteMailingList
SOAP Return Object: DeleteMailingListResp

Input

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

Table: instance of DeleteMailingListReq

Parameter Mandatory Type Description
header Y APIRequestHeader Header for authentication
mailingListId Y Integer Id of the mailing list to delete

Output

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

Table: instance of DeleteMailingListResp

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 DeleteMailingListResp.

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

Example

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;
}
?>