API to get a list of details about campaigns which are sent in last modified order.

KCSC
Rookie
0 Votes

Hi,

 

I have a question about a specific API request.

I have a client who would like to post on the website about the email campaigns that she sent, with a permalink.

I wonder if Constant Contact has an API request that gets me a list of details about campaigns that were sent in the last modified order. 

 

Any assistance would be greatly appreciated.

1 REPLY 1
Courtney_E
Employee
0 Votes

Hello KCSC,

 

Thank you for reaching out to Constant Contact API Developer Support. My team is here to assist outside software developers with questions about building into Constant Contact's API.

 

There are multiple ways to retrieve the URLs for sent campaigns. You can do this both via the V3 API as well as via the website UI.

 

To retrieve this data via the API:

 

After completing authorization, you'd first want to make a GET call to retrieve a list of email campaigns:


GET a Collection of Email Campaigns

https://v3.developer.constantcontact.com/api_reference/index.html#!/Email_Campaigns/retrieveEmailCam...

 

In the results, emails that are marked with the "current_status" of "Done" will be emails that have been sent. You will want to save the "campaign_id" for those sent emails. The "updated_at" time should reflect when the email was last sent.

 

You will then make a GET call for each "campaign_id" to retrieve the details for each of those sent campaigns.

 

GET Details About a Single Email Campaign
https://v3.developer.constantcontact.com/api_reference/index.html#!/Email_Campaigns/retrieveEmailCam...

 

From the responses of these calls, you will see a "campaign_activity_id" that corresponds with a "role". You will want to save the "campaign_activity_id" for "role": "permalink". 

 

Next you can use the  "campaign_activity_id" to get the "permalink_url" for that campaign.

 

GET a Single Email Campaign Activity

https://v3.developer.constantcontact.com/api_reference/index.html#!/Email_Campaigns/retrieveEmailCam...



Alternately, to get the URLs via the website UI, here are the instructions:

 

The permanent URL for a campaign

http://knowledgebase.constantcontact.com/articles/KnowledgeBase/6128-email-campaign-url

 

You can then link to these campaign URLs as desired.



A third option would be to use Constant Contact's Email Archive widget, a pre-built tool that is available on certain plan types which displays selected sent email urls on your site:

Embed the email archive widget on your website

http://knowledgebase.constantcontact.com/articles/KnowledgeBase/8759-add-the-email-archive-widget-to...

 

Add emails to the email archive widget to display them on your website

http://knowledgebase.constantcontact.com/articles/KnowledgeBase/8788-add-or-remove-an-email-from-ema...

 

Apply styles and formatting to the email archive widget on your website

https://knowledgebase.constantcontact.com/articles/KnowledgeBase/35223-Apply-Styles-and-Formatting-t...

 

Switching to our new Lite, Standard, and Premium plans

https://knowledgebase.constantcontact.com/articles/KnowledgeBase/48672-Switching-to-our-new-Lite-Sta...

 

Please have a look and let us know if you have any other questions!

 

For questions about the V3 API, you can reach our team directly/securely via email at webservices@constantcontact.com

 

For questions about the Website UI and/or the Email Archive widget, please please reach out to Constant Contact's Support Team at 866-289-2101.


Regards,

Courtney E.
Tier II API Support Engineer

Did I answer your question?
If so, please mark my post as an "Accepted Solution" by clicking the Accept as Solution button in the bottom right hand corner of this post.
Resources
Developer Portal

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

Visit Page

Announcements

API Updates

Join our list to be notified of new features and updates to our V3 API.

Sign Up