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.

Scheduling campaign - error 400

Highlighted
Occasional 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
Highlighted
Occasional Participant

Re: Scheduling campaign - error 400

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).]

Highlighted
Employee

Re: Scheduling campaign - error 400

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
Highlighted
Occasional Participant

Re: Scheduling campaign - error 400

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

 

Highlighted
Employee

Re: Scheduling campaign - error 400

Hey,

 

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

Ryan Davis
Quality Engineer
Highlighted
Occasional Participant

Re: Scheduling campaign - error 400

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

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