/api/2.0/campaigns/email/{PK}/
PUT https://developer.salesfusion.com/api/2.0/campaigns/email/{PK}/
Desacription:
Updates a specific campaign. If the specified campaign ID does not exist, the message Not Found
will be returned
PK → Campaign_ID
Sample Response:
{
"name": "This is a new campaign name!",
"subject": "test",
"status": "Draft (Not Sent)",
"default_status": 9,
"post_date": "2014-07-25T17:45:00Z",
"created_by": "https://developer.salesfusion.com/api/2.0/users/3/",
"created_date": "2014-07-25T17:45:50.440000Z",
"updated_by": "https://developer.salesfusion.com/api/2.0/users/2/",
"updated_date": "2015-01-23T14:47:09.113000Z",
"from_email": "michael.north@sandbox.salesforce.com",
"display_name": "Michael North",
"plain_text": "",
"html": "<meta content=\"text/html; charset=utf-8\" http-equiv=\"Content-Type\" />\n<table style=\"border: 1px solid #000000; color: #ffffff; background-color: #ffffff;\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"600\" align=\"center\">\n <tbody>\n <tr>\n <td style=\"height: 42px;\" colspan=\"2\">\n <table style=\"background-color: #ff6600;\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"600\" align=\"center\">\n <tbody>\n <tr>\n <td style=\"padding: 10px; width: 323px;\" align=\"left\"><span style=\"padding: 10px; margin-top: 0px; margin-bottom: 0px; color: #ffffff; font-size: 17px; text-decoration: none;\"><strong><br />\n {{#Contacts.firstname|equal \"Michael\"}}<br />\n Render meh<br />\n {{/Contacts.firstname|equal \"Michael\"}}<br />\n <br />\n <br />\n <br />\n </strong></span></td>\n <td style=\"width: 277px;\" align=\"right\">\n <p style=\"padding: 15px; margin-top: 0px; margin-bottom: 0px; color: #231f20; font-size: 12px;\"><a style=\"color: #ffffff; text-decoration: none;\" href=\"http://++Company_URL++\" target=\"main\">++Company_URL++ </a></p>\n </td>\n </tr>\n </tbody>\n </table>\n </td>\n </tr>\n <tr>\n </tr>\n <tr>\n <td style=\"width: 180px; height: 43px; background-color: #c4c1c6;\"> </td>\n <td style=\"width: 420px; background-color: #c4c1c6;\" align=\"right\"><a style=\"text-align: right; padding: 10px;\" href=\"http://google.com?a=ó\">Link 1</a> | <span style=\"text-align: right; padding: 10px;\">Link 1</span> | <span style=\"text-align: right; padding: 10px;\">Link 1</span> | <span style=\"text-align: right; padding: 10px;\">Link 1</span></td>\n </tr>\n <tr>\n </tr>\n <tr>\n <td style=\"padding: 20px; height: 28px; color: #ffffff; background-color: #000000;\" colspan=\"2\"><span style=\"color: #ffff00;\">## If/else. Prints \"Hi Diplo\" if contact firstname is \"Diplo\" and \"Hi Not-Diplo\" otherwise </span><br />\n {{#firstname|equal \"diplo\"}}Hi Diplo{{/firstname|equal \"diplo\"}}{{^firstname|equal \"diplo\"}}Hi Not-Diplo{{/firstname|equal \"diplo\"}}<br />\n </td>\n </tr>\n <tr>\n <td style=\"padding: 20px; height: 14px; background-color: #000000;\" colspan=\"2\" align=\"middle\">\n <table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"510\">\n <tbody>\n <tr>\n <td style=\"width: 152px;\"><br />\n </td>\n <td style=\"padding: 10px; width: 358px;\" valign=\"top\" align=\"left\">\n <p style=\"margin-top: 0px; margin-bottom: 10px; color: #ff7d09; font-size: 32px; font-weight: bold;\">FREE!</p>\n <p style=\"margin-top: 0px; margin-bottom: 0px; color: #ffffff; text-align: justify;\"> </p>\n <p>Your first name is ++FirstName++ and you are from the city of ++City++ </p>\n <p><span style=\"color: #ffff00;\">## Nested If: only get all content if company is \"salesfusion\" AND Industry is \"retail\"</span><br />\n {{#company|equal \"salesfusion\"}}\n Hello {{FirstName}}, How is Salesfusion today?\n </p>\n <p><img alt=\"\" src=\"/uploads/95612/S%C3%A3o_Paulo_city_(Bela_Vista).jpg\" /> </p>\n <p>{{#industry|equal \"Retail\"}}\n Hello {{FirstName}}, congratulations on working in retail.</p>\n <p><img alt=\"\" src=\"/uploads/95612/christtheredeemer.jpg\" /> </p>\n <p>{{/industry| equal \"Retail\"}}</p>\n <p style=\"color: #ffffff; background-color: #000000;\">{{/company|equal \"salesfusion\"}}</p>\n <p>\n </p>\n <div> </div>\n <p> </p>\n </td>\n </tr>\n </tbody>\n </table>\n </td>\n </tr>\n <tr>\n <td style=\"padding: 10px; height: 14px;\" align=\"left\"><a href=\"http://++Company_URL++\"><img alt=\"\" style=\"border: 0px solid;\" src=\"http://images.msgapp.com/images/sfTemplates/small_logo_header.jpg\" width=\"160\" height=\"100\" /> </a></td>\n <td style=\"padding: 10px; height: 14px;\" valign=\"center\" align=\"left\">\n <p style=\"margin-top: 0px; margin-bottom: 0px;\">++Address Line 1++ ++Address Line 2++ <span style=\"font-family: wingdings;\">w</span> ++City,++ ++State/Prov ++ ++Postal code++ <span style=\"font-family: wingdings;\">w</span> Phone: ++Phone:++ <span style=\"font-family: wingdings;\">w</span> Fax: ++Fax:++ Email: <a style=\"color: #000000; text-decoration: none;\" href=\"mailto:++Company_Email++\">++Company_Email++</a> </p>\n </td>\n </tr>\n <tr>\n </tr>\n <tr>\n </tr>\n <tr>\n </tr>\n <tr>\n </tr>\n <tr>\n <td style=\"border-top-color: #b0ccdc; border-top-width: 1px; border-top-style: solid;\" colspan=\"2\"></td>\n </tr>\n </tbody>\n</table>",
"reply_to": "michael.north@sandbox.salesforce.com",
"folder_id": 16,
"lists": "https://developer.salesfusion.com/api/2.0/campaigns/email/12/lists/",
"recallable": false,
"clicks": "https://developer.salesfusion.com/api/2.0/campaigns/email/12/clicks/",
"opens": "https://developer.salesfusion.com/api/2.0/campaigns/email/12/opens/",
"unsubscribes": "https://developer.salesfusion.com/api/2.0/campaigns/email/12/unsubscribes/",
"bounces": "https://developer.salesfusion.com/api/2.0/campaigns/email/12/bounces/",
"delivered": "https://developer.salesfusion.com/api/2.0/campaigns/email/12/delivered/",
"ab_test": false,
"advanced_ab": false,
"campaign_editor_body": "",
"campaign_editor_body_b": "",
"view_data": "{}"
}
Request Body
{"name"=>"This is a new campaign name!"}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Content-Type | string |