endpoints for v3

EdR
Campaign Collaborator
0 Votes

In v2 of the cc api I use the email campaign method “Retrieve a list of email campaigns”

In order to get a list of campaign id’s for a given time period.

With those campaign id’s I then use them one by one using the email campaign method

Retrieve a campaign specified by the campaign id.

My end goal is to get the links and click count for a given campaign.

How do I do the same with v3 of the api?

That is, what are the campaign or email tracking methods that I can use with v3?

Do I need to create an application in order to run these calls?

How is authorization done, can I simply use my login creds or token or both etc?

I did discover that in step 1, getting the correct campaign id for other methods of v3 i should probably use GET a Collection of V2 and V3 API Email Campaign Identifiers , where i am returned output such as:

{

  "xrefs": [

    {

      "v2_email_campaign_id": "1141826284120",

      "campaign_id": "647c3e7f-789b-4403-975f-1207b598a87a",

      "campaign_activity_id": "26797ffd-12e1-4f75-b43f-5df5ac625214"

    }

  ]

}

but so far using the campaign activity id has returned nothing useful, or even internal server errors. ( GET a Unique Contacts Clicks Landing Page Report , email links report had internal server error)

so the question for step 2 - getting a list of links clicked for any campaign remains a mystery.

further: when i do find the answer to step 2, and i am going to use Postman to interface with the cc api v3; what will be the authorization requirements ie; do i use the api_key for my application?, can i use Bearer tokens? must i use Oauth2? thanks in advance.

 

3 REPLIES 3
Courtney_E
Moderator
0 Votes

Hello EdR,

 

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 several significant differences between our V2 and V3 APIs, including the use of different endpoints, OAuth 2.0 rather than basic authentication, JSON payloads instead of XML, and a different format for resource identifiers.

 

A quick start guide for the V3 API can be found here:

https://developer.constantcontact.com/api_guide/getting_started.html 

 

While the rest of our documentation is linked from the quick start guide, the following pages in particular may be useful:

https://developer.constantcontact.com/api_guide/v3_technical_overview.html 

https://developer.constantcontact.com/api_guide/developer_portal.html 

https://developer.constantcontact.com/api_guide/migration_overview.html 

 

Additionally, you can utilize our API Reference tester to test out the functionality of our available endpoints to see how they will work once programmed within your application:

https://v3.developer.constantcontact.com/api_reference/index.html 

 

[Step 1:] Get the "campaign_id" of the campaign(s) that you want the URL for. When you GET campaigns, it will return all campaigns. Sent campaigns will be those that show "current_status": "Done":

 

GET a Collection of Email Campaigns https://v3.developer.constantcontact.com/api_reference/index.html#!/Email_Campaigns/retrieveEmailCam... 

 

REQUEST URL

https://api.cc.email/v3/emails

 

RESPONSE BODY

"campaign_id": "8987dc1a-48ef-433a-b836-7ca4f9aa3481"

 

[Step 2:] Use the "campaign_id" to get the "campaign_activity_id" for "role": "primary_email":

 

GET Details About a Single Email Campaign 

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

 

REQUEST URL

https://api.cc.email/v3/emails/8987dc1a-48ef-433a-b836-7ca4f9aa3481

 

RESPONSE BODY

"campaign_activity_id": "0e3feddd-c8da-4d53-a507-aae5082b8b75",

"role": "primary_email"

 

[Step 3:] Use the "campaign_activity_id" to call the corresponding Email Reporting endpoints that you would like info for:

 

GET an Email Links Report

https://v3.developer.constantcontact.com/api_reference/index.html#!/Email_Reporting/getCampaignActiv...

 

GET an Email Sends Report

https://v3.developer.constantcontact.com/api_reference/index.html#!/Email_Reporting/getSends

 

GET an Email Opens Report

https://v3.developer.constantcontact.com/api_reference/index.html#!/Email_Reporting/getOpens

 

GET an Email Clicks Report

https://v3.developer.constantcontact.com/api_reference/index.html#!/Email_Reporting/getClicks

 

GET an Email Opt-outs Report

https://v3.developer.constantcontact.com/api_reference/index.html#!/Email_Reporting/getOptouts

 

GET an Email Bounces Report

https://v3.developer.constantcontact.com/api_reference/index.html#!/Email_Reporting/getBounces

 

If you would like us to send you additional information regarding getting started with V3 authorization and/or endpoints, or have any further questions, please feel free to reply directly to this email so that we can assist further.

 

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


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.
EdR
Campaign Collaborator
0 Votes

email-campaigns-link-report.jpgH thanks again, please allow my rookie questions. I use postman, and somehow hope to automate getting, let's say either weekly or daily - the date, the url, and the number of clicks on it. In cc reports it would be called the Link Report ( reporting-email campaigns-clicks-links). for authorization, can i use my login/password information, or is it strictly Oauth 2? i've got a few successes in v2 postman, can i use the same authorization credentials in v3 endpoints with Postman. in testing?

what are the methods to get the campaign activity id associated with a date?

what are the campaign methods to get the link count , the url, and the date of the campaign for it?

I am attaching an image of the information i need to get.

 

Courtney_E
Moderator
0 Votes

Hello EdR,

 

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.

 

Please feel free to email us directly at webservices@constantcontact.com and reference case #32931560 requesting additional assistance regarding the OAuth2 Authorization Code Flow in Postman.

 

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


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