Copy a campaign

Highlighted
Occasional Participant

Copy a campaign

Hi,


I am trying to copy a campaign via the API using the information at http://developer.constantcontact.com/node/418, and I need a little help. Is anybody doing this and does it work??


I am following the example to POST to the campaign collection using a structure as follows:



<entry>
<link href="/ws/customers/joesflowers/campaigns/1100544653344" rel="edit" />
<id>http://api.constantcontact.com/ws/customers/joesflowers/campaigns/1100544653344</id>
<title type="text">Jul 03 2008</title>
<updated>2008-07-08T18:48:45.005Z</updated>
<content type="application/vnd.ctct+xml">
<Campaign xmlns="http://ws.constantcontact.com/ns/1.0/" id="http://api.constantcontact.com/ws/customers/joesflowers/campaigns/1100544653344">
<Name>Jul 03 2008</Name>
<Date>2008-07-08T18:48:45.005Z</Date>
</Campaign>
</content>
</entry>

This results in ATOM errors. So I add an author node, and a leading XML node to get the following (note: I am obviously using my own customer name not joesflowers and a real campaign ID from my account):



<?xml version="1.0" encoding="UTF-8"?>
<entry xmlns="http://www.w3.org/2005/Atom">
<link href="/ws/customers/joesflowers/campaigns/1103061222068" rel="edit" />
<id>http://api.constantcontact.com/ws/customers/joesflowers/campaigns/1100544653344</id>
<title type="text">Campaign XYZ</title>
<updated>2010-02-18T02:40:26Z</updated>
<author><name>JSJ</name></author>
<content type="application/vnd.ctct+xml">
<Campaign xmlns="http://ws.constantcontact.com/ns/1.0/" id="http://api.constantcontact.com/ws/customers/joesflowers/campaigns/1100544653344">
<Name>Campaign XYZ</Name>
<Date>2010-02-18T02:40:26Z</Date>
</Campaign>
</content>
</entry>

ATOM complaints go away but now it complains "The content of element 'Campaign' is not complete.", listing Permission Reminder and a whole host of other nodes and stating at least one of them is required. According to the example, I should not have to provide all these to initially copy the campaign.


Help or ideas appreciated.

5 REPLIES 5
Highlighted
Moderator

Sorry for the confusion here,

Sorry for the confusion here, this was actually documentation that shouldn't have been published at this time.  We are working on a simple way to copy campaigns through the API, however it is not in our production API services yet.  That post has been removed and when we do have our Copy feature available, it will be announced in our Developer newsletter.  

Dave Berard
Senior Product Manager, Constant Contact
Highlighted
Occasional Contributor

Re: Sorry for the confusion here,

IS the copy of campaign api is avaliable if yes can provide me with a sample example or its url

Highlighted
Moderator

Re: Sorry for the confusion here,

We do have an option for copying an email campaign that using custom code.  The process is manual and just involves a couple of steps:

 

1. GET the campaign details you want to copy

2. POST the information back to us with some information updated to reflect the unique constraints (I.E. Campaign Name)

 

If you are looking to copy one of our templated emails, we do not currently support this through the API.  We have no short term plans to offer this feature as we are working on updating many of the features around our templates and it would not make sense to offer this feature until we finish those other development tasks.  Will make sure to update through our documentation, blog and developer newsletter when we do have more news on this front.

Dave Berard
Senior Product Manager, Constant Contact
Highlighted
Occasional Contributor

Re: Sorry for the confusion here,

I want to copy of campaign with same subject line........

Highlighted
Moderator

Re: Sorry for the confusion here,

Sorry about that, I should have proofed my post more carefully.  Subject line is not unique per campaign, the Campaign Name is (used for storage purposes on our side, not visible to recipients).  I updated my post and sorry again for the confusion.

Dave Berard
Senior Product Manager, Constant Contact
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