The Community is hosting an End of Summer sweepstakes! Participants must complete tasks to earn tickets that will enter them with a chance to win a free year of Constant Contact and other great prizes!*
*No Purchase Necessary. For Official Rules, visit here. Constant Contact’s End of Summer 2020 Sweepstakes ends on October, 20, 2020 at 11:50 PM EST.

Adding new and existing contacts to a list via API

Highlighted
New Member

Adding new and existing contacts to a list via API

Hi everyone,

 

I've been looking for a solution regarding my question in the subject. There has to be a better way than doing an api call to check for existing users, do a put to update every single field (even though I only want to change just 1) or a push to create a new user.

 

Is there a way to send a contact id and add it to a list simply? 

 

thank you

1 REPLY 1
Highlighted
Moderator

Re: Adding new and existing contacts to a list via API

Hi @SakoK,

 

Our API use to clear out all of the data that was not submitted in fact our documentation states that is what it does. I just tested this and it appears that has changed. I will dig back through our updates to see when this changed.

 

Given that change it is still a good practice to GET the contact before you do a PUT and update the listIDs because there are some circumstances that can cause the contactID to change. It is considered a bad practice to store the contactID and use that to submit changes without first GETting the current data.


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

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

Visit Page

Constant Contact 2020 End of Summer Community Sweepstakes!

The Constant Contact User Community is hosting a sweepstakes. The more you participate, the more chances you have to win! Read on to learn more...

Read More
Featured