We all started somewhere! Share your experience on the Get Advice: Let's Get Started Sweepstakes thread and be entered to win a $100 credit on your Constant Contact account.

Error 400 : while creating the new contact list

rakeshg2
Regular Participant

Error 400 : while creating the new contact list

i am getting the following error while creating the new contact list

 

Error 400: The request contains errors in the common Atom sections, which lie outside <entry> or <Content>, such as <feed>, <id>, <author> or <updated>

 

here is my xml data

 

<?xml version="1.0" encoding="utf-8"?>
<entry xmlns="http://www.w3.org/2005/Atom">
    <id >data</id >
    <title />
    <author />
    <updated>2013-04-04T14:21:06.407Z</updated>
    <content type="application/vnd.ctct+xml">
        <ContactList  xmlns="http://ws.constantcontact.com/ns/1.0/">
            <OptInDefault >false</OptInDefault >
            <Name >a new list</Name >
            <SortOrder >99</SortOrder >
        </ContactList >
    </content>
</entry>

 

 

plz could you tell me where th error is ..

 

thanks in advance

 

 

 

3 REPLIES 3
Shannon_W
Employee

Hi,

 

You were just missing a few characters in your id node.  Unfortunately this website likes to convert certain characters to HTML.  There are a few characters after "data" in the id node.  It should read "data", then have a colon, semi-colon, and comma afterward, then have the closing id tag.

 

<?xml version="1.0" encoding="utf-8"?>
<entry xmlns="http://www.w3.org/2005/Atom">
    <id >data&colon;;,</id >
    <title />
    <author />
    <updated>2013-04-04T14:21:06.407Z</updated>
    <content type="application/vnd.ctct+xml">
        <ContactList  xmlns="http://ws.constantcontact.com/ns/1.0/">
            <OptInDefault >false</OptInDefault >
            <Name >a new list 04152013</Name >
            <SortOrder >99</SortOrder >
        </ContactList >
    </content>
</entry>

 

 

Best Regards,

Shannon W.

API Support Specialist

rakeshg2
Regular Participant

can SortOrder be any number???

Sort order can definitely be any positive number.  It's used in the default order of how lists appear in our UI.  So, the higher the number the lower the list will appear.

Dave Berard
Senior Product Manager, Constant Contact
Developer Portal

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

Visit Page