Can't modify email address of existing contact

Participant

Can't modify email address of existing contact

I want to modify the email of an existing contact (from "chris@chrisx.chris" to "chris@chris.chris"), so I do a GET for the data from 

 

https://api.constantcontact.com/ws/customers/MyCustomerId/contacts/4400?access_token=blahblah

 

and I receive this (abbreviated):

 

<?xml version="1.0" encoding="UTF-8"?>
<entry xmlns="http://www.w3.org/2005/Atom">
<content type="application/vnd.ctct+xml">
<Contact xmlns="http://ws.constantcontact.com/ns/1.0/" id="http://api.constantcontact.com/ws/customers/MyCustomerId/contacts/4400">
<EmailAddress>chris@chrisx.chris</EmailAddress>
<Name>Chris Chris</Name>
</Contact>
</content>
</entry>

 

which I modify to this:

 

<?xml version="1.0" encoding="UTF-8"?>
<entry xmlns="http://www.w3.org/2005/Atom">
<content type="application/vnd.ctct+xml">
<Contact xmlns="http://ws.constantcontact.com/ns/1.0/" id="http://api.constantcontact.com/ws/customers/MyCustomerId/contacts/4400">
<EmailAddress>chris@chris.chris</EmailAddress>
<EmailType>HTML</EmailType>
<Name>Chris, Chris</Name>
</Contact>
</content>
</entry>

 

which I then PUT back to the same URL, to which the server replies "No Content" which is what I always get from the PUT.

 

However, when I manually log into ConstantContact.com and search my contacts, it's still listed with the old email.

 

Any thoughts?

 

Thanks,

Chris

 

1 REPLY 1
Member

Hello Chris,

 

After some investigation and testing, I can explain exactly what's happening. In this case, you're changing contact 4400's email address to chris@chris.chris. However, there is already a contact (#4399) with the email address chris@chris.chris. Because of this, the system sees the matching address internall and refuses to update it, as we do not allow duplicate email addresses.

 

What I would suggest as a way to check for cases like this is to do a search for an existing contact with the new email address before submitting it as an update to an existing contact. You can find the details of the API call to search for a contact here: http://community.constantcontact.com/t5/Documentation/Searching-for-a-Contact-by-Email-Address/ba-p/...

 

Sincerely,

Elijah G.

API Support Specialist

Elijah G.
API Support Engineer
Developer Portal

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

Visit Page