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.
SOAP Action: DeleteGroupSubscription
SOAP Return Object: DeleteGroupSubscriptionResp
The following table describes the parameters used for calling the DeleteGroupSubscription service.
Parameter | Mandatory | Type | Description |
---|---|---|---|
header | Y | APIRequestHeader | Header for authentication |
groupSubscriptionType | Y | GroupSubscriptionType | Group subscription type |
The following table describes the parameters returned from the DeleteGroupSubscription 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 | Group subscription id is mandatory |
222 | Invalid group subscription id |
223 | Internal error |
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; } ?>