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 internal server error

Highlighted
Occasional Participant

500 internal server error

Getting a 500 error. Really need some help


I'm using the utility wrapper (ctctWrapper.php)


Here is the XML that is being sent


<?xml version="1.0" encoding="UTF-8"?>

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

    <title>TitleNode</title>

    <updated>2010-12-08T07:05:21+01:00</updated>

    <author>

        <name>CTCT Samples</name>

    </author>

    <id>data:,</id>

    <summary type="text">New Contact</summary>

    <content type="application/vnd.ctct+xml">

        <Contact xmlns="https://ws.constantcontact.com/ns/1.0/">

            <EmailAddress>test10@gmail.com</EmailAddress>

            <FirstName>me</FirstName>

            <LastName></LastName>

            <MiddleName></MiddleName>

            <CompanyName>Site-Seeker, Inc.</CompanyName>

            <JobTitle></JobTitle>

            <OptInSource>ACTION_BY_CUSTOMER</OptInSource>

            <HomePhone></HomePhone>

            <WorkPhone></WorkPhone>

            <Addr1></Addr1

            ><Addr2></Addr2>

            <Addr3></Addr3

            ><City></City>

            <StateCode></StateCode>

            <StateName></StateName>

            <CountryCode></CountryCode>

            <PostalCode></PostalCode>

            <SubPostalCode></SubPostalCode>

            <Note></Note>

            <EmailType></EmailType>

            <CustomField1></CustomField1>

            <CustomField2></CustomField2>

            <CustomField3></CustomField3>

            <CustomField4></CustomField4>

            <CustomField5></CustomField5>

            <CustomField6></CustomField6>

            <CustomField7></CustomField7>

            <CustomField8></CustomField8>

            <CustomField9></CustomField9>

            <CustomField10></CustomField10>

            <CustomField11></CustomField11>

            <CustomField12></CustomField12>

            <CustomField13></CustomField13>

            <CustomField14></CustomField14>

            <CustomField15></CustomField15>

            <ContactLists/>

        </Contact>

    </content>

</entry>

3 REPLIES 3
Highlighted
Employee

XML returning 500 error

Hello,



I have looked over the XML and it does not appear that you have included a List ID URL in the Contact Lists node. This is a required node.



I also notice that in the Contact node, the xmlns is https://ws.constantcontact.com/ns/1.0/ when it should read http://ws.constantcontact.com/ns/1.0/.



If you have any questions please let me know.



Regards,

Benjamin Soder
NOC Analyst
Constant Contact
Highlighted
Occasional Participant

list

fixed the https thing, I tried to put something in for list, but when i do I get an invalid request. I have no idea what to put in there. Can you point me to where I can find this information?


I jsut want to add the contact to the default list for my client....


 

Highlighted
Employee

ContactList ID

Hello,



The ContactLists nodes must be in this format:



<ContactLists>
<ContactList id="http://api.constantcontact.com/ws/customers/joesflowers/lists/1" />
</ContactLists>

You can find more information here about how to find the ContactList ID.  Usually your default list is List ID 1.



If you have any questions please let me know.



Regards,


 


 

Benjamin Soder
NOC Analyst
Constant Contact
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