Bounce report via API


Bounce report via API

Hi there,


I am using the API to access the bounce report. The Bounces on the email campaign tells me there are 151 but when i extract the xml file using the API, i only get 35% of the contacts. Not all of them come through. What am i doing wrong here?


HttpWebRequest request = (HttpWebRequest)WebRequest.Create("" +
                uName + "/campaigns/" + campaignId + "/events/bounces");

 Please advise!!




When you request any of our collection URI's, our API system will return the full list in groups of 50.  If you have more than 50 of any of the reports, at the very top of the XML there will be a node to return the next 50.  The node will look like this:

<link href="/ws/customers/joesflowers/contacts?next=g24umerp-fymhqg" rel="next" />
<link href="/ws/customers/joesflowers/contacts" rel="first" />
<link href="/ws/customers/joesflowers/contacts" rel="current" />

If you then point to the URI for the next link, it will return another 50 reports.  If you have any questions please let me know!
Benjamin Soder
NOC Analyst
Constant Contact

I do see a my case its 

<link href="/ws/customers/username/campaigns/campaignId/events/bounces?next=1298" rel="next" />



So, in my app,  I would need to get this url each time i run my bounce report then, correct? I guess the next(1298) changes for each bounce report. 



The 1298 would change depending on the current bounce report ID is at.  You would definitely want to get the url each time and then pass it as a post.

Benjamin Soder
NOC Analyst
Constant Contact
Developer Portal

View API documentation, code samples, get your API key.

Visit Page