Service: GetGroupUnsubscriptions

Note: Groups are called Interest Labels in the GUI

Get all contact group unsubscriptions

Service Details

SOAP Action: GetGroupUnsubscriptions
SOAP Return Object: GetGroupUnsubscriptionsResp

Input

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

Table: instance of GetGroupUnsubscriptionsReq

Parameter Mandatory Type Description
header Y APIRequestHeader Header for authentication
from / DateTime Get actions starting from this date
till / DateTime Get action up untill this time
order / Ordening Order by: Timestamp or EmailAddress
limit / Pagination Limit the response to x items per page, request a certain page
groupId Y Integer The group id to get unsubscriptions for

Output

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

Table: instance of GetGroupUnsubscriptionsResp

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
unsubscriptions / Array of ActionlogType

Table: response codes of GetGroupUnsubscriptionsResp.

0 No error
220 Authentication error, see header object for detailed information
221 GroupId is mandatory

Example

Get all group unsubscriptions for 2018 order from most recent to least recent limited to 100 items, get page 3

<?php

// create header object
$header = new stdClass();
$header->userId = USER_ID;
$header->userToken = USER_TOKEN;

// build request
$request = new stdClass();
$request->header = $header;
$request->groupId = 33;

// limit to 100 items per request get page 3
$request->limit = new stdClass();
$request->limit->items = 100;
$request->limit->page = 3;

// order descending by timestamp
$request->order = new stdClass();
$request->order->orderBy = 'Timestamp';
$request->order->orderDirection = 'DESC';


// limit to year 2018
$request->from = "2018-01-01T00:00:01";
$request->till = "2018-12-31T23:59:59";

$response = $SoapClient->__soapCall("GetGroupUnsubscriptions", array($request));

if ($response->errorCode == 0) {
	print_r($response->account);
} else {
	echo "Could not get group unsubscriptons" . $response->errorMessage;
}

?>