Skip to main content

Template Variables API

This API provides dynamic template processing and variable management, seamless Handlebars template compilation, custom variable operations, and context-aware content generation across email, document templates and snippets.

Quick Startโ€‹

# List available operations
epilot template-variables

# Call an operation
epilot template-variables getCategories

Common Flagsโ€‹

FlagDescription
-p key=valueSet a named parameter
-d '{...}'Request body JSON
-H 'Key: Value'Custom header
-t, --token <token>Bearer token for authentication
--profile <name>Use a named profile
-s, --server <url>Override server base URL
-i, --includeInclude response headers in output
--jsonOutput raw JSON (no formatting)
-v, --verboseVerbose output (show request details)
--jsonata <expr>JSONata expression to transform response
--definition <file>Override OpenAPI spec file/URL
--guidedPrompt for all parameters interactively
--no-interactiveDisable interactive prompts

Operationsโ€‹

Templates

Custom Variables

getCategoriesโ€‹

Get all template variable categories

GET /v1/template-variables/categories

Parameters

NameInTypeRequiredDescription
langquerystringNo

Sample Call

epilot template-variables getCategories

With JSONata filter:

epilot template-variables getCategories --jsonata '$'
Sample Response
[
{
"category": "contact",
"description": "Contact"
}
]

searchVariablesโ€‹

Search variables

POST /v1/template-variables:search

Request Body

Sample Call

epilot template-variables searchVariables \
-d '{"template_type":"email","query":"logo","from":0,"size":25,"lang":"de","entity_schemas":["contact"]}'

Using stdin pipe:

cat body.json | epilot template-variables searchVariables

With JSONata filter:

epilot template-variables searchVariables --jsonata '$'
Sample Response
[
{
"type": "simple",
"qrdata": "string",
"group": "string",
"insert": "string",
"description": "string"
}
]

getVariableContextโ€‹

Get full variable context

POST /v1/template-variables:context

Request Body

Sample Call

epilot template-variables getVariableContext

With request body:

epilot template-variables getVariableContext \
-d '{
"parameters": {
"template_type": "email",
"language": "de",
"main_entity_id": "63753437-c9e2-4e83-82bb-b1c666514561",
"brand_id": 123451,
"user_id": "50001",
"user_org_id": "729224",
"custom_variables": [
{
"variable": "{{craftsmen.invitation_link}}",
"value": "https://partner.epilot.cloud/activate-account?user_name=htny.pct%2Btet%40gmail.com&confirmation_code=EdXPRW19"
}
],
"context_data": {},
"template_name": "string",
"template_tags": ["string"],
"variables_version": "2"
}
}'

Using stdin pipe:

cat body.json | epilot template-variables getVariableContext

With JSONata filter:

epilot template-variables getVariableContext --jsonata 'unsubscribe_url'
Sample Response
{
"unsubscribe_url": "https://consent.sls.epilot.io/v1/unsubscribe?token=abc123",
"main": {
"_id": "03be777b-3cf8-4bff-bb0c-253fd1128479",
"_title": "Example Customer",
"customer_number": 123,
"first_name": "Example",
"last_name": "Customer",
"title": "Prof.",
"salutation": "Ms. / Mrs.",
"birthdate": "2018-03-03",
"email": [
{},
{}
],
"phone": [
{},
{}
],
"address": [
{},
{}
],
"account": [
{}
]
},
"contact": {
"_id": "03be777b-3cf8-4bff-bb0c-253fd1128479",
"_title": "Example Customer",
"customer_number": 123,
"first_name": "Example",
"last_name": "Customer",
"title": "Prof.",
"salutation": "Ms. / Mrs.",
"birthdate": "2018-03-03",
"email": [
{},
{}
],
"phone": [
{},
{}
],
"address": [
{},
{}
],
"account": [
{}
]
},
"brand": {
"id": 123453,
"name": "Brand name",
"signature": "Signature"
}
}

replaceTemplatesโ€‹

Replace variables in handlebars templates

POST /v1/template-variables:replace

Request Body

Sample Call

epilot template-variables replaceTemplates

With request body:

epilot template-variables replaceTemplates \
-d '{
"inputs": ["Hello, {{contact.first_name}}!\n\n{{{brand.signature}}}\n"],
"parameters": {
"template_type": "email",
"language": "de",
"main_entity_id": "63753437-c9e2-4e83-82bb-b1c666514561",
"brand_id": 123451,
"user_id": "50001",
"user_org_id": "729224",
"custom_variables": [
{
"variable": "{{craftsmen.invitation_link}}",
"value": "https://partner.epilot.cloud/activate-account?user_name=htny.pct%2Btet%40gmail.com&confirmation_code=EdXPRW19"
}
],
"context_data": {},
"template_name": "string",
"template_tags": ["string"],
"variables_version": "2"
}
}'

Using stdin pipe:

cat body.json | epilot template-variables replaceTemplates

With JSONata filter:

epilot template-variables replaceTemplates --jsonata 'outputs'
Sample Response
{
"outputs": ["[Brand Name GmbH] Order confirmation\nHello Customer Name\n\n<span color=\"#ccc\">Brand Name GmbH</span>\n<img src=\"https://logobucket.s3.amazonaws.com/brandlogo.png\" alt=\"Brand Name\"/>\n<a href=\"https://company.com/imprint\">imprint</a>\n"]
}

replaceTemplatesV2โ€‹

Replace variables in handlebars templates with raw value preservation

POST /v2/template:replace

Request Body

Sample Call

epilot template-variables replaceTemplatesV2

With request body:

epilot template-variables replaceTemplatesV2 \
-d '{
"inputs": ["Hello, {{contact.first_name}}!\n"],
"parameters": {
"template_type": "email",
"language": "de",
"main_entity_id": "63753437-c9e2-4e83-82bb-b1c666514561",
"brand_id": 123451,
"user_id": "50001",
"user_org_id": "729224",
"custom_variables": [
{
"variable": "{{craftsmen.invitation_link}}",
"value": "https://partner.epilot.cloud/activate-account?user_name=htny.pct%2Btet%40gmail.com&confirmation_code=EdXPRW19"
}
],
"context_data": {},
"template_name": "string",
"template_tags": ["string"],
"variables_version": "2"
}
}'

Using stdin pipe:

cat body.json | epilot template-variables replaceTemplatesV2

With JSONata filter:

epilot template-variables replaceTemplatesV2 --jsonata 'outputs'
Sample Response
{
"outputs": {
"Hello {{first_name}}": "Hello John",
"{{first_name}}": "John",
"{{product_images[*].public_url}}": ["http://myimage.server.com/img1.png", "http://myimage.server.com/img2.png"]
}
}

getCustomVariablesโ€‹

Get all custom variables of organization

GET /v1/custom-variables

Sample Call

epilot template-variables getCustomVariables

With JSONata filter:

