开发者

campaignUpdate via mailchimp API

I have an app that needs to call the mailchimp API via a URL/XML. I am trying to change the folder_id of a campaign that I have just copied using the API call campainReplicate.

I must be reading the api docs wrong, beacuse I can't seem to work out how to call the api correctly

http://us1.api.mailchimp.com/1.3/?output=xml&method=campaignUpdate&cid=a9944f2996&options[folder_id]=38718&apikey=XXXXXXXXXXXXX55d207b37e73af9b-us1

This returns the error message

<MCAPI type="array">
-
<error type="string">
You must specify a name value for the campaignUpdate method
</error>
<code type="integer">开发者_高级运维;-90</code>
</MCAPI>

I know I need the parameter name in there, cant work out how. Any help would be appreciated.


The "name" is the parameter name.. Of a name -> value pair...

The valid parameters are listed under the "capaignCreate" / options method...

See: http://apidocs.mailchimp.com/api/1.3/campaigncreate.func.php

So to move/set the folder you would use the name "folder_id" with the value being the folder's id...

I think what has you stumped is translating the options from the create to the update method... They are passed individually: &name=folder_id&value=38718

http://us1.api.mailchimp.com/1.3/?output=xml&method=campaignUpdate&cid=a9944f2996&apikey=XXXXXXXXXXXXX55d207b37e73af9b-us1&name=folder_id&value=38718

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