Reply
Occasional Contributor
HipChick
Posts: 17
Registered: ‎11-01-2008

Re: Creating Campaign using JAVA giving : Response status :HTTP/1.1 400 Bad Request

hi,

I got just mail with this post, Can you please go ahead and give permission for the account shipcarsnow1 to schduling and send email campigns. 

Richard_M
Posts: 30
Topics: 0
Kudos: 1
Solutions: 3
Registered: ‎02-15-2011

Re: Creating Campaign using JAVA giving : Response status :HTTP/1.1 400 Bad Request

I just sent you a private forum message. We need to collect some information before enabling scheduling in an account.

 

Thanks,

Richard Maxwell
Support Engineer, Constant Contact
Occasional Contributor
HipChick
Posts: 17
Registered: ‎11-01-2008

Re: Creating Campaign using JAVA giving : Response status :HTTP/1.1 400 Bad Request

Hi Richard,

 

any updates on issuing permission to Schduling and Sending API along with documentation.

Richard_M
Posts: 30
Topics: 0
Kudos: 1
Solutions: 3
Registered: ‎02-15-2011

Re: Creating Campaign using JAVA giving : Response status :HTTP/1.1 400 Bad Request

Hi,

 

Sorry for the inconvenience, but I sent you some questions via e-mail and a private forum message. We need to have those questions answered before we can enable scheduling in your account.

 

You can check your private messages by clicking on the little envelope to the right of the word Help in the upper-right portion of your screen. It is under the yellow bar and above Subscriptions. So, in the upper-right you have your name, then My Settings, then Help, then the envelope.

Richard Maxwell
Support Engineer, Constant Contact
Occasional Contributor
HipChick
Posts: 17
Registered: ‎11-01-2008

Re: Creating Campaign using JAVA giving : Response status :HTTP/1.1 400 Bad Request

Hi Richard,

 

Correct me if my understanding is worng about email campaign, if am emailaddress is OptOut with CTCT, thoguh I add that emailaddress to my list and I use my list to send Email campaign , CTCT won't send mail to the OptedOut contact right ?

 

also let me know how we read the optout status of email address from CTCT's response ?

Richard_M
Posts: 30
Topics: 0
Kudos: 1
Solutions: 3
Registered: ‎02-15-2011

Re: Creating Campaign using JAVA giving : Response status :HTTP/1.1 400 Bad Request

Hi,

 

Whenever a contact opts out, they are added to the Do Not Mail List. Our system won't let you add an opted out contact to another list, unless the OptInSource node is set to ACTION_BY_CONTACT in a PUT request. Further, our system will not let you mail to any contacts on the Do-Not-Mail List.

 

If you are performing a GET on the URL, you will reference the status node to see if they're opted out. Specifically, an opted out contact will have this XML in their entry: <Status>Do Not Mail</Status>.

Richard Maxwell
Support Engineer, Constant Contact
Occasional Contributor
HipChick
Posts: 17
Registered: ‎11-01-2008

Re: Creating Campaign using JAVA giving : Response status :HTTP/1.1 400 Bad Request

Hi,

 

I have used the following format of requestt xml and able to create campaign a couple of days back. but now its giving 400 error again. Please let me know if there is any chnages to do?

 

 

<?xml version="1.0" encoding="UTF-8"?>

<entry xmlns="http://www.w3.org/2005/Atom">

<link href="/ws/customers/shipcarsnow1/campaigns" rel="edit"/>

<id>http://api.constantcontact.com/ws/customers/shipca​rsnow1/campaigns</id>

<title type="text">API Test Email</title>

<updated>2012-05-21T18:34:53.105Z</updated>

<author>

<name>Constant Contact</name>

</author>

<content type="application/vnd.ctct+xml">

<Campaign xmlns="http://ws.constantcontact.com/ns/1.0/"

id="http://api.constantcontact.com/ws/customers/shipca​rsnow1/campaigns/1111122233">

<Name>API Test Email</Name>

<Status>Draft</Status>

<Date>2009-10-19T18:34:53.105Z</Date>

<Subject>ShipCarsNow Test</Subject>

<FromName>ShipCarsNow Test</FromName>

<ViewAsWebpage>NO</ViewAsWebpage>

<ViewAsWebpageLinkText/>

<ViewAsWebpageText/>

<PermissionReminder>YES</PermissionReminder>

<PermissionReminderText>

You're receiving this email because of your relationship with ctct.

Please

&lt;ConfirmOptin>

&lt;a style="color:#0000ff;">confirm&lt;/a>

&lt;/ConfirmOptin>

your continued interest in receiving email from us.

&lt;/PermissionReminderText>

<GreetingSalutation>Dear</GreetingSalutation>

<GreetingName>FirstName</GreetingName>

<GreetingString>Greetings!</GreetingString>

<OrganizationName>ShipCarsnow</OrganizationName>

<OrganizationAddress1>123 wsw st</OrganizationAddress1>

<OrganizationAddress2/>

<OrganizationAddress3/>

<OrganizationCity>OMAHA</OrganizationCity>

<OrganizationState>NE</OrganizationState>