epilot template-variables getCustomVariables --jsonata '$'
Sample Response
[
{
"id": "rbse777b-3cf8-4bff-bb0c-253fd1123250",
"type": "order_table",
"name": "My Custom table",
"key": "my_custom_table",
"_tags": ["string"],
"helper_params": ["param1", "param2"],
"helper_logic": "return param1 * param2;",
"config": {
"header": null,
"style": {},
"columns": [],
"body": {},
"footer": {}
},
"template": "<table style=\"table-layout: fixed;width: 100%;max-width: 1000px;border-collapse: collapse;\">\n <thead>\n <tr style=\"height: 48px;border-bottom: 1px solid #D5E1ED;\">\n {{#each table_config.header.columns as |column|}}\n {{#if column.enable}}\n <th style=\"{{makeStyle @root.table_config.header.style}};{{makeStyle column.style}};\">{{column._label}}</th>\n {{/if}}\n {{/each}}\n </tr>\n </thead>\n <tbody style=\"vertical-align: baseline !important;font-weight: 400;font-size: 12px;position: relative;\">\n <!-- Start rendering products -->\n {{#each order.products as |product|}}\n {{#if @last}}\n <tr style=\"height: 48px;;font-size:14px;border-bottom: 1px solid #D5E1ED;\">\n {{else}}\n <tr style=\"height: 48px;;font-size:14px;\">\n {{/if}}\n {{#each @root.table_config.header.columns as |column|}}\n {{#if column.enable}}\n {{#if (eq column.id 'item')}}\n <!-- Item -->\n <td style=\"{{makeStyle @root.table_config.body.product_name.style}}\">\n {{#if @root.table_config.body.product_name.enable}}\n {{product.name}}\n {{/if}}\n {{#if @root.table_config.body.price_description.enable}}\n <br>\n <span style=\"{{makeStyle @root.table_config.body.price_description.style}}\">{{product.price.description}}</span>\n {{/if}}\n {{#if @root.table_config.body.product_description.enable}}\n <br>\n <span style=\"{{makeStyle @root.table_config.body.product_description.style}}\">{{product.description}}</span>\n {{/if}}\n </td>\n {{/if}}\n {{#if (eq column.id 'quantity')}}\n <!-- Quantity -->\n <td style=\"{{makeStyle @root.table_config.body.quantity.style}}\">{{product.price.quantity}}\n </td>\n {{/if}}\n {{#if (eq column.id 'tax')}}\n <!-- Tax -->\n <td style=\"{{makeStyle @root.table_config.body.tax.style}}\">\n {{product.price.tax_rate}}\n </td>\n {{/if}}\n {{#if (eq column.id 'unit_amount')}}\n <!-- Unit amount -->\n <td style=\"{{makeStyle @root.table_config.body.unit_amount.style}}\">\n {{product.price.unit_amount_net}}\n </td>\n {{/if}}\n {{#if (eq column.id 'net_total')}}\n <!-- Amount Subtotal -->\n <td style=\"{{makeStyle @root.table_config.body.net_total.style}}\">\n {{product.price.amount_subtotal}}\n </td>\n {{/if}}\n {{#if (eq column.id 'amount_tax')}}\n <!-- Tax amount-->\n <td style=\"{{makeStyle @root.table_config.body.amount_tax.style}}\">\n {{product.price.amount_tax}}\n </td>\n {{/if}}\n {{#if (eq column.id 'gross_total')}}\n <!-- Gross total -->\n <td style=\"{{makeStyle @root.table_config.body.gross_total.style}}\">\n {{product.price.amount_total}}\n {{#if @root.table_config.body.payment_type.enable}}\n {{#if (eq product.price.type 'recurring')}}\n <br>\n <span style=\"{{makeStyle @root.table_config.body.payment_type.style}}\">{{product.price.billing_period}}</span>\n {{/if}}\n {{/if}}\n </td>\n {{/if}}\n {{/if}}\n {{/each}}\n </tr>\n {{/each}}\n <!-- Finish rendering products -->\n {{#if table_config.footer.gross_total.enable}}\n {{#each order.total_details.recurrences as |item|}}\n <tr style=\"height: 48px;font-size: 14px;\">\n <td style=\"padding-top: 16px; padding-bottom: 8px; border: none !important; vertical-align: top;\" colspan=\"{{calculate_colspan @root.table_config}}\"></td>\n {{#if @root.table_config.footer.payment_type.enable}}\n <td style=\"{{makeStyle @root.table_config.footer.payment_type.style}}\" colspan=\"2\">{{item.billing_period}}</td>\n {{/if}}\n {{#if (isColumnEnabled @root.table_config 'net_total')}}\n {{#if @root.table_config.footer.net_total.enable}}\n <td style=\"{{makeStyle @root.table_config.footer.net_total.style}}\">{{item.amount_subtotal}}</td>\n {{/if}}\n {{/if}}\n <td style=\"{{makeStyle @root.table_config.footer.gross_total.style}}\">{{item.amount_total}}\n {{#if @root.table_config.footer.amount_tax.enable}}\n <br>\n <span style=\"{{makeStyle @root.table_config.footer.amount_tax.style}}\">{{item.full_amount_tax}}</span>\n {{/if}}\n </td>\n </tr>\n {{/each}}\n {{/if}}\n <tr style=\"height:16px !important;\"></tr>\n </tbody>\n</table>\n",
"created_at": "2022-04-19T12:41:43.662Z",
"created_by": "100042",
"updated_at": "2022-04-20T12:41:43.662Z",
"updated_by": "100042"
}
]

createCustomVariableโ€‹

Create custom variable

POST /v1/custom-variables

Request Body

Sample Call

epilot template-variables createCustomVariable

With request body:

