webservices

Listing Campaigns

by Administrator on ‎03-25-2011 09:51 AM

You can get a list of campaigns avaialble in your account by using the GET method on the campaigns collection:

 

https://api.constantcontact.com/ws/customers/{user-name}/campaigns 

The GET on the campaigns collection returns a list of campaigns as described in the Campaigns Collection Reference.

Each campaign is returned in <entry> tags, and if there are multiple campaigns, there will be multiple <entry> elements.  Each entry provides only the basic information about a campaign, such as the name or title of the campaign, its author and status.  To get more details for a particular campaign, you need to  use the <link> provided inside <entry> to construct a new URI and query the campaign itself, and the resulting URI would look like the following:

 

https://api.constantcontact.com/ws/customers/{user-name}/campaigns/1100549626893 

If you call the above URI with GET, you should be able to get more details about the campaign.  This action is described in more detail in Obtaining a Campaigns Information section.