We all started somewhere! Share your experience on the Get Advice: Let's Get Started Sweepstakes thread and be entered to win a $100 credit on your Constant Contact account.

Not able to extract XML output for number of Opens, Sends, Clicks etc... from API using .Net

Regular Participant

Not able to extract XML output for number of Opens, Sends, Clicks etc... from API using .Net


I am new to constant contact API and i am trying to extract summary report of number of opens, number of clicks, number of sends to all my email campaigns present in the account through api. I am unable to get the XML output. the output that i get only contains collections of Name, Status and Date Sent. I have a trial account and created 6 email campaigns. when i click on reports link it shows me all the summary of sends, clicks and opens in the website but not able to get the same values in the XML output. Please help me ASAP. Any help will be appreciated.





For sent campaigns, the statistic events are in drill down resource URIs.  Here is a sample of one:




This would provide you with all the bounces for the campaign with ID campaign_id.  There are also resources for clicks, opens, sends, optouts and forwards.  Hope this helps!

Dave Berard
Senior Product Manager, Constant Contact
Regular Participant


Thanks for you response, i appreciate your imediate response. but i am getting some output which i am not able to figure out what it is.

I tried with the following code which you suggested, it generates a XML response but gives me some time format i am not able to get the bounces count when i query by this following string:


The output i get after querying is as follows:

{username} 2010-10-07T04:52:50.804Z

Note: I took the campaign ID form the query string which can be seen on mouse hover of a eamil campaign in constant contact. It is constructed as uid=some id. I am not sure if this is the real campaing ID.


Please can anyone tell what kind of output is this?

Any help will be appreciated.



The UID is the campaign ID, but the recommend way to retrieve this ID would be to perform an http get on https://api.constantcontact.com/ws/customers/{user-name}/campaigns. This will return a paginated response of 50 campaigns, including their ID.


Regard the response you are receiving, how is it you are performing that query (using a programming environment? Web browser? etc..) It looks like you are successfully retrieving the bounce data for that campaign, but as there are no bounces recorded it is only displaying the username for the account and the date that the campaign was last updated. For example, your XML probably looks similar to what is below.


<?xml version="1.0" encoding="UTF-8"?>

<feed xmlns="http://www.w3.org/2005/Atom">


  <title type="text">Bounce Events for Customer: {user-name}, Campaign id: {campaign-id}</title>

  <link href="bounces"></link>

  <link href="bounces" rel="self"></link>





  <link href="/ws/customers/{user-name}/campaigns/{campaign-id}/events/bounces" rel="first"></link>


David J

Regular Participant

Hi David,


Thanks for the response, i solved the problem. The problem was in building the URL. The above mentioned URL works for me with the desired XML output.




Developer Portal

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

Visit Page