epilot template-variables createCustomVariable \
-d '{
"id": "rbse777b-3cf8-4bff-bb0c-253fd1123250",
"type": "order_table",
"name": "My Custom table",
"key": "my_custom_table",
"_tags": ["string"],
"helper_params": ["param1", "param2"],
"helper_logic": "return param1 * param2;",
"config": {
"header": null,
"style": {
"color": "#222",
"background": "#fff",
"font-size": "16px",
"font-family": "",
"padding-bottom": "4px",
"font-weight": "bold",
"border": "none !important",
"text-align": "left"
},
"columns": [
{},
{}
],
"body": {
"product_name": {},
"price_description": {},
"product_description": {},
"quantity": {},
"tax": {},
"unit_amount": {},
"net_total": {},
"gross_total": {}
},
"footer": {
"payment_type": {},
"net_total": {},
"amount_tax": {},
"gross_total": {}
}
},
"template": "<table style=\"table-layout: fixed;width: 100%;max-width: 1000px;border-collapse: collapse;\">\n <thead>\n <tr style=\"height: 48px;border-bottom: 1px solid #D5E1ED;\">\n {{#each table_config.header.columns as |column|}}\n {{#if column.enable}}\n <th style=\"{{makeStyle @root.table_config.header.style}};{{makeStyle column.style}};\">{{column._label}}</th>\n {{/if}}\n {{/each}}\n </tr>\n </thead>\n <tbody style=\"vertical-align: baseline !important;font-weight: 400;font-size: 12px;position: relative;\">\n <!-- Start rendering products -->\n {{#each order.products as |product|}}\n {{#if @last}}\n <tr style=\"height: 48px;;font-size:14px;border-bottom: 1px solid #D5E1ED;\">\n {{else}}\n <tr style=\"height: 48px;;font-size:14px;\">\n {{/if}}\n {{#each @root.table_config.header.columns as |column|}}\n {{#if column.enable}}\n {{#if (eq column.id 'item')}}\n <!-- Item -->\n <td style=\"{{makeStyle @root.table_config.body.product_name.style}}\">\n {{#if @root.table_config.body.product_name.enable}}\n {{product.name}}\n {{/if}}\n {{#if @root.table_config.body.price_description.enable}}\n <br>\n <span style=\"{{makeStyle @root.table_config.body.price_description.style}}\">{{product.price.description}}</span>\n {{/if}}\n {{#if @root.table_config.body.product_description.enable}}\n <br>\n <span style=\"{{makeStyle @root.table_config.body.product_description.style}}\">{{product.description}}</span>\n {{/if}}\n </td>\n {{/if}}\n {{#if (eq column.id 'quantity')}}\n <!-- Quantity -->\n <td style=\"{{makeStyle @root.table_config.body.quantity.style}}\">{{product.price.quantity}}\n </td>\n {{/if}}\n {{#if (eq column.id 'tax')}}\n <!-- Tax -->\n <td style=\"{{makeStyle @root.table_config.body.tax.style}}\">\n {{product.price.tax_rate}}\n </td>\n {{/if}}\n {{#if (eq column.id 'unit_amount')}}\n <!-- Unit amount -->\n <td style=\"{{makeStyle @root.table_config.body.unit_amount.style}}\">\n {{product.price.unit_amount_net}}\n </td>\n {{/if}}\n {{#if (eq column.id 'net_total')}}\n <!-- Amount Subtotal -->\n <td style=\"{{makeStyle @root.table_config.body.net_total.style}}\">\n {{product.price.amount_subtotal}}\n </td>\n {{/if}}\n {{#if (eq column.id 'amount_tax')}}\n <!-- Tax amount-->\n <td style=\"{{makeStyle @root.table_config.body.amount_tax.style}}\">\n {{product.price.amount_tax}}\n </td>\n {{/if}}\n {{#if (eq column.id 'gross_total')}}\n <!-- Gross total -->\n <td style=\"{{makeStyle @root.table_config.body.gross_total.style}}\">\n {{product.price.amount_total}}\n {{#if @root.table_config.body.payment_type.enable}}\n {{#if (eq product.price.type 'recurring')}}\n <br>\n <span style=\"{{makeStyle @root.table_config.body.payment_type.style}}\">{{product.price.billing_period}}</span>\n {{/if}}\n {{/if}}\n </td>\n {{/if}}\n {{/if}}\n {{/each}}\n </tr>\n {{/each}}\n <!-- Finish rendering products -->\n {{#if table_config.footer.gross_total.enable}}\n {{#each order.total_details.recurrences as |item|}}\n <tr style=\"height: 48px;font-size: 14px;\">\n <td style=\"padding-top: 16px; padding-bottom: 8px; border: none !important; vertical-align: top;\" colspan=\"{{calculate_colspan @root.table_config}}\"></td>\n {{#if @root.table_config.footer.payment_type.enable}}\n <td style=\"{{makeStyle @root.table_config.footer.payment_type.style}}\" colspan=\"2\">{{item.billing_period}}</td>\n {{/if}}\n {{#if (isColumnEnabled @root.table_config 'net_total')}}\n {{#if @root.table_config.footer.net_total.enable}}\n <td style=\"{{makeStyle @root.table_config.footer.net_total.style}}\">{{item.amount_subtotal}}</td>\n {{/if}}\n {{/if}}\n <td style=\"{{makeStyle @root.table_config.footer.gross_total.style}}\">{{item.amount_total}}\n {{#if @root.table_config.footer.amount_tax.enable}}\n <br>\n <span style=\"{{makeStyle @root.table_config.footer.amount_tax.style}}\">{{item.full_amount_tax}}</span>\n {{/if}}\n </td>\n </tr>\n {{/each}}\n {{/if}}\n <tr style=\"height:16px !important;\"></tr>\n </tbody>\n</table>\n",
"created_at": "2022-04-19T12:41:43.662Z",
"created_by": "100042",
"updated_at": "2022-04-20T12:41:43.662Z",
"updated_by": "100042"
}'

Using stdin pipe:

cat body.json | epilot template-variables createCustomVariable

With JSONata filter:

