API Bulk Add/Update Contacts

Highlighted
Occasional Participant

Re: API Bulk Add/Update Contacts

 

Thanks for your reply

 

I have tried as per your idea but when I put double quotes around value it takes only characters before comma

other characters are skipped

 

For example:

 

First Name, Last Name

"test, name", Name

 

In this case after bulk add it added only test in First Name , name are skipped

Highlighted
Honored Contributor

Re: API Bulk Add/Update Contacts

Hello Nirmala,

 

Would it be possible for you to provide an example of the code tha tyou are using to submit the bulk activity to Constant Contact? I had tested this method that I provided using a REST client and it correctly created a contact in my account with the first name including the comma.

 

Additionally, are you submitting the list to Constant Contact as an encoded string, or are you sending a file to be processed? If you are sending the content as a URL encoded string, one suggestion I have is to encode the comma which you want to be part of the name as %82.

 

Sincerely,

Elijah G.

Tier 2 Support

Elijah G.
API Support Engineer
Highlighted
Occasional Participant

Re: API Bulk Add/Update Contacts

Hi Elijah G.

 

Initially When I ran my code 2-3 times its not working it skips after comma characters
but same code when I ran again on yesterday then its working. so I am very happy. thank you very much for your guidance.

And I have one more difficulty in Constant Contact to get errors whenever we provide wrong credentials it directly echo the exception. I have tried to return the error but its not working.

Can you please help me ?

Highlighted
Honored Contributor

Re: API Bulk Add/Update Contacts

Hello Nirmala,

 

As far as suppressing or changing the exception errors, you can do that by changing this line of code at the end of the components.php file included in our PHP wrapper:

 

echo $msgPrefix.' '.$this->getMessage().'<br />';

 

This line is what actually outputs the error from the wrapper. If you do change it to function in a manner other than simply showing the error, you may want to add some method of checking whether or not an exception has been thrown so that you can stop your application from continuing.

 

Sincerely,

Elijah G.

Tier 2 Support

Elijah G.
API Support Engineer
Highlighted
Occasional Contributor

Re: API Bulk Add/Update Contacts

Hi,

 

I need to add/update 1000 contact at a time. Could you please provide any sample code in php.

Highlighted
Moderator

Re: API Bulk Add/Update Contacts

Hi @AnjuG8,

 

This thread is 7 years old so the information is a bit outdated. You may want to look at our newest API which is v3 and can be found at 

https://v3.developer.constantcontact.com/. Each of the endpoints have a small example of how to make the call.


Regards,
Jimmy D.
Tier II API Support Engineer
Developer Portal

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

Visit Page

Constant Contact Would Like To Hear From You!

We want to hear from customers like you about your favorite features and how they have helped your business or organization. Tell us by answering a few questions in...

Read More
Featured