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.

HTTP/1.1 409 Conflict ::- Email address XXXXX is already a contact

SOLVED
Go to solution
Highlighted
Occasional Contributor

HTTP/1.1 409 Conflict ::- Email address XXXXX is already a contact

Hi,

 

Iam trying to create a duplicate contact (which exists in another list) with the following xml.

 

<entry xmlns="http://www.w3.org/2005/Atom">
  <title type="text"> </title>
  <updated>2011-03-24T14:21:06.407Z</updated>
  <author></author>
  <id>data:,none</id>
  <summary type="text">Contact</summary>
  <content type="application/vnd.ctct+xml">
    <Contact xmlns="http://ws.constantcontact.com/ns/1.0/">
      <EmailAddress>t.e.st_100@example.com</EmailAddress>
      <OptInSource>ACTION_BY_CUSTOMER</OptInSource>
      <ContactLists>
        <ContactList id='http://api.constantcontact.com/ws/customers/venubabu/lists/37'/>
      </ContactLists>
    </Contact>
  </content>
</entry>

 

But iam receiving the following error.

HTTP/1.1 409 Conflict

Email address t.e.st_100@example.com is already a contact

 

Is it possible to create duplicate contacts using constant contact api?

 

If possile please let me know where am i doing wrong?

 

 


1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Employee

Re: HTTP/1.1 409 Conflict ::- Email address XXXXX is already a contact

Hi Venu,

 

Usually the best way to get the contact ID would be to do a search by email address for the contact.  If the subscriber exists, it will return XML that includes the contact ID.  You would then do a GET on the contact ID and get the full contact XML, which you can modify.

 

May I ask what programming language you are using?  It may be helpful to look at our code samples if you are using one of those languages.

 

Regards,

Benjamin Soder
NOC Analyst
Constant Contact

View solution in original post

3 REPLIES 3
Highlighted
Employee

Re: HTTP/1.1 409 Conflict ::- Email address XXXXX is already a contact

 

Hello,
It is not possible to have multiple instances of the same contact.  However, the same contact can be in multiple lists.  In order to do this, instead of doing a POST, you would want to get the existing contact XML by doing a get, then adding a second list to the ContactLists node, and then do a PUT https call with the newly updated XML to the contacts URI.  This will then have the contact in both lists, instead of just the one.

To learn more about how this is done, here is the documentation on how to update a contact.  If you have any further questions about this please feel free to ask them here.

Regards,

 

Benjamin Soder
NOC Analyst
Constant Contact
Highlighted
Occasional Contributor

Re: HTTP/1.1 409 Conflict ::- Email address XXXXX is already a contact

Hi,

 

Thanks for the reply. But how can i get the Id  of the contact. When iam creating the contact i don't know whether it exist already or not.

 

Is there any function or api to get the contact id if the contact already exist?

 

 

Thanks,

Venu

Highlighted
Employee

Re: HTTP/1.1 409 Conflict ::- Email address XXXXX is already a contact

Hi Venu,

 

Usually the best way to get the contact ID would be to do a search by email address for the contact.  If the subscriber exists, it will return XML that includes the contact ID.  You would then do a GET on the contact ID and get the full contact XML, which you can modify.

 

May I ask what programming language you are using?  It may be helpful to look at our code samples if you are using one of those languages.

 

Regards,

Benjamin Soder
NOC Analyst
Constant Contact

View solution in original post

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