The DeleteSegment service allows you to delete segments lists within Flexmail.
SOAP Action: DeleteSegment
SOAP Return Object: DeleteSegmentResp
The following table describes the parameters used for calling the DeleteSegment service.
Parameter | Mandatory | Type | Description |
---|---|---|---|
header | Y | APIRequestHeader | Header for authentication |
segmentId | Y | Integer | Id of the segment to delete |
The following table describes the parameters returned from the DeleteSegment 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 | segmentId is mandatory |
222 | segmentId is invalid |
This example shows you the deletion of a segment width id 1.
<?php $request = new stdClass(); $request->header = new stdClass(); $request->header->userId = MY_USER_ID; $request->header->userToken = MY_TOKEN; $request->segmentId = 1; $result = $client->__soapCall("DeleteSegment", [$request]); if ($result->errorCode == 0) { echo "Segment deleted"; } else { echo "Segment delete failed: " . $result->errorMessage; } ?>