comecerodocs

List templates

GET
/templates

Lists the templates in your account, email and PDF. In the list, body is left out; get one template to read it. The list is offset-based. Secret and trusted tokens may call it; a limited token may not (403).

Authorization

headerAuthorizationBearer <token>

A secret, trusted or limited token. See Authentication.

Query Parameters

q?string

An exact template id.

sort_by?string

The field to sort by. Any other value uses the default.

Default"date_created"
Value in"date_created""date_modified""template_id"
limit?integer

How many items to return on one page, from 1 to 100. The default is 100. A value outside 1 to 100, or one that is not a whole number, is a 400.

Range1 <= value <= 100
Default100
offset?integer

For offset-based lists, how many items to skip before the page starts. Use next_page_offset or previous_page_offset from the page you have. A value that is not a whole number is a 400.

Range0 <= value
Default0
desc?boolean

Sort in descending order (newest, largest or last first) when true. The default is false. A value other than true or false is a 400.

Defaultfalse
timezone?string

An 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?string

Comma-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?string

Comma-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?string

Comma-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?boolean

When 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.

Defaultfalse

Response Body

A page of templates.

application/json
  1. response

An offset-based page of templates.

total_items*integer

How many items match, across all pages.

total_pages*integer

How many pages there are at this limit. 0 when nothing matches.

current_page*integer

The number of this page, starting at 1. 0 when nothing matches.

next_page_url*|

The URL of the next page, or null on the last page.

Formaturi
next_page_offset*|

The offset of the next page, or null on the last page.

previous_page_url*|

The URL of the previous page, or null on the first page.

Formaturi
previous_page_offset*|

The offset of the previous page, or null on the first page.

current_page_url*string

The URL of this page.

Formaturi
data*array<>

The templates on this page.

Example Request
curl -X GET 'https://api.comecero.com/api/v1/templates'
Example Response
{  "total_items": 1,  "total_pages": 1,  "current_page": 1,  "next_page_url": null,  "next_page_offset": null,  "previous_page_url": null,  "previous_page_offset": null,  "current_page_url": "https://api.comecero.com/api/v1/templates",  "data": [    {      "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": "To obtain the template body, access this resource directly."    }  ]}