Between 8:00 - 9:00 am ET on 10/25 we need to take our site down to make updates. We recommend logging out before 8:00am ET and not using your account during this time. Thank you for your patience while we make these important updates.

Scheduling campaign - error 400

Regular Participant

Scheduling campaign - error 400

Hello, I use curl to post the xml for schedule a campaign, the url where I send the data is https://api.constantcontact.com/ws/customers/<username>/campaign/1109246029192/schedules and the curl error is --> The requested URL returned error: 400, Where is the error ??

Thanks Juan Pablo.


5 REPLIES 5
Regular Participant

Sorry, I copy above the XML that I send to the CC server.

 

?xml version="1.0" encoding="UTF-8"?
<entry xmlns="http://www.w3.org/2005/Atom">
<link href="/ws/customers/username/campaigns/1109246029192/schedules/1" rel="edit"/>
<id>http://api.constantcontact.com/ws/customers/username/campaigns/1109246029192/schedules/1</id>
<title type="text">username</title>
<updated>2012-02-09T20:03:35.000Z</updated>
<author>
<name>Constant Contact</name>
</author>
<content type="application/vnd.ctct+xml">
<Schedule xmlns="http://ws.constantcontact.com/ns/1.0/" id="http://api.constantcontact. com/ws/customers/username/campaigns/1109246029192/schedules/1">
<ScheduledTime>2012-02-09T20:03:35.000Z</ScheduledTime>
</Schedule>
</content>
</entry>

 

[*Note from a CTCT Community Admin: I removed the beginning and ending brackets from the "?xml version="1.0" encoding="UTF-8"?" line in your post above because that line breaks the "Developer Support" tab in our CTCT "Labs JMML Q&A" Facebook app (apparently, the app is trying to render that line as is, which wouldn't be acceptable in the middle of a page).]

Hey,

 

I think the issue is stemming from this line:

 

<Schedule xmlns="http://ws.constantcontact.com/ns/1.0/" id="http://api.constantcontact. com/ws/customers/username/campaigns/1109246029192/schedules/1">

 where you have a space in the ID

 

Change this to

 

<Schedule xmlns="http://ws.constantcontact.com/ns/1.0/" id="http://api.constantcontact.com/ws/customers/username/campaigns/1109246029192/schedules/1">

 

Ryan Davis
Quality Engineer
Regular Participant

Tnks, I changed this line, but I continuos with the same problem. When I try to schedule a campaing the curl error is

The requested URL returned error: 404

 

Hey,

 

The 404 would reference to an incorrect URI.  What URI are you doing the POST to?

Ryan Davis
Quality Engineer
Regular Participant

Sorry me mistake, the last error was "The requested URL returned error: 400", the problem was that I copy wrong error when I changed difernts thinks looking for a solution, but I changed the last mistake and I continuos with the same err 400.

 

?xml version="1.0" encoding="UTF-8"?
<entry xmlns="http://www.w3.org/2005/Atom">
    <link href="/ws/customers/jmarroni/campaigns/1109246029192/schedules/1" rel="edit"/>
    <id>http://api.constantcontact.com/ws/customers/jmarroni/campaigns/1109246029192/schedules/1</id>
    <title type="text">jmarroni</title>
    <updated>2012-02-09T20:03:35.000Z</updated>
    <author>
        <name>Constant Contact</name>
    </author>
    <content type="application/vnd.ctct+xml">
        <Schedule xmlns="http://ws.constantcontact.com/ns/1.0/" id="http://api.constantcontact.com/ws/customers/jmarroni/campaigns/1109246029192/schedules/1">
            <ScheduledTime>2012-02-09T20:18:35.000Z</ScheduledTime>
        </Schedule>
    </content>
</entry>

[*Note from a CTCT Community Admin: I removed the beginning and ending brackets from the "?xml version="1.0" encoding="UTF-8"?" line in your post above because that line breaks the "Developer Support" tab in our CTCT "Labs JMML Q&A" Facebook app (apparently, the app is trying to render that line as is, which wouldn't be acceptable in the middle of a page).]

Developer Portal

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

Visit Page