Retrieve Bounce Event Details

The ET_BounceEvent object represents a column with a bounce event in a Marketing Cloud account. Use the SDK to interact with this object as described below:

Use the Get method to return information about existing bounce events.

Ruby

require 'fuelsdk'
myClient = FuelSDK::Client.new {'client' => { 'id' => CLIENTID, 'secret' => SECRET }}
bounceevent = FuelSDK::BounceEvent.new
bounceevent.authStub = myClient
response = bounceevent.get
p response

PHP

require('ET_Client.php');
$myclient = new ET_Client();
$bounceevent = new ET_BounceEvent();
$bounceevent->authStub = $myclient;
$response = $bounceevent->get();
print_r($response);

Python

import ET_Client
myClient = ET_Client.ET_Client()
bounceevent = ET_Client.ET_BounceEvent()
bounceevent.auth_stub = myClient
results = bounceevent.get()
print results

CSharp

Using FuelSDK;
ET_Client myclient = new ET_Client();
ET_BounceEvent bounceevent = new ET_BounceEvent();
bounceevent.AuthStub = myclient;
GetReturn results = bounceevent.Get();
Console.WriteLine("Get Status: " + results.Status.ToString());

Java

Streamline your usage of Get

Optionally, you can set the props property when using the Get method in order to limit the number of fields returned. If you don't define the props property, the call returns all fields. You can provide the props property as an array containing any combination of the following values:

  • ID
  • ObjectID
  • PartnerKey
  • CreatedDate
  • ModifiedDate
  • Client.ID
  • SendID
  • SubscriberKey
  • EventDate
  • SMTPCode
  • BounceCategory
  • SMTPReason
  • BounceType
  • EventType
  • TriggeredSendDefinitionObjectID
  • BatchID

Ruby

bounceevent.props = ['SendID', 'EventDate']

PHP

$bounceevent->props = array('SendID', 'EventDate');

Python

bounceevent.props = ["SendID", "EventDate"]

CSharp

bounceevent.Props = new string[] { "SendID", "EventDate" };

Java

Filter Get Requests

Optionally, you can set the filter property to limit the number of results returned. If you don't define the props property, the call returns all fields. A filter consists of three key/value pairs:

  1. Property: Any of the properties that can be returned for a bounce event
  2. SimpleOperator: Valid simple operators include the following:
    • equals
    • notEquals
    • greaterThan
    • lessThan
  3. Value/DateValue: Use DateValue to match values when using a Date datatype. Otherwise, use Value.

Ruby

bounceevent.filter = {'Property' => 'SubscriberKey','SimpleOperator' => 'equals','Value' => 'example@example.com'}

PHP

$bounceevent->filter = array('Property' => 'SubscriberKey','SimpleOperator' => 'equals','Value' => 'example@example.com');

Python

bounceevent.filter = {"Property" : "SubscriberKey","SimpleOperator" : "equals","Value" : "example@example.com"}

CSharp

bounceevent.SearchFilter = new SimpleFilterPart() { Property = "SubscriberKey", SimpleOperator = SimpleOperators.greaterThan, Value = new string[] { "example@example.com" } };

Java