Service: DeleteGroupSubscription

Note: Groups are called Interest Labels in the GUI

The DeleteGroupSubscription service allows you to delete existing groupSubscriptions within Flexmail and remove email addresses from groups.

Service Details

SOAP Action: DeleteGroupSubscription
SOAP Return Object: DeleteGroupSubscriptionResp

Input

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

Table: instance of DeleteGroupSubscriptionReq

Parameter Mandatory Type Description
header Y APIRequestHeader Header for authentication
groupSubscriptionType Y GroupSubscriptionType Group subscription type

Output

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

Table: instance of DeleteGroupSubscriptionResp

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

0 No error
220 Authentication error, see header object for detailed information
221 Group subscription id is mandatory
222 Invalid group subscription id
223 Internal error

Example

This example shows you the deletion of a group subscription with id 98763.

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

$deleteGroupSubscriptionReq->header = $header;
$deleteGroupSubscriptionReq->groupSubscriptionType->groupSubscriptionID = 98763; 

$deleteGroupSubscriptionResp = $SoapClient->__soapCall("DeleteGroupSubscription", array($deleteGroupSubscriptionReq));

if ($deleteGroupSubscriptionResp->errorCode == 0) {
	echo "Group subscription deleted";
} else {
	echo "Group subscription deletion failed: " . $deleteGroupSubscriptionResp->errorMessage;
}
?>