Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does Mandrill's Render API ignore merge_vars that map to Handlebars variables?

On Mandrill's Template API page, I plug in the following JSON to test the Render method upon clicking "Try it":

{
    "key": "MY VALID KEY",
    "template_name": "test1",
    "template_content": [

    ],
    "merge_vars": [
        {
            "name": "invoice_number",
            "content": "1001"
        }
    ]
}

The test results come back with my template but the one merge_var I'm testing has not been merged, i.e. the result still contains {{invoice_number}}:

{
    "html": "<p style=\"font-family: sans-serif;\">Dear Customer,</p>\r\n\r\n<p style=\"font-family: sans-serif;\">Invoice {{invoice_number}} ...</p>"
}

Does Mandrill's Render API ignore merge_vars that map to Handlebars variables?

like image 590
flipdoubt Avatar asked Nov 10 '15 22:11

flipdoubt


1 Answers

According to Mandrill support:

As you noticed, the render API call does not currently support Handlebars templates. While I can't provide an exact ETA for when the render API call will work with Handlebars, I can tell you that it's something that our developers are working to extend support for very soon.

I would suggest keeping an eye on our Mandrill API Documentation as that support will be noted there as an additional parameter for the call as soon as it is supported.

like image 80
flipdoubt Avatar answered Nov 05 '22 10:11

flipdoubt