epilot template-variables createCustomVariable --jsonata 'id'
Sample Response
{
"id": "rbse777b-3cf8-4bff-bb0c-253fd1123250",
"type": "order_table",
"name": "My Custom table",
"key": "my_custom_table",
"_tags": ["string"],
"helper_params": ["param1", "param2"],
"helper_logic": "return param1 * param2;",
"config": {
"header": null,
"style": {
"color": "#222",
"background": "#fff",
"font-size": "16px",
"font-family": "",
"padding-bottom": "4px",
"font-weight": "bold",
"border": "none !important",
"text-align": "left"
},
"columns": [
{},
{}
],
"body": {
"product_name": {},
"price_description": {},
"product_description": {},
"quantity": {},
"tax": {},
"unit_amount": {},
"net_total": {},
"gross_total": {}
},
"footer": {
"payment_type": {},
"net_total": {},
"amount_tax": {},
"gross_total": {}
}
},
"template": "<table style=\"table-layout: fixed;width: 100%;max-width: 1000px;border-collapse: collapse;\">\n <thead>\n <tr style=\"height: 48px;border-bottom: 1px solid #D5E1ED;\">\n {{#each table_config.header.columns as |column|}}\n {{#if column.enable}}\n <th style=\"{{makeStyle @root.table_config.header.style}};{{makeStyle column.style}};\">{{column._label}}</th>\n {{/if}}\n {{/each}}\n </tr>\n </thead>\n <tbody style=\"vertical-align: baseline !important;font-weight: 400;font-size: 12px;position: relative;\">\n <!-- Start rendering products -->\n {{#each order.products as |product|}}\n {{#if @last}}\n <tr style=\"height: 48px;;font-size:14px;border-bottom: 1px solid #D5E1ED;\">\n {{else}}\n <tr style=\"height: 48px;;font-size:14px;\">\n {{/if}}\n {{#each @root.table_config.header.columns as |column|}}\n {{#if column.enable}}\n {{#if (eq column.id 'item')}}\n <!-- Item -->\n <td style=\"{{makeStyle @root.table_config.body.product_name.style}}\">\n {{#if @root.table_config.body.product_name.enable}}\n {{product.name}}\n {{/if}}\n {{#if @root.table_config.body.price_description.enable}}\n <br>\n <span style=\"{{makeStyle @root.table_config.body.price_description.style}}\">{{product.price.description}}</span>\n {{/if}}\n {{#if @root.table_config.body.product_description.enable}}\n <br>\n <span style=\"{{makeStyle @root.table_config.body.product_description.style}}\">{{product.description}}</span>\n {{/if}}\n </td>\n {{/if}}\n {{#if (eq column.id 'quantity')}}\n <!-- Quantity -->\n <td style=\"{{makeStyle @root.table_config.body.quantity.style}}\">{{product.price.quantity}}\n </td>\n {{/if}}\n {{#if (eq column.id 'tax')}}\n <!-- Tax -->\n <td style=\"{{makeStyle @root.table_config.body.tax.style}}\">\n {{product.price.tax_rate}}\n </td>\n {{/if}}\n {{#if (eq column.id 'unit_amount')}}\n <!-- Unit amount -->\n <td style=\"{{makeStyle @root.table_config.body.unit_amount.style}}\">\n {{product.price.unit_amount_net}}\n </td>\n {{/if}}\n {{#if (eq column.id 'net_total')}}\n <!-- Amount Subtotal -->\n <td style=\"{{makeStyle @root.table_config.body.net_total.style}}\">\n {{product.price.amount_subtotal}}\n </td>\n {{/if}}\n {{#if (eq column.id 'amount_tax')}}\n <!-- Tax amount-->\n <td style=\"{{makeStyle @root.table_config.body.amount_tax.style}}\">\n {{product.price.amount_tax}}\n </td>\n {{/if}}\n {{#if (eq column.id 'gross_total')}}\n <!-- Gross total -->\n <td style=\"{{makeStyle @root.table_config.body.gross_total.style}}\">\n {{product.price.amount_total}}\n {{#if @root.table_config.body.payment_type.enable}}\n {{#if (eq product.price.type 'recurring')}}\n <br>\n <span style=\"{{makeStyle @root.table_config.body.payment_type.style}}\">{{product.price.billing_period}}</span>\n {{/if}}\n {{/if}}\n </td>\n {{/if}}\n {{/if}}\n {{/each}}\n </tr>\n {{/each}}\n <!-- Finish rendering products -->\n {{#if table_config.footer.gross_total.enable}}\n {{#each order.total_details.recurrences as |item|}}\n <tr style=\"height: 48px;font-size: 14px;\">\n <td style=\"padding-top: 16px; padding-bottom: 8px; border: none !important; vertical-align: top;\" colspan=\"{{calculate_colspan @root.table_config}}\"></td>\n {{#if @root.table_config.footer.payment_type.enable}}\n <td style=\"{{makeStyle @root.table_config.footer.payment_type.style}}\" colspan=\"2\">{{item.billing_period}}</td>\n {{/if}}\n {{#if (isColumnEnabled @root.table_config 'net_total')}}\n {{#if @root.table_config.footer.net_total.enable}}\n <td style=\"{{makeStyle @root.table_config.footer.net_total.style}}\">{{item.amount_subtotal}}</td>\n {{/if}}\n {{/if}}\n <td style=\"{{makeStyle @root.table_config.footer.gross_total.style}}\">{{item.amount_total}}\n {{#if @root.table_config.footer.amount_tax.enable}}\n <br>\n <span style=\"{{makeStyle @root.table_config.footer.amount_tax.style}}\">{{item.full_amount_tax}}</span>\n {{/if}}\n </td>\n </tr>\n {{/each}}\n {{/if}}\n <tr style=\"height:16px !important;\"></tr>\n </tbody>\n</table>\n",
"created_at": "2022-04-19T12:41:43.662Z",
"created_by": "100042",
"updated_at": "2022-04-20T12:41:43.662Z",
"updated_by": "100042"
}

searchCustomVariablesโ€‹

Search custom variables

POST /v1/custom-variables:search

Request Body

Sample Call

epilot template-variables searchCustomVariables

With request body:

epilot template-variables searchCustomVariables \
-d '{
"type": "order_table",
"tags": ["string"],
"query": "logo",
"from": 0,
"size": 25,
"sort_by": "created_at, name, key",
"fields": ["string"]
}'

Using stdin pipe:

cat body.json | epilot template-variables searchCustomVariables

With JSONata filter:

epilot template-variables searchCustomVariables --jsonata 'results[0]'
Sample Response
{
"results": [
{
"id": "rbse777b-3cf8-4bff-bb0c-253fd1123250",
"type": "order_table",
"name": "My Custom table",
"key": "my_custom_table",
"_tags": ["string"],
"helper_params": ["param1", "param2"],
"helper_logic": "return param1 * param2;",
"config": {},
"template": "<table style=\"table-layout: fixed;width: 100%;max-width: 1000px;border-collapse: collapse;\">\n <thead>\n <tr style=\"height: 48px;border-bottom: 1px solid #D5E1ED;\">\n {{#each table_config.header.columns as |column|}}\n {{#if column.enable}}\n <th style=\"{{makeStyle @root.table_config.header.style}};{{makeStyle column.style}};\">{{column._label}}</th>\n {{/if}}\n {{/each}}\n </tr>\n </thead>\n <tbody style=\"vertical-align: baseline !important;font-weight: 400;font-size: 12px;position: relative;\">\n <!-- Start rendering products -->\n {{#each order.products as |product|}}\n {{#if @last}}\n <tr style=\"height: 48px;;font-size:14px;border-bottom: 1px solid #D5E1ED;\">\n {{else}}\n <tr style=\"height: 48px;;font-size:14px;\">\n {{/if}}\n {{#each @root.table_config.header.columns as |column|}}\n {{#if column.enable}}\n {{#if (eq column.id 'item')}}\n <!-- Item -->\n <td style=\"{{makeStyle @root.table_config.body.product_name.style}}\">\n {{#if @root.table_config.body.product_name.enable}}\n {{product.name}}\n {{/if}}\n {{#if @root.table_config.body.price_description.enable}}\n <br>\n <span style=\"{{makeStyle @root.table_config.body.price_description.style}}\">{{product.price.description}}</span>\n {{/if}}\n {{#if @root.table_config.body.product_description.enable}}\n <br>\n <span style=\"{{makeStyle @root.table_config.body.product_description.style}}\">{{product.description}}</span>\n {{/if}}\n </td>\n {{/if}}\n {{#if (eq column.id 'quantity')}}\n <!-- Quantity -->\n <td style=\"{{makeStyle @root.table_config.body.quantity.style}}\">{{product.price.quantity}}\n </td>\n {{/if}}\n {{#if (eq column.id 'tax')}}\n <!-- Tax -->\n <td style=\"{{makeStyle @root.table_config.body.tax.style}}\">\n {{product.price.tax_rate}}\n </td>\n {{/if}}\n {{#if (eq column.id 'unit_amount')}}\n <!-- Unit amount -->\n <td style=\"{{makeStyle @root.table_config.body.unit_amount.style}}\">\n {{product.price.unit_amount_net}}\n </td>\n {{/if}}\n {{#if (eq column.id 'net_total')}}\n <!-- Amount Subtotal -->\n <td style=\"{{makeStyle @root.table_config.body.net_total.style}}\">\n {{product.price.amount_subtotal}}\n </td>\n {{/if}}\n {{#if (eq column.id 'amount_tax')}}\n <!-- Tax amount-->\n <td style=\"{{makeStyle @root.table_config.body.amount_tax.style}}\">\n {{product.price.amount_tax}}\n </td>\n {{/if}}\n {{#if (eq column.id 'gross_total')}}\n <!-- Gross total -->\n <td style=\"{{makeStyle @root.table_config.body.gross_total.style}}\">\n {{product.price.amount_total}}\n {{#if @root.table_config.body.payment_type.enable}}\n {{#if (eq product.price.type 'recurring')}}\n <br>\n <span style=\"{{makeStyle @root.table_config.body.payment_type.style}}\">{{product.price.billing_period}}</span>\n {{/if}}\n {{/if}}\n </td>\n {{/if}}\n {{/if}}\n {{/each}}\n </tr>\n {{/each}}\n <!-- Finish rendering products -->\n {{#if table_config.footer.gross_total.enable}}\n {{#each order.total_details.recurrences as |item|}}\n <tr style=\"height: 48px;font-size: 14px;\">\n <td style=\"padding-top: 16px; padding-bottom: 8px; border: none !important; vertical-align: top;\" colspan=\"{{calculate_colspan @root.table_config}}\"></td>\n {{#if @root.table_config.footer.payment_type.enable}}\n <td style=\"{{makeStyle @root.table_config.footer.payment_type.style}}\" colspan=\"2\">{{item.billing_period}}</td>\n {{/if}}\n {{#if (isColumnEnabled @root.table_config 'net_total')}}\n {{#if @root.table_config.footer.net_total.enable}}\n <td style=\"{{makeStyle @root.table_config.footer.net_total.style}}\">{{item.amount_subtotal}}</td>\n {{/if}}\n {{/if}}\n <td style=\"{{makeStyle @root.table_config.footer.gross_total.style}}\">{{item.amount_total}}\n {{#if @root.table_config.footer.amount_tax.enable}}\n <br>\n <span style=\"{{makeStyle @root.table_config.footer.amount_tax.style}}\">{{item.full_amount_tax}}</span>\n {{/if}}\n </td>\n </tr>\n {{/each}}\n {{/if}}\n <tr style=\"height:16px !important;\"></tr>\n </tbody>\n</table>\n",
"created_at": "2022-04-19T12:41:43.662Z",
"created_by": "100042",
"updated_at": "2022-04-20T12:41:43.662Z",
"updated_by": "100042"
}
],
"hits": 100
}

