Service: DeleteGroup

Note: Groups are called Interest Labels in the GUI

The DeleteGroup service allows you to delete existing groups within Flexmail.

Service Details

SOAP Action: DeleteGroup
SOAP Return Object: DeleteGroupResp

Input

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

Table: instance of DeleteGroupReq

Parameter Mandatory Type Description
header Y APIRequestHeader Header for authentication
groupType Y GroupType Group type to delete

Output

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

Table: instance of DeleteGroupResp

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

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

Example

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