The Community is hosting an End of Summer sweepstakes! Participants must complete tasks to earn tickets that will enter them with a chance to win a free year of Constant Contact and other great prizes!*
*No Purchase Necessary. For Official Rules, visit here. Constant Contact’s End of Summer 2020 Sweepstakes ends on October, 20, 2020 at 11:50 PM EST.

All Email campaigns

Highlighted
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
Highlighted
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
Highlighted
Occasional Contributor

Re: All Email campaigns

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

Highlighted
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
Developer Portal

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

Visit Page

Constant Contact 2020 End of Summer Community Sweepstakes!

The Constant Contact User Community is hosting a sweepstakes. The more you participate, the more chances you have to win! Read on to learn more...

Read More
Featured