It would be nice to render a template trough a API like
[POST] /api/v1/templates/render/{id}
or
[POST] /api/v1/templates/sent/{id}
Both APIs will have the same input. It will retrieve contact data by id, will replace the tags in the email with contact data and will replace the tags with data.
{
"contact": {
"id": "xxxxx"
}
"data": {
"custom_attribute": "yyyyy"
}
}
The render API with only render the HTML and is returned. The sent API will render the Email and will sent it out to the contact.
It would be nice to render a template trough a API like [POST] /api/v1/templates/render/{id} or [POST] /api/v1/templates/sent/{id}
Both APIs will have the same input. It will retrieve contact data by id, will replace the tags in the email with contact data and will replace the tags with data. { "contact": { "id": "xxxxx" } "data": { "custom_attribute": "yyyyy"
} }
The render API with only render the HTML and is returned. The sent API will render the Email and will sent it out to the contact.