getCustomVariableโ€‹

Get custom variable

GET /v1/custom-variables/{id}

Parameters

NameInTypeRequiredDescription
idpathstringYesCustom vairable ID

Sample Call

epilot template-variables getCustomVariable \
-p id=rbse777b-3cf8-4bff-bb0c-253fd1123250

Using positional args for path parameters:

epilot template-variables getCustomVariable rbse777b-3cf8-4bff-bb0c-253fd1123250

With JSONata filter:

epilot template-variables getCustomVariable -p id=rbse777b-3cf8-4bff-bb0c-253fd1123250 --jsonata 'id'
Sample Response
{
"id": "rbse777b-3cf8-4bff-bb0c-253fd1123250",
"type": "order_table",
"name": "My Custom table",
"key": "my_custom_table",
"_tags": ["string"],
"helper_params": ["param1", "param2"],
"helper_logic": "return param1 * param2;",
"config": {
"header": null,
"style": {
"color": "#222",
"background": "#fff",
"font-size": "16px",
"font-family": "",
"padding-bottom": "4px",
"font-weight": "bold",
"border": "none !important",
"text-align": "left"
},
"columns": [
{},
{}
],
"body": {
"product_name": {},
"price_description": {},
"product_description": {},
"quantity": {},
"tax": {},
"unit_amount": {},
"net_total": {},
"gross_total": {}
},
"footer": {
"payment_type": {},
"net_total": {},
"amount_tax": {},
"gross_total": {}
}
},
"template": "<table style=\"table-layout: fixed;width: 100%;max-width: 1000px;border-collapse: collapse;\">\n <thead>\n <tr style=\"height: 48px;border-bottom: 1px solid #D5E1ED;\">\n {{#each table_config.header.columns as |column|}}\n {{#if column.enable}}\n <th style=\"{{makeStyle @root.table_config.header.style}};{{makeStyle column.style}};\">{{column._label}}</th>\n {{/if}}\n {{/each}}\n </tr>\n </thead>\n <tbody style=\"vertical-align: baseline !important;font-weight: 400;font-size: 12px;position: relative;\">\n <!-- Start rendering products -->\n {{#each order.products as |product|}}\n {{#if @last}}\n <tr style=\"height: 48px;;font-size:14px;border-bottom: 1px solid #D5E1ED;\">\n {{else}}\n <tr style=\"height: 48px;;font-size:14px;\">\n {{/if}}\n {{#each @root.table_config.header.columns as |column|}}\n {{#if column.enable}}\n {{#if (eq column.id 'item')}}\n <!-- Item -->\n <td style=\"{{makeStyle @root.table_config.body.product_name.style}}\">\n {{#if @root.table_config.body.product_name.enable}}\n {{product.name}}\n {{/if}}\n {{#if @root.table_config.body.price_description.enable}}\n <br>\n <span style=\"{{makeStyle @root.table_config.body.price_description.style}}\">{{product.price.description}}</span>\n {{/if}}\n {{#if @root.table_config.body.product_description.enable}}\n <br>\n <span style=\"{{makeStyle @root.table_config.body.product_description.style}}\">{{product.description}}</span>\n {{/if}}\n </td>\n {{/if}}\n {{#if (eq column.id 'quantity')}}\n <!-- Quantity -->\n <td style=\"{{makeStyle @root.table_config.body.quantity.style}}\">{{product.price.quantity}}\n </td>\n {{/if}}\n {{#if (eq column.id 'tax')}}\n <!-- Tax -->\n <td style=\"{{makeStyle @root.table_config.body.tax.style}}\">\n {{product.price.tax_rate}}\n </td>\n {{/if}}\n {{#if (eq column.id 'unit_amount')}}\n <!-- Unit amount -->\n <td style=\"{{makeStyle @root.table_config.body.unit_amount.style}}\">\n {{product.price.unit_amount_net}}\n </td>\n {{/if}}\n {{#if (eq column.id 'net_total')}}\n <!-- Amount Subtotal -->\n <td style=\"{{makeStyle @root.table_config.body.net_total.style}}\">\n {{product.price.amount_subtotal}}\n </td>\n {{/if}}\n {{#if (eq column.id 'amount_tax')}}\n <!-- Tax amount-->\n <td style=\"{{makeStyle @root.table_config.body.amount_tax.style}}\">\n {{product.price.amount_tax}}\n </td>\n {{/if}}\n {{#if (eq column.id 'gross_total')}}\n <!-- Gross total -->\n <td style=\"{{makeStyle @root.table_config.body.gross_total.style}}\">\n {{product.price.amount_total}}\n {{#if @root.table_config.body.payment_type.enable}}\n {{#if (eq product.price.type 'recurring')}}\n <br>\n <span style=\"{{makeStyle @root.table_config.body.payment_type.style}}\">{{product.price.billing_period}}</span>\n {{/if}}\n {{/if}}\n </td>\n {{/if}}\n {{/if}}\n {{/each}}\n </tr>\n {{/each}}\n <!-- Finish rendering products -->\n {{#if table_config.footer.gross_total.enable}}\n {{#each order.total_details.recurrences as |item|}}\n <tr style=\"height: 48px;font-size: 14px;\">\n <td style=\"padding-top: 16px; padding-bottom: 8px; border: none !important; vertical-align: top;\" colspan=\"{{calculate_colspan @root.table_config}}\"></td>\n {{#if @root.table_config.footer.payment_type.enable}}\n <td style=\"{{makeStyle @root.table_config.footer.payment_type.style}}\" colspan=\"2\">{{item.billing_period}}</td>\n {{/if}}\n {{#if (isColumnEnabled @root.table_config 'net_total')}}\n {{#if @root.table_config.footer.net_total.enable}}\n <td style=\"{{makeStyle @root.table_config.footer.net_total.style}}\">{{item.amount_subtotal}}</td>\n {{/if}}\n {{/if}}\n <td style=\"{{makeStyle @root.table_config.footer.gross_total.style}}\">{{item.amount_total}}\n {{#if @root.table_config.footer.amount_tax.enable}}\n <br>\n <span style=\"{{makeStyle @root.table_config.footer.amount_tax.style}}\">{{item.full_amount_tax}}</span>\n {{/if}}\n </td>\n </tr>\n {{/each}}\n {{/if}}\n <tr style=\"height:16px !important;\"></tr>\n </tbody>\n</table>\n",
"created_at": "2022-04-19T12:41:43.662Z",
"created_by": "100042",
"updated_at": "2022-04-20T12:41:43.662Z",
"updated_by": "100042"
}

