The requested URL returned error: 400

Highlighted
Visitor

The requested URL returned error: 400

Hi,

 

Following is my xml being generated for create contact (ACTION_BY_CUSTOMER) API call (v1)

<?xml version='1.0' encoding='UTF-8'?>
<entry xmlns="http://www.w3.org/2005/Atom">
	<title type="text">test</title>
	<updated>2014-10-13T09:01:06Z</updated>
	<author>test</author>
	<id>data&colon;,none</id>
	<summary type="text">Contact</summary>
	<content type="application/vnd.ctct+xml">
	<Contact xmlns="http://ws.constantcontact.com/ns/1.0/">	
<EmailAddress>bfuhrmann@att.net</EmailAddress>
<FirstName>Mary</FirstName> <LastName>Fuhrmann</LastName>
<OptInSource>ACTION_BY_CUSTOMER</OptInSource>
<ContactLists>
<ContactList id="https://api.constantcontact.com/ws/customers/xyz@checkmandesign.com/lists/28" /> </ContactLists> </Contact> </content> </entry>

 The curl is returning following error

"erorr: The requested URL returned error: 400"

 

I have gone through the forum, and forum and error_code documentation, and from that I undertand that this is related with xml malformed. But I can't figure out what's wrong with my xml. Could antone please help me?

 

1 REPLY 1
Highlighted
Honored Contributor

Re: The requested URL returned error: 400

Hello,

 

After reviewing this XML, I find that it is most likely that the problem here is specifically that you are attempting to add contacts to a list that no longer exists. In this XML the contact is specifically being added to a list with the ID of 28, which is failing. In order to view the list IDs for all of the lists currently in your account, you can make a GET API request to https://api.constantcontact.com/ws/customers/USERNAME/lists

 

If you have any questions or any issues with updating the list ID, please let us know!

 

Best Regards,

Elijah G.
API Support Engineer
Developer Portal

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

Visit Page

Register for our "Making Sense of Online Marketing for Retail" Webinar

Join us on Thursday, August 13th at 2pm ET for a free webinar where we'll discuss how to incorporate online marketing into your retail store.

Read More
Featured