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.

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

SOLVED
Go to solution
VenuB
Occasional Participant

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

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
bsoder
Employee

 

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
VenuB
Occasional Participant

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

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