Get a template
Gets one template with its body. Secret and trusted tokens may call it; a limited token may not (403).
AuthorizationBearer <token>A secret, trusted or limited token. See Authentication.
id*stringThe template id.
timezone?stringAn IANA time zone name, such as America/New_York or UTC. It sets how date_start and date_end are read and the time zone of every date in the response. The default is the account's time zone (Settings, Technical), or UTC when it has none. A name that is not known is a 400.
expand?stringComma-separated child objects to return in full instead of as a URL, for example customer,payments. Use dot notation for nested objects (items.product), up to four levels deep. A single object takes up to 12 paths; a list takes up to 2, applied to every item. Extra paths are dropped without an error. See Expanding objects.
show?stringComma-separated fields to return; all others are left out. Use dot notation for child fields (customer.email). You cannot send show and hide together (400). See Customizing output.
hide?stringComma-separated fields to leave out of the response. Use dot notation for child fields (customer.email). You cannot send show and hide together (400). See Customizing output.
formatted?booleanWhen true, the object also has a formatted child with amounts and dates as display text in the shopper's language and currency (for example $19.99 or November 7, 2026). The default is false. See Localized formatting.
falseThe template.
application/json- response
A Handlebars template that builds the body of an email (or a PDF). Use one on a notification subscription, wrap it in another with wrapper_template, or render it yourself with the build endpoint.
object?"template"Always template.
"template"url?stringThe URL of this template in the API.
uritemplate_id?stringThe template id.
date_created?stringWhen the template was created.
date-timedate_modified?stringWhen the template last changed.
date-timetest?booleantrue for a test mode template.
account_id?stringThe account it belongs to.
expand?|Comma-separated child objects of the data to expand before the template is filled.
show?|Comma-separated fields of the data to keep.
hide?|Comma-separated fields of the data to leave out.
wrapper_template?||The template this one is placed inside (a shared header and footer, for example): its URL, the full object with expand=wrapper_template, or null.
comments?|Your own notes, at most 256 characters.
template_type?|email (or null, the same) or pdf. A PDF template cannot be changed back.
"email""pdf"nullpdf_type?|For a PDF template, what it renders, such as invoice or order.
page_format?|For a PDF template, the page size, such as A4 or Letter.
orientation?|For a PDF template, portrait or landscape.
margin_top?|For a PDF template, the top margin.
margin_bottom?|For a PDF template, the bottom margin.
margin_left?|For a PDF template, the left margin.
margin_right?|For a PDF template, the right margin.
body?|The Handlebars source, at most 128 kB. In a list this holds a short note instead; get the template by id to read the body.
formatted?Dates as display text. Only returned with formatted=true.
curl -X GET 'https://api.comecero.com/api/v1/templates/string'{ "object": "template", "url": "https://api.comecero.com/api/v1/templates/1102500900112TEm5Jc3Rw", "template_id": "1102500900112TEm5Jc3Rw", "date_created": "2026-10-01T09:05:00Z", "date_modified": "2026-10-01T09:05:00Z", "test": true, "account_id": "AB1234", "expand": null, "show": null, "hide": null, "wrapper_template": null, "comments": "Download email", "template_type": null, "pdf_type": null, "page_format": null, "orientation": null, "margin_top": null, "margin_bottom": null, "margin_left": null, "margin_right": null, "body": "<p>Hi {{customer.first_name}}, your download is ready: {{download_url}}</p>"}Create a template POST
Saves a Handlebars template. Use its id as `template_id` on a notification subscription, as `wrapper_template_id` on another template, or with `POST /notifications`. Secret and trusted tokens may call it; a limited token may not (`403`).
Update a template POST
Changes the fields you send and leaves the others as they are. Emails sent after the change use the new body. Answers `201`, not `200`. Secret and trusted tokens may call it; a limited token may not (`403`).