We all started somewhere! Share your experience on the Get Advice: Let's Get Started Sweepstakes thread and be entered to win a $100 credit on your Constant Contact account.

Add contacts to list activity

CarolS638
Occasional Participant

Add contacts to list activity

Hi all:

Right now I want to add multiple email address to a contactlist. 

Here is my post body:

 

data.Append("activityType=SV_ADD");
data.Append("&data=EMAIL+ADDRESS%0A");
data.Append("emailaddress%0A");
data.Append("emailaddress");
data.Append("&lists=http%3A%2F%2Fapi.constantcontact.com%2Fws%2Fcustomers%2Fusername%2Flists%2F5");

 

I wonder what collection URI I should post to, right now I post this body to :

http://api.constantcontact.com/ws/customers/username/lists/5

but I am getting (415)unsupported media error.

 

Where did I do wrong..anybody help me...I did use content type = application/x-www-form-urlencoded

 

 Thank you.

5 REPLIES 5
Shannon_W
Employee

Hi,

 

You should be posting the resultant string to a URI like:

 

https://api.constantcontact.com/ws/customers/<username>/activities

 

Best Regards,

Shannon W.

API Support Specialist

CarolS638
Occasional Participant

  Thank you for your answer, after posting to the URI you provided,  I haved added two email to specified list.

But under activity tag, it says that there is a error with add activity, although the emails have been successfully added.

Please see below:

 

Lists:  new

Status:  Complete

Insert Time:  4/2/2013 2:03 PM EDT

Run Start Time:  4/2/2013 2:04 PM EDT

Run Finish Time:  4/2/2013 2:04 PM EDT

Uploaded File Name:  A file was not used for this activity

Number of Contacts:  3

Number of Errors:  1

Invalid Email Addresses:  email address (invalid format)

 

Is my post body right? What is resultant string?

 

Thank you!

Hi,

 

I redacted your username and email addresses in your earlier post so that they didn't get scraped, but I didn't see anything obviously wrong with the email addresses.

 

If you used your previous example, you only had 2 email addresses to be added, but the file activity says you had 3.  Is that correct?

 

Best Regards,

Shannon W.

API Support Specialist

CarolS638
Occasional Participant

Hi:

 Yes, I only added two email addresses, I don't know why file activity says I had 3, and What is that error? 

and another time, I try to add three email, the file activity says I had 4, but only 2 emails had been added to list. I am so confused..

 

help...

Hi Carol,

 

It seems like an extra "%OA" might be getting added to the import string.  Could you post your import string again?  I will try to reproduce it in my account.

 

Best Regards,

Shannon W.

API Support Specialist

Developer Portal

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

Visit Page