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.

Cannot Create Contact, But Contact Also Not Found

Highlighted
Occasional Participant

Cannot Create Contact, But Contact Also Not Found

When I attempt to do a REST Contact Lookup by email address, I get a 500 Server Error, which the documentation says indicates that a contact is not found by that email address.


When I try to subsequently create the Contact via a REST POST, I also get an error.


I can't find the email address in question anywhere in my online member list, so I'm wondering why the Contact Creation is erroring out.


REST Call #1: Lookup Contact By Email Address:


Request:

Method: GET

URL: https://api.constantcontact.com/ws/customers/betaupsilonchi/contacts?email=david.adams%40chk.com


Response:

HTTP Status Code: 500

Response Text: Error 500: Server Error


REST Call #2: Create Contact:


Request:

Method: POST

URL: https://api.constantcontact.com/ws/customers/betaupsilonchi/contacts


POST Data:

<entry xmlns="http://www.w3.org/2005/Atom">

  <title type="text"></title>

  <updated>2010-09-27T12:00:00.000Z</updated>

  <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>david.adams@chk.com</EmailAddress>

      <OptInSource>ACTION_BY_CUSTOMER</OptInSource>

      <ContactLists>

        <ContactList id="http://api.constantcontact.com/ws/customers/betaupsilonchi/lists/2"/>

      </ContactLists>

    </Contact>

  </content>

</entry>


Response:

HTTP Status Code: 500

Response Text: Error 500: Server Error

4 REPLIES 4
Highlighted
Employee

500 errors

Hello,



I have looked over the issue you are having with making calls to our API servers and getting 500 errors. I was not able to recreate the issue you are having with the search for contact. When I did a GET to the URI: https://api.constantcontact.com/ws/customers/(USERNAME)/contacts?email=david.adams%40chk.com, it returns XML.



I did recreate the issue that you are having with the POST you are doing. The reason you are getting the 500 error is because you do not have a / at the end of <Contact xmlns="http://ws.constantcontact.com/ns/1.0">.



It should be <Contact xmlns="http://ws.constantcontact.com/ns/1.0/">



Regards,

Benjamin Soder
NOC Analyst
Constant Contact
Highlighted
Occasional Participant

Thanks for checking Ben - I'm

Thanks for checking Ben - I'm still getting the 500 error on the GET.


I copy-pasted the URI you listed into my browser and entered my credentials, and the server still gave me a 500 error. I also tried this via the REST client and received the same result.


The source code of the response is:



Error 500: Server Error

Why would I be getting a different result?

Highlighted
Employee

REST client RCQ

Hi,



Is it possible for you to do this request and get the 500 error again in the REST Client, and then save the Request to an RCQ file and send it to the Webservices Support team. We can then get a better understanding of what is going on.



Regards,

Benjamin Soder
NOC Analyst
Constant Contact
Highlighted
Employee

Re: REST client RCQ

It does appear there is an issue when attempting to retrieve contact details for an address that is not a contact, but has registered for an event in your account, where our API will return a 500 error.


 


We have let our engineering team know about this, and I will reply to this post once this issue has been resolved. I apologize for any inconvenience that this issue has caused.

David J

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