Bounce report via API

Member

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("https://api.constantcontact.com/ws/customers/" +
                uName + "/campaigns/" + campaignId + "/events/bounces");

 Please advise!!

3 REPLIES 3
Employee

Hello,

 

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!
Regards,
Benjamin Soder
NOC Analyst
Constant Contact

I do see a link..in 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. 

Hi,

 

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