Follow

Report Subscriber Events (BETA)

**Coming end of January 2018**

The Report Subscriber Events group of commands allow you to return events by tracked event type for a subscriber specified by either subscriber_id or email. The commands include:

Event Type Sent as Campaign Sent as One-Off Message via API Both
Sent rpt_subscriber_send_events rpt_subscriber_api_send_events rpt_subscriber_all_send_events
Open rpt_subscriber_open_events rpt_subscriber_api_open_events rpt_subscriber_all_open_events
Click rpt_subscriber_click_events rpt_subscriber_api_click_events rpt_subscriber_all_click_events
Delivery
  Hard Bounce
  Soft Bounce
  Blocked Bounce
  Complaint
rpt_subscriber_delivery_events rpt_subscriber_api_delivery_events rpt_subscriber_all_delivery_events
Unsubscribe     rpt_subscriber_unsub_events
Video     rpt_subscriber_video_events
Social     rpt_subscriber_social_events
All Other Events     rpt_subscriber_tracking_other_events

The commands require the following arguments: Command, Realm, Password, and Subscriber ID or Email plus First Name.

api_web?r=myrealm&p=mypass&c=rpt_subscriber_open_events&subscriber_id=44956

The command is ‘rpt_subscriber_events’, the realm is ‘myrealm’ and the password is ‘mypass’.  The Open events to return are for subscriber with id='44956'.

api_web?r=myrealm&p=mypass&c=rpt_subscriber_open_events&email=jane@domain.com

The Open events to return are for subscriber with email='jane@ domain.com'.  If more than one subscriber exists with the same email address, then the first name is also required:

api_web?r=myrealm&p=mypass&c=rpt_subscriber_open_events&email=jane@domain.com&first=Jane

A successful search will return a list of events for the subscriber, the associated list and the event date.

Example

Using all commands and arguments (please note the command is wrapped for display purposes only):

api_web?r=myrealm&p=mypass&c=report_subscriber_delivery_events&subscriber_id=298&event_type=30&output_format=csv&headers=1

Successful results return:

"Event","Event ID","List","List ID","Date"
"Soft Bounce","30","My List","5","09/26/17 11:02 AM"
"Soft Bounce","30","My List","5","09/28/17 1:11 PM"
"Soft Bounce","30","My List","5","09/30/17 7:45 AM"

Customer Key Example

Some systems have the ability to define a unique Customer Key per subscriber.  If your realm has Customer Key enabled, you may use the customer_key to find a subscriber instead of email or identity_field:

api_web?r=myrealm&p=mypass&c=report_subscriber_delivery_events&customer_key=1129&event_type=30&output_format=csv&headers=1

Results

The Report Subscriber Events commandsoutput either the results of the search or a FAILURE message. 

Success

The Report Subscriber Events commands do not explicitly return a Success code.  Instead, each output the event details in comma separated format.  Use the output_format argument to return the results in an alternate format.

"Event","Event ID","List","List ID","Date" 

Failure

A Report Subscriber Events commands will fail for several reasons, such as if the subscriber doesn't exist.  The result format is:

FAILURE: [Reason]  

Arguments

The Report Subscriber Events commands support the following arguments:

Name

Req?

Description

Argument

Command

Yes

Defines the command to use.

rpt_send_events
rpt_api_send_events
rpt_all_send_events 
rpt_open_events
rpt_api_open_events
rpt_all_open_events
rpt_click_events
rpt_api_click_events
rpt_all_click_events
rpt_delivery_events
rpt_api_delivery_events
rpt_all_delivery_events
rpt_unsub_events
rpt_social_events
rpt_video_events
rpt_tracking_other_events

cmd=[command]

c=[command]

Realm

Yes

Name of the realm to run the command.  This is required, and the command will fail if the realm and password do not match.

realm=[realm_name]

r=[realm_name]

Password

Yes

Authentication code for API access.  This is required, and the command will fail if the realm and password do not match.

pwd=[password]

p=[password]

Subscriber ID

*

Identifier for the subscriber data to return.  Required if Email is not defined.

subscriber_id=[subscriber_id]

Email *

Email identifier for the subscribe data to return.  Required if Subscriber ID is not defined.

email=[email]
First Name *

First Name of the subscriber data to return.  Required if subscribers with the same email address exist.

first=[first_name]

Customer Key

*

Identifier of the subscriber to find in lieu of Email or Identity Field. Only available on some systems.

customer_key=[customer_key]
Event Type  

Identifier for the type of event to report.  If not included, events of all types related to the specific command are returned. See Event Types.  If no type or invalid type is specified, all events for command are returned. 

event_type=[event_type_id]

DEFAULT==0

Limit Results  

Limit the number of records returned from 1 to 5000.

limit=[1 to 5000]

DEFAULT==5000

Output Format

 

To specify the format of the list output, use one of two arguments.  If no argument is included, the default output is space-delimited plain text string, which may not include all data columns.

csv=1 or

output_format=[csv,csv_tab, csv_pipe,xml]

Header

 

To define the data with a label, use the Header argument.  This can only be used in conjunction with the output format, and does not affect XML.

headers=[0,1]

DEFAULT==0

*Feature added in v13.0.0

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

Powered by Zendesk