mailchimp 3.0 Get template in html form

家住魔仙堡 提交于 2019-12-05 05:29:57

There is currently no single API call to get the HTML source for a template as there is in API 2.0. Below is the reply I got from MailChimp support on December 9th, 2016:

Thanks for reaching out to us with your question. At this time, API 3.0 does not contain a direct corollary that allows for the "source" of a Template to be retrieved. However, we are continuing to update the 3.0 version of the API in hopes of achieving parity with 2.0, so I will be passing this feedback along internally to our team. In the meantime, the only workaround available for retrieving the HTML in the same format would be to create a Campaign using the Template in question and then retrieve the source using the /campaigns/{campaign_id}/content endpoint.

I solved this by update campaign content with template id and sections.

  1. Get template id link
  2. Get template section link
  3. Update id and sections in template object in campaign content link

You're looking for the default-content sub-object. Check out the documentation page for that endpoint here.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!