Service: UpdateGroup

Note: Groups are called Interest Labels in the GUI

The UpdateGroup service allows you to update existing groups within Flexmail.

Service Details

SOAP Action: UpdateGroup
SOAP Return Object: UpdateGroupResp

Input

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

Table: instance of UpdateGroupReq

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

Output

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

Table: instance of UpdateGroupResp

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

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

Example

This example shows the update of a group with id ‘881’. We are updating the name and the text of the group.

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

$updateGroupReq->header = $header;
$updateGroupReq->groupType->groupId = 881;
$updateGroupReq->groupType->groupName = "my updated group";

$updateGroupResp = $SoapClient->__soapCall("UpdateGroup", array($updateGroupReq));

if ($updateGroupResp->errorCode == 0) {
	echo "Group updatded";
} else {
	echo "Group update failed: " . $updateGroupResp->errorMessage;
}
?>