Service: GetProfileUpdates

The GetProfileUpdates service allows you to recall email addresses which profiles have been updated. Profile updates can be recalled in one of two ways, either by mailing list id or by campaign id.

When requesting by mailing list id, all profile updates in the mailing list, that happened since the last GetUnsubscriptions service call and for the specified mailing list id, will be returned. A timestampSince may be provided, the service will than return all email addresses with profile updates for the specified mailing list id that updated since the given timestamp.

When requesting by campaign id, all profile updates for email addresses for the campaign will be returned. The timestampSince member becomes obsolete

Service Details

SOAP Action: GetProfileUpdates
SOAP Return Object: GetProfileUpdatesResp

Input

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

Table: instance of GetProfileUpdatesReq

Parameter Mandatory Type Description
header Y APIRequestHeader Header for authentication
campaignId / Integer Campaign id
mailingListId / Integer Mailing list id
timestampSince / String Timestamp which marks the beginning of the searchable period

Output

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

Table: instance of GetProfileUpdatesResp

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
profileUpdateTypeItems / Array of ProfileUpdateType Array of requested profile updates

Table: response codes of GetProfileUpdatesResp.

0 No error
220 Authentication error, see header object for detailed information
221 Mailing list id or campaign id is mandatory
222 Mailing list id is invalid
223 Campaign id is invalid
224 Invalid timestamp YYYY-MM-DDTHH:II:SS

Example

This examples show the request of all profile updates for email addresses for campaign 222.

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

$getProfileUpdatesReq->header = $header;
$getProfileUpdatesReq->campaignId = 222;

$getProfileUpdatesResp = $SoapClient->__soapCall("GetProfileUpdates", array($getProfileUpdatesReq));

if ($getProfileUpdatesResp->errorCode == 0) {
	// Handle return list of unsubscriptions.
} else {
	echo "Retrieving updates failed: " . $getProfileUpdatesResp->errorMessage;
}
?>