cancel
Showing results for 
Search instead for 
Did you mean: 
Constant Contact wants to help you succeed! We’re celebrating our professional service programs on the Constant Contact Community this month and you have a chance to try one of the services for free! Learn more.

All Email campaigns

Occasional Contributor

All Email campaigns

I've searched and searched. How do I pull more than 50 email campaigns?? Is it even possible in the API?

3 REPLIES 3
CTCT Employee

Re: All Email campaigns

When pulling a list from any of our collections, it always lists the first fifty.  If you have more than fifty lists, there will be a node in the xml that specifies the next group.  Here is an example of listing the campaign xml:

 

<?xml version='1.0' encoding='UTF-8'?>
<feed xmlns="http://www.w3.org/2005/Atom">
<id>http://api.constantcontact.com/ws/customers/joesflowers/campaigns</id>
<title type="text">Campaigns for customer: joesflowers</title>
<link href="campaigns" />
<link href="campaigns" rel="self" />
<author>
<name>joesflowers</name>
</author>
<updated>2009-10-19T18:55:01.918Z</updated>
<link href="/ws/customers/joesflowers/campaigns?next=2" rel="next" />
<link href="/ws/customers/joesflowers/campaigns" rel="current" />
<link href="/ws/customers/joesflowers/campaigns" rel="first" />

Notice the node: <link href="/ws/customers/joesflowers/campaigns?next=2" rel="next" />

 

You can then call this URI and it will return another list of fifty campaigns.

 

If you have any questions please let me know.

Benjamin Soder
NOC Analyst
Constant Contact
Occasional Contributor

Re: All Email campaigns

The current C# examples are not setup to do this are they?

CTCT Employee

Re: All Email campaigns

The current C# library gets the first 50 campaigns.  Currently with the campaign collection, you will have to take the returned data and pull out the next link on your end, and then use it in the httpGet function, which will return the next list of 50.

 

Regards,

Benjamin Soder
NOC Analyst
Constant Contact