email_template
Collection: email_templates
The Email Template contains the Twig content used to display the email receipt sent to your customers. Both html and text emails are supported, so you can provide content_html and content_text content. To use the default theme, leave the content_html and content_text properties empty. If you want to set your own template content, configure a content_html_url and/or content_text_url and then POST to the cache link relationship to cache your store's email template.
Required Scopes
store_full_access templates_read templates_write Actions
Properties (9)
description String The description of your email template. Required. 100 characters or less. Defaults to Email Receipt Template.
subject String The template text of your receipt email subject.
content_html String The content of your html email template. Leave blank to use the default responsive template. You can set the content directly or set the content_html_url to point to your template content online and then POST to the cache link relationship.
content_html_url String The URL of your html email template hosted on your own server online and publicly available for our server to cache. 300 characters or less.
content_text String The content of your text email template. Leave blank to use the default template. You can set the content directly or set the content_text_url to point to your template content online and then POST to the cache link relationship.
content_text_url String The URL of your text email template hosted on your own server online and publicly available for our server to cache. 300 characters or less.
template_language String The language that the template should use. If this field is not passed it will default to nunjucks.
handlebarsnunjuckspugtwigejs date_created String (nullable) · Read-only The date this resource was created.
date_modified String (nullable) · Read-only The date this resource was last modified.
Link Relations (4)
self This Template fx:cache POST here to cache your template using the content_html_url and content_text_url Example Representation
{
"_links": {
"curies": [
{
"name": "fx",
"href": "https://api.foxycart.com/rels/{rel}",
"templated": true
}
],
"self": {
"href": "https://api.foxycart.com/email_templates/123",
"title": "This Template"
},
"fx:store": {
"href": "https://api.foxycart.com/stores/456",
"title": "This Store"
},
"fx:template_sets": {
"href": "https://api.foxycart.com/email_templates/123/template_sets",
"title": "Template Sets using this template"
},
"fx:cache": {
"href": "https://api.foxycart.com/email_templates/123/cache",
"title": "POST here to cache your template using the content_html_url and content_text_url"
}
},
"description": "Email Receipt Template",
"subject": "",
"content_html": "",
"content_html_url": "",
"content_text": "",
"content_text_url": "",
"date_created": "2012-08-10T11:58:54-0700",
"date_modified": "2012-08-10T11:58:54-0700"
}