updateCustomVariableโ€‹

Update custom variable

PUT /v1/custom-variables/{id}

Parameters

NameInTypeRequiredDescription
idpathstringYesCustom variable ID

Request Body

Sample Call

epilot template-variables updateCustomVariable \
-p id=rbse777b-3cf8-4bff-bb0c-253fd1123250

With request body:

epilot template-variables updateCustomVariable \
-p id=rbse777b-3cf8-4bff-bb0c-253fd1123250 \
-d '{
"id": "rbse777b-3cf8-4bff-bb0c-253fd1123250",
"type": "order_table",
"name": "My Custom table",
"key": "my_custom_table",
"_tags": ["string"],
"helper_params": ["param1", "param2"],
"helper_logic": "return param1 * param2;",
"config": {
"header": null,
"style": {
"color": "#222",
"background": "#fff",
"font-size": "16px",
"font-family": "",
"padding-bottom": "4px",
"font-weight": "bold",
"border": "none !important",
"text-align": "left"
},
"columns": [
{},
{}
],
"body": {
"product_name": {},
"price_description": {},
"product_description": {},
"quantity": {},
"tax": {},
"unit_amount": {},
"net_total": {},
"gross_total": {}
},
"footer": {
"payment_type": {},
"net_total": {},
"amount_tax": {},
"gross_total": {}
}
},
"template": "<table style=\"table-layout: fixed;width: 100%;max-width: 1000px;border-collapse: collapse;\">\n <thead>\n <tr style=\"height: 48px;border-bottom: 1px solid #D5E1ED;\">\n {{#each table_config.header.columns as |column|}}\n {{#if column.enable}}\n <th style=\"{{makeStyle @root.table_config.header.style}};{{makeStyle column.style}};\">{{column._label}}</th>\n {{/if}}\n {{/each}}\n </tr>\n </thead>\n <tbody style=\"vertical-align: baseline !important;font-weight: 400;font-size: 12px;position: relative;\">\n <!-- Start rendering products -->\n {{#each order.products as |product|}}\n {{#if @last}}\n <tr style=\"height: 48px;;font-size:14px;border-bottom: 1px solid #D5E1ED;\">\n {{else}}\n <tr style=\"height: 48px;;font-size:14px;\">\n {{/if}}\n {{#each @root.table_config.header.columns as |column|}}\n {{#if column.enable}}\n {{#if (eq column.id 'item')}}\n <!-- Item -->\n <td style=\"{{makeStyle @root.table_config.body.product_name.style}}\">\n {{#if @root.table_config.body.product_name.enable}}\n {{product.name}}\n {{/if}}\n {{#if @root.table_config.body.price_description.enable}}\n <br>\n <span style=\"{{makeStyle @root.table_config.body.price_description.style}}\">{{product.price.description}}</span>\n {{/if}}\n {{#if @root.table_config.body.product_description.enable}}\n <br>\n <span style=\"{{makeStyle @root.table_config.body.product_description.style}}\">{{product.description}}</span>\n {{/if}}\n </td>\n {{/if}}\n {{#if (eq column.id 'quantity')}}\n <!-- Quantity -->\n <td style=\"{{makeStyle @root.table_config.body.quantity.style}}\">{{product.price.quantity}}\n </td>\n {{/if}}\n {{#if (eq column.id 'tax')}}\n <!-- Tax -->\n <td style=\"{{makeStyle @root.table_config.body.tax.style}}\">\n {{product.price.tax_rate}}\n </td>\n {{/if}}\n {{#if (eq column.id 'unit_amount')}}\n <!-- Unit amount -->\n <td style=\"{{makeStyle @root.table_config.body.unit_amount.style}}\">\n {{product.price.unit_amount_net}}\n </td>\n {{/if}}\n {{#if (eq column.id 'net_total')}}\n <!-- Amount Subtotal -->\n <td style=\"{{makeStyle @root.table_config.body.net_total.style}}\">\n {{product.price.amount_subtotal}}\n </td>\n {{/if}}\n {{#if (eq column.id 'amount_tax')}}\n <!-- Tax amount-->\n <td style=\"{{makeStyle @root.table_config.body.amount_tax.style}}\">\n {{product.price.amount_tax}}\n </td>\n {{/if}}\n {{#if (eq column.id 'gross_total')}}\n <!-- Gross total -->\n <td style=\"{{makeStyle @root.table_config.body.gross_total.style}}\">\n {{product.price.amount_total}}\n {{#if @root.table_config.body.payment_type.enable}}\n {{#if (eq product.price.type 'recurring')}}\n <br>\n <span style=\"{{makeStyle @root.table_config.body.payment_type.style}}\">{{product.price.billing_period}}</span>\n {{/if}}\n {{/if}}\n </td>\n {{/if}}\n {{/if}}\n {{/each}}\n </tr>\n {{/each}}\n <!-- Finish rendering products -->\n {{#if table_config.footer.gross_total.enable}}\n {{#each order.total_details.recurrences as |item|}}\n <tr style=\"height: 48px;font-size: 14px;\">\n <td style=\"padding-top: 16px; padding-bottom: 8px; border: none !important; vertical-align: top;\" colspan=\"{{calculate_colspan @root.table_config}}\"></td>\n {{#if @root.table_config.footer.payment_type.enable}}\n <td style=\"{{makeStyle @root.table_config.footer.payment_type.style}}\" colspan=\"2\">{{item.billing_period}}</td>\n {{/if}}\n {{#if (isColumnEnabled @root.table_config 'net_total')}}\n {{#if @root.table_config.footer.net_total.enable}}\n <td style=\"{{makeStyle @root.table_config.footer.net_total.style}}\">{{item.amount_subtotal}}</td>\n {{/if}}\n {{/if}}\n <td style=\"{{makeStyle @root.table_config.footer.gross_total.style}}\">{{item.amount_total}}\n {{#if @root.table_config.footer.amount_tax.enable}}\n <br>\n <span style=\"{{makeStyle @root.table_config.footer.amount_tax.style}}\">{{item.full_amount_tax}}</span>\n {{/if}}\n </td>\n </tr>\n {{/each}}\n {{/if}}\n <tr style=\"height:16px !important;\"></tr>\n </tbody>\n</table>\n",
"created_at": "2022-04-19T12:41:43.662Z",
"created_by": "100042",
"updated_at": "2022-04-20T12:41:43.662Z",
"updated_by": "100042"
}'

