Scheduling and Sending a Campaign

Highlighted
Occasional Contributor

Re: Scheduling and Sending a Campaign

<?xml version='1.0' encoding='UTF-8'?> <entry xmlns="http://www.w3.org/2005/Atom">
<link href="/ws/customers/username/campaigns/1111489467563/schedules/2" rel="edit" />
<id>http://api.constantcontact.com/ws/customers/username/campaigns/1111489467563/schedules/2</id>
<title type="text">GC Product Webinar - Jan 7, 2002</title>
<updated>2010-11-13T20:03:35.000Z</updated>
<author>
<name>username</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/1111489467563/schedules/2">
<ScheduledTime>2012-11-23T14:12:00.000Z</ScheduledTime>
</Schedule>
</content>
</entry>

 

 

I am posting to URI below

https://api.constantcontact.com/ws/customers/username/campaigns/1111489467563/schedules

 

 

Geting "Error 415: Media type not supported"

 

 

 

Highlighted
CTCT Employee

Re: Scheduling and Sending a Campaign

Hi,

 

There could be a couple of things going wrong, depending on the status of the campaign.  If the campaign is already in scheduled status, you can't POST to the campaign /schedules URI again, you would need to PUT to /schedules/schedule-id.  You can only POST to the /schedules URI if the campaign is in Draft or Sent status (not scheduled) and was first sent within 90 days of today if it is in sent status.

 

The 415 error is usually caused by the Content Type header.  For your request, make sure you're using a Content-Type of application/atom+xml.

 

Best Regards,

Shannon W.

API Support Specialist

Highlighted
Member

Re: Scheduling and Sending a Campaign

HI Good day,

 

I have a problem to create the schedule with existing campaign.campaign status is Draft.

 

i need to schedule the campaign using the RestFul API.

 

am using the POST method.

endpoint is https://api.constantcontact.com/ws/customers/username/campaigns/1112948131937/schedules

 

and the content-Type : application/atom+xml 

but am gettign the resonce is Status = Forbidden, StatusCode = 403

 

 

when am using the Content-Type : application/x-www-form-urlencoded

am getting the Responce is Status=Unauthorized, StatusCode=401

 

Regards,

FerozKhan

 

 

Highlighted
CTCT Employee

Re: Scheduling and Sending a Campaign

HI FerozKhan,

 

I believe we solved this via email correspondence, but feel free to respond to this thread or my email if you have any questions.  The issue was that you had referenced "joesflowers", our dummy username, in one place in your XML request, and you had an issue with the ScheduledTime XML node.  It must be in the format below, with the month and day each having two digits:

 

<ScheduledTime>2013-04-03T20:03:35.000Z</ScheduledTime>

 

Best Regards,

Shannon W.

API Support Specialist

Developer Portal

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

Visit Page

Constant Contact Would Like To Hear From You!

We want to hear from customers like you about your favorite features and how they have helped your business or organization. Tell us by answering a few questions in...

Read More
Featured