<OrganizationInternationalState/>

<OrganizationCountry>US</OrganizationCountry>

<OrganizationPostalCode>32423</OrganizationPostalC​ode>

<IncludeForwardEmail>NO</IncludeForwardEmail>

<ForwardEmailLinkText/>

<IncludeSubscribeLink>NO</IncludeSubscribeLink>

<SubscribeLinkText/>

<EmailContentFormat>HTML</EmailContentFormat>

<EmailContent>

&lt;html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml"

xmlns:cctd="http://www.constantcontact.com/cctd">

&lt;body>

&lt;CopyRight>Copyright (c) 1996-2009 Constant Contact. All rights

reserved. Except as permitted under a separate written agreement

with Constant Contact, neither the Constant Contact software, nor

any content that appears on any Constant Contact site, including

but not limited to, web pages, newsletters, or templates may be

reproduced, republished, repurposed, or distributed without the

prior written permission of Constant Contact. For inquiries

regarding reproduction or distribution of any Constant Contact

material, please contact slboucher@shipcarsnow.com.

&lt;/CopyRight>

&lt;OpenTracking/>

&lt;!-- Do NOT delete previous line if you want to get statistics on the

number of opened emails -->

&lt;CustomBlock name="letter.intro" title="Personalization">

&lt;Greeting/>

&lt;/CustomBlock>

&lt;/body>

&lt;/html>

</EmailContent>

<EmailTextContent>

&lt;Text>This is the text version.&lt;/Text>

</EmailTextContent>

<StyleSheet/>

<ContactLists>

<ContactList

id="http://api.constantcontact.com/ws/customers/shipca​rsnow1/lists/170">

<link xmlns="http://www.w3.org/2005/Atom" href="/ws/customers/shipcarsnow1/lists/170"

rel="self"/>

</ContactList>

</ContactLists>

<FromEmail>

<Email

id="http://api.constantcontact.com/ws/customers/shipca​rsnow1/settings/emailaddresses/8">

<link xmlns="http://www.w3.org/2005/Atom"

href="/ws/customers/shipcarsnow1/settings/emailadd​resses/8" rel="self"/>

</Email>

<EmailAddress>slboucher@shipcarsnow.com</EmailAddr​ess>

</FromEmail>

<ReplyToEmail>

<Email

id="http://api.constantcontact.com/ws/customers/shipca​rsnow1/settings/emailaddresses/8">

<link xmlns="http://www.w3.org/2005/Atom"

href="/ws/customers/shipcarsnow1/settings/emailadd​resses/8" rel="self"/>

</Email>

<EmailAddress>slboucher@shipcarsnow.com</EmailAddr​ess>

</ReplyToEmail>

</Campaign>

</content>

<source>

<id>http://api.constantcontact.com/ws/customers/shipca​rsnow1/campaigns

</id>

<title type="text">Campaigns for customer: shipcarsnow1</title>

<link href="campaigns"/>

<link href="campaigns" rel="self"/>

<author>

<name>shipcarsnow1</name>

</author>

<updated>2009-10-19T19:36:12.622Z</updated>

</source>

</entry>

 

 

Nick_G
Posts: 162
Kudos: 12
Solutions: 9
Registered: ‎04-20-2011

Re: Creating Campaign using JAVA giving : Response status :HTTP/1.1 400 Bad Request

I'm noticing two problems with this XML. We're seeing the recurring set of characters "​" in the middle of the username throughout the code. This might represent some sort of non-space character, or something else of the sort, or it could just be a pasting error into this system.

 

The other issue I've found is with the permission reminder line. It currently reads as this:

<PermissionReminderText>
You're receiving this email because of your relationship with ctct.
Please &lt;ConfirmOptin>&lt;a style="color:#0000ff;">confirm&lt;/a>&lt;/ConfirmOptin>your continued interest in receiving email from us.
&lt;/PermissionReminderText>

 The &lt;'s are in the right place, until you reach the PermissionReminderText tag, which needs to have the actual "<" symbol. When I corrected this error in the code, the campaign was created successfully in my account.

<PermissionReminderText>
You're receiving this email because of your relationship with ctct. Please &lt;ConfirmOptin>&lt;a style="color:#0000ff;">confirm&lt;/a>&lt;/ConfirmOptin> your continued interest in receiving email from us.
</PermissionReminderText>

 

Nick Galbraith
Support Engineer
Occasional Contributor
HipChick
Posts: 17
Registered: ‎11-01-2008

Re: Creating Campaign using JAVA giving : Response status :HTTP/1.1 400 Bad Request

[ Edited ]

Thank you, I am able to create a campaign. I am facing few issue in scheduling the campaign. here is the request format I used to schedule a campaign

 

Code removed by moderator.

 

Nick_G
Posts: 162
Kudos: 12
Solutions: 9
Registered: ‎04-20-2011

Re: Creating Campaign using JAVA giving : Response status :HTTP/1.1 400 Bad Request

We'd ask that you keep all requests about scheduling XML within emails to webservices@constantcontact.com, as this feature is not availalbe to all API users.

Nick Galbraith
Support Engineer