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?
Solved! Go to 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,
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,