Using positional args for path parameters:

epilot template-variables updateCustomVariable rbse777b-3cf8-4bff-bb0c-253fd1123250

Using stdin pipe:

cat body.json | epilot template-variables updateCustomVariable -p id=rbse777b-3cf8-4bff-bb0c-253fd1123250

With JSONata filter:

epilot template-variables updateCustomVariable -p id=rbse777b-3cf8-4bff-bb0c-253fd1123250 --jsonata 'id'
Sample Response
{
"id": "rbse777b-3cf8-4bff-bb0c-253fd1123250",
"type": "order_table",
"name": "My Custom table",
"key": "my_custom_table",
"_tags": ["string"],
"helper_params": ["param1", "param2"],
"helper_logic": "return param1 * param2;",
"config": {
"header": null,
"style": {
"color": "#222",
"background": "#fff",
"font-size": "16px",
"font-family": "",
"padding-bottom": "4px",
"font-weight": "bold",
"border": "none !important",
"text-align": "left"
},
"columns": [
{},
{}
],
"body": {
"product_name": {},
"price_description": {},
"product_description": {},
"quantity": {},
"tax": {},
"unit_amount": {},
"net_total": {},
"gross_total": {}
},
"footer": {
"payment_type": {},
"net_total": {},
"amount_tax": {},
"gross_total": {}
}
},
"template": "<table style=\"table-layout: fixed;width: 100%;max-width: 1000px;border-collapse: collapse;\">\n <thead>\n <tr style=\"height: 48px;border-bottom: 1px solid #D5E1ED;\">\n {{#each table_config.header.columns as |column|}}\n {{#if column.enable}}\n <th style=\"{{makeStyle @root.table_config.header.style}};{{makeStyle column.style}};\">{{column._label}}</th>\n {{/if}}\n {{/each}}\n </tr>\n </thead>\n <tbody style=\"vertical-align: baseline !important;font-weight: 400;font-size: 12px;position: relative;\">\n <!-- Start rendering products -->\n {{#each order.products as |product|}}\n {{#if @last}}\n <tr style=\"height: 48px;;font-size:14px;border-bottom: 1px solid #D5E1ED;\">\n {{else}}\n <tr style=\"height: 48px;;font-size:14px;\">\n {{/if}}\n {{#each @root.table_config.header.columns as |column|}}\n {{#if column.enable}}\n {{#if (eq column.id 'item')}}\n <!-- Item -->\n <td style=\"{{makeStyle @root.table_config.body.product_name.style}}\">\n {{#if @root.table_config.body.product_name.enable}}\n {{product.name}}\n {{/if}}\n {{#if @root.table_config.body.price_description.enable}}\n <br>\n <span style=\"{{makeStyle @root.table_config.body.price_description.style}}\">{{product.price.description}}</span>\n {{/if}}\n {{#if @root.table_config.body.product_description.enable}}\n <br>\n <span style=\"{{makeStyle @root.table_config.body.product_description.style}}\">{{product.description}}</span>\n {{/if}}\n </td>\n {{/if}}\n {{#if (eq column.id 'quantity')}}\n <!-- Quantity -->\n <td style=\"{{makeStyle @root.table_config.body.quantity.style}}\">{{product.price.quantity}}\n </td>\n {{/if}}\n {{#if (eq column.id 'tax')}}\n <!-- Tax -->\n <td style=\"{{makeStyle @root.table_config.body.tax.style}}\">\n {{product.price.tax_rate}}\n </td>\n {{/if}}\n {{#if (eq column.id 'unit_amount')}}\n <!-- Unit amount -->\n <td style=\"{{makeStyle @root.table_config.body.unit_amount.style}}\">\n {{product.price.unit_amount_net}}\n </td>\n {{/if}}\n {{#if (eq column.id 'net_total')}}\n <!-- Amount Subtotal -->\n <td style=\"{{makeStyle @root.table_config.body.net_total.style}}\">\n {{product.price.amount_subtotal}}\n </td>\n {{/if}}\n {{#if (eq column.id 'amount_tax')}}\n <!-- Tax amount-->\n <td style=\"{{makeStyle @root.table_config.body.amount_tax.style}}\">\n {{product.price.amount_tax}}\n </td>\n {{/if}}\n {{#if (eq column.id 'gross_total')}}\n <!-- Gross total -->\n <td style=\"{{makeStyle @root.table_config.body.gross_total.style}}\">\n {{product.price.amount_total}}\n {{#if @root.table_config.body.payment_type.enable}}\n {{#if (eq product.price.type 'recurring')}}\n <br>\n <span style=\"{{makeStyle @root.table_config.body.payment_type.style}}\">{{product.price.billing_period}}</span>\n {{/if}}\n {{/if}}\n </td>\n {{/if}}\n {{/if}}\n {{/each}}\n </tr>\n {{/each}}\n <!-- Finish rendering products -->\n {{#if table_config.footer.gross_total.enable}}\n {{#each order.total_details.recurrences as |item|}}\n <tr style=\"height: 48px;font-size: 14px;\">\n <td style=\"padding-top: 16px; padding-bottom: 8px; border: none !important; vertical-align: top;\" colspan=\"{{calculate_colspan @root.table_config}}\"></td>\n {{#if @root.table_config.footer.payment_type.enable}}\n <td style=\"{{makeStyle @root.table_config.footer.payment_type.style}}\" colspan=\"2\">{{item.billing_period}}</td>\n {{/if}}\n {{#if (isColumnEnabled @root.table_config 'net_total')}}\n {{#if @root.table_config.footer.net_total.enable}}\n <td style=\"{{makeStyle @root.table_config.footer.net_total.style}}\">{{item.amount_subtotal}}</td>\n {{/if}}\n {{/if}}\n <td style=\"{{makeStyle @root.table_config.footer.gross_total.style}}\">{{item.amount_total}}\n {{#if @root.table_config.footer.amount_tax.enable}}\n <br>\n <span style=\"{{makeStyle @root.table_config.footer.amount_tax.style}}\">{{item.full_amount_tax}}</span>\n {{/if}}\n </td>\n </tr>\n {{/each}}\n {{/if}}\n <tr style=\"height:16px !important;\"></tr>\n </tbody>\n</table>\n",
"created_at": "2022-04-19T12:41:43.662Z",
"created_by": "100042",
"updated_at": "2022-04-20T12:41:43.662Z",
"updated_by": "100042"
}

