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.

500 error when updating contact

Highlighted
Occasional Participant

500 error when updating contact

Hi, I am trying to update contacts via the API this morning and am receiving a 500 error. I am able to grab contact data using the same url but when sending an update PUT request I get a 500 error in return


This is the error I get: The requested URL returned error: 500



4 REPLIES 4
Highlighted
Employee

500 error

Hello,



A 500 error can mean a few different things. Can you show us the XML that you are sending to the URL? Also the exact URL that you are doing the PUT call to. We should be able to troubleshoot exactly why you are getting this error.



Regards,

Benjamin Soder
NOC Analyst
Constant Contact
Highlighted
Occasional Participant

Here is the exact url I am

Here is the exact url I am submitting to: https://api.constantcontact.com/ws/customers/farmrichaccount/contacts/54077


 


and here is the XML:


<?xml version="1.0" encoding="UTF-8"?>
<entry xmlns="http://www.w3.org/2005/Atom">


<link href="/ws/customers/farmrichaccount/contacts/54077" rel="edit"/>
<id>http://api.constantcontact.com/ws/customers/farmrichaccount/contacts/54077</id>
<title type="text">Contact: shea@scoutmarketing.net</title>
<updated>2010-12-20T16:00:50.118Z</updated>
<author>
<name>Constant Contact</name>
</author>


<content type="application/vnd.ctct+xml">
<Contact xmlns="http://ws.constantcontact.com/ns/1.0/" id="http://api.constantcontact.com/ws/customers/farmrichaccount/contacts/54077">
<Status>Active</Status>
<EmailAddress>shea@scoutmarketing.net</EmailAddress>
<EmailType>HTML</EmailType>
<Name> </Name>
<FirstName/>


<MiddleName/>
<LastName/>
<JobTitle/>
<CompanyName/>
<HomePhone/>
<WorkPhone/>
<Addr1/>
<Addr2/>
<Addr3/>


<City/>
<StateCode/>
<StateName/>
<CountryCode/>
<CountryName/>
<PostalCode/>
<SubPostalCode/>
<Note/>
<CustomField1>&lt;a href="http://bricks.coupons.com/enable.asp?</CustomField1>


<CustomField2>eb=1&amp;o=82768&amp;c=FR&amp;p=54077&amp;cpt=AOWwpYBzhi67moOWaHxd</CustomField2>
<CustomField3></CustomField3>
<CustomField4>"&gt;&lt;img src="http://www.farmrich.com/email/</CustomField4>
<CustomField5>superbowl_2011/images/coupon.jpg" border="0" /&gt;&lt;/a&gt;</CustomField5>


<CustomField6/>
<CustomField7/>
<CustomField8/>
<CustomField9/>
<CustomField10/>
<CustomField11/>
<CustomField12/>
<CustomField13/>
<CustomField14/>


<CustomField15/>
<ContactLists>
<ContactList id="http://api.constantcontact.com/ws/customers/farmrichaccount/lists/39">
<link xmlns="http://www.w3.org/2005/Atom" href="/ws/customers/farmrichaccount/lists/39" rel="self"/>
<OptInSource>ACTION_BY_CUSTOMER</OptInSource>
<OptInTime>2010-12-20T16:00:50.220Z</OptInTime>
</ContactList>
</ContactLists>


<Confirmed>false</Confirmed>
<InsertTime>2010-12-20T16:00:50.118Z</InsertTime>
<LastUpdateTime>2010-12-20T16:00:50.118Z</LastUpdateTime>
</Contact>
</content>
<source>
<id>http://api.constantcontact.com/ws/customers/farmrichaccount/contacts</id>


<title type="text">Contacts for Customer: farmrichaccount</title>
<link href="contacts"/>
<link href="contacts" rel="self"/>
<author>
<name>farmrichaccount</name>
</author>
<updated>2011-02-02T16:39:08.124Z</updated>


</source>
</entry>
Highlighted
Employee

Re: Here is the exact url I am

It looks like <CustomField5> is what is causing an error here. I'll need to do a bit more research, but a combination of the HTML encoded symbols at the end of the field combined with the stray quote after coupon.jpg are causing an issue when we try to read that field.


 


As a potential work around for the time being, if you were to split the fields into two separate custom fields such as:


 


<CustomField5>superbowl_2011/images/coupon.jpg"</CustomField5>

<CustomField6> border="0" /&gt;&lt;/a&gt;</CustomField6>


 


This would update fine and you would just need to include one extra field in order to complete your dynamic link.

David J

Highlighted
Occasional Participant

That worked. Thanks.   I am

That worked. Thanks.


 


I am curious as to what the actual issue is though when you get it worked out.

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