Service: GetBounces

The GetBounces service allows you to recall bounced email addresses. Bounced email addresses can be recalled in one of two ways, either by mailing list id or by campaign id.

When requesting by mailing list id, all bounced email addresses in the mailing list, that bounced after the last check, will be returned. A timestampSince can be provided, the service will then return all bounced email addresses for the specified mailing list id that bounced after that the given timestamp.

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

Service Details

SOAP Action: GetBounces
SOAP Return Object: GetBouncesResp

Input

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

Table: instance of GetBouncesReq

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

Output

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

Table: instance of GetBouncesResp

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
bounceTypeItems / Array of BounceType Array of bounceType items

Table: response codes of GetBouncesResp.

0 No error
220 Authentication error, see header object for detailed information

Example

This examples show the request of all email addresses that bounced for a mailing list with id 111 after January 1, 2008.

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

$getBouncesReq->header = $header;
$getBouncesReq->mailingListId = 111;
$getBouncesReq->timestampSince = ‘2008-01-01T00:00:01’;

$getBouncesResp = $SoapClient->__soapCall("GetBounces", array($getBouncesReq));

if ($getCampaignReportResp->errorCode == 0) {
	// Present list of bounces
} else {
	echo "Bounces could not be retrieved: " . $getBouncesResp->errorMessage;
}
?>