deleteCustomVariableโ€‹

Immediately and permanently deletes a custom variable

DELETE /v1/custom-variables/{id}

Parameters

NameInTypeRequiredDescription
idpathstringYesCustom vairable ID

Sample Call

epilot template-variables deleteCustomVariable \
-p id=rbse777b-3cf8-4bff-bb0c-253fd1123250

Using positional args for path parameters:

epilot template-variables deleteCustomVariable rbse777b-3cf8-4bff-bb0c-253fd1123250

With JSONata filter:

epilot template-variables deleteCustomVariable -p id=rbse777b-3cf8-4bff-bb0c-253fd1123250 --jsonata '$'

getBluePrintTableConfigโ€‹

Get default table config

GET /v1/custom-variables/order-table-blueprint

Sample Call

epilot template-variables getBluePrintTableConfig

With JSONata filter:

epilot template-variables getBluePrintTableConfig --jsonata 'id'
Sample Response
{
"id": "rbse777b-3cf8-4bff-bb0c-253fd1123250",
"type": "order_table",
"name": "My Custom table",
"key": "my_custom_table",
"_tags": ["string"],
"helper_params": ["param1", "param2"],
"helper_logic": "return param1 * param2;",
"config": {
"header": null,
"style": {
"color": "#222",
"background": "#fff",
"font-size": "16px",
"font-family": "",
"padding-bottom": "4px",
"font-weight": "bold",
"border": "none !important",
"text-align": "left"
},
"columns": [
{},
{}
],
"body": {
"product_name": {},
"price_description": {},
"product_description": {},
"quantity": {},
"tax": {},
"unit_amount": {},
"net_total": {},
"gross_total": {}
},
"footer": {
"payment_type": {},
"net_total": {},
"amount_tax": {},
"gross_total": {}
}
},
"template": "<table style=\"table-layout: fixed;width: 100%;max-width: 1000px;border-collapse: collapse;\">\n <thead>\n <tr style=\"height: 48px;border-bottom: 1px solid #D5E1ED;\">\n {{#each table_config.header.columns as |column|}}\n {{#if column.enable}}\n <th style=\"{{makeStyle @root.table_config.header.style}};{{makeStyle column.style}};\">{{column._label}}</th>\n {{/if}}\n {{/each}}\n </tr>\n </thead>\n <tbody style=\"vertical-align: baseline !important;font-weight: 400;font-size: 12px;position: relative;\">\n <!-- Start rendering products -->\n {{#each order.products as |product|}}\n {{#if @last}}\n <tr style=\"height: 48px;;font-size:14px;border-bottom: 1px solid #D5E1ED;\">\n {{else}}\n <tr style=\"height: 48px;;font-size:14px;\">\n {{/if}}\n {{#each @root.table_config.header.columns as |column|}}\n {{#if column.enable}}\n {{#if (eq column.id 'item')}}\n <!-- Item -->\n <td style=\"{{makeStyle @root.table_config.body.product_name.style}}\">\n {{#if @root.table_config.body.product_name.enable}}\n {{product.name}}\n {{/if}}\n {{#if @root.table_config.body.price_description.enable}}\n <br>\n <span style=\"{{makeStyle @root.table_config.body.price_description.style}}\">{{product.price.description}}</span>\n {{/if}}\n {{#if @root.table_config.body.product_description.enable}}\n <br>\n <span style=\"{{makeStyle @root.table_config.body.product_description.style}}\">{{product.description}}</span>\n {{/if}}\n </td>\n {{/if}}\n {{#if (eq column.id 'quantity')}}\n <!-- Quantity -->\n <td style=\"{{makeStyle @root.table_config.body.quantity.style}}\">{{product.price.quantity}}\n </td>\n {{/if}}\n {{#if (eq column.id 'tax')}}\n <!-- Tax -->\n <td style=\"{{makeStyle @root.table_config.body.tax.style}}\">\n {{product.price.tax_rate}}\n </td>\n {{/if}}\n {{#if (eq column.id 'unit_amount')}}\n <!-- Unit amount -->\n <td style=\"{{makeStyle @root.table_config.body.unit_amount.style}}\">\n {{product.price.unit_amount_net}}\n </td>\n {{/if}}\n {{#if (eq column.id 'net_total')}}\n <!-- Amount Subtotal -->\n <td style=\"{{makeStyle @root.table_config.body.net_total.style}}\">\n {{product.price.amount_subtotal}}\n </td>\n {{/if}}\n {{#if (eq column.id 'amount_tax')}}\n <!-- Tax amount-->\n <td style=\"{{makeStyle @root.table_config.body.amount_tax.style}}\">\n {{product.price.amount_tax}}\n </td>\n {{/if}}\n {{#if (eq column.id 'gross_total')}}\n <!-- Gross total -->\n <td style=\"{{makeStyle @root.table_config.body.gross_total.style}}\">\n {{product.price.amount_total}}\n {{#if @root.table_config.body.payment_type.enable}}\n {{#if (eq product.price.type 'recurring')}}\n <br>\n <span style=\"{{makeStyle @root.table_config.body.payment_type.style}}\">{{product.price.billing_period}}</span>\n {{/if}}\n {{/if}}\n </td>\n {{/if}}\n {{/if}}\n {{/each}}\n </tr>\n {{/each}}\n <!-- Finish rendering products -->\n {{#if table_config.footer.gross_total.enable}}\n {{#each order.total_details.recurrences as |item|}}\n <tr style=\"height: 48px;font-size: 14px;\">\n <td style=\"padding-top: 16px; padding-bottom: 8px; border: none !important; vertical-align: top;\" colspan=\"{{calculate_colspan @root.table_config}}\"></td>\n {{#if @root.table_config.footer.payment_type.enable}}\n <td style=\"{{makeStyle @root.table_config.footer.payment_type.style}}\" colspan=\"2\">{{item.billing_period}}</td>\n {{/if}}\n {{#if (isColumnEnabled @root.table_config 'net_total')}}\n {{#if @root.table_config.footer.net_total.enable}}\n <td style=\"{{makeStyle @root.table_config.footer.net_total.style}}\">{{item.amount_subtotal}}</td>\n {{/if}}\n {{/if}}\n <td style=\"{{makeStyle @root.table_config.footer.gross_total.style}}\">{{item.amount_total}}\n {{#if @root.table_config.footer.amount_tax.enable}}\n <br>\n <span style=\"{{makeStyle @root.table_config.footer.amount_tax.style}}\">{{item.full_amount_tax}}</span>\n {{/if}}\n </td>\n </tr>\n {{/each}}\n {{/if}}\n <tr style=\"height:16px !important;\"></tr>\n </tbody>\n</table>\n",
"created_at": "2022-04-19T12:41:43.662Z",
"created_by": "100042",
"updated_at": "2022-04-20T12:41:43.662Z",
"updated_by": "100042"
}