Note: Groups are called Interest Labels in the GUI
The DeleteGroup service allows you to delete existing groups within Flexmail.
SOAP Action: DeleteGroup
SOAP Return Object: DeleteGroupResp
The following table describes the parameters used for calling the DeleteGroup service.
Parameter | Mandatory | Type | Description |
---|---|---|---|
header | Y | APIRequestHeader | Header for authentication |
groupType | Y | GroupType | Group type to delete |
The following table describes the parameters returned from the DeleteGroup 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 id is mandatory |
222 | Invalid group id |
223 | Internal error |
This example shows you the deletion of a Group with id 712.
<?php $header->userId = USER_ID; $header->userToken = USER_TOKEN; $deleteGroupReq->header = $header; $deleteGroupReq->groupType->groupId = 712; $deleteGroupResp = $SoapClient->__soapCall("DeleteGroup", array($deleteGroupReq)); if( $deleteGroupResp->errorCode == 0 ){ echo "Group deleted"; } else { echo "Group deletion failed: " . $deleteGroupResp->errorMessage; } ?>