TF Fiscal
开发文档

发票邮件

邮件模板列表

本集成商的全部模板,不分页;列表项不带正文。

GET/openapi/v2/emails/templates
需要 token、timestamp、sign 三个签名头,参见认证与签名。

列出本集成商的模板,可按发票类型、语言与启用状态过滤。每项只有元数据;corpoHtml 与 variaveisDisponiveis 为 null,请看查询模板。

查询参数

tipoDocumento
string发票类型过滤
idioma
string语言过滤
ativo
bool启用状态过滤

* 必填字段

200
完整列表,按创建先后排列。
total
int返回条数
array模板列表

列表返回本集成商的全部模板,不分页,按创建先后排列。过滤条件精确匹配且可组合;不传则返回全部。要看正文或变量清单请用查询模板。

找某类型的默认模板

带 tipoDocumento=NFe&ativo=true 调用,取 padrao 为 true 的那一项;发送不传 templateId 时用的就是它。没有任何一项 padrao 为 true 时,不传 templateId 的发送返回 10021012。

json
{
"total": 2,
"itens": [
{
"templateId": "2103150000000000001",
"tipoDocumento": "NFe",
"idioma": "pt",
"nome": "NF-e padrão",
"assunto": "Nota fiscal {{numero}} - {{emitente.nome}}",
"corpoHtml": null,
"padrao": true,
"ativo": true,
"variaveisDisponiveis": null,
"criadoEm": "2026-09-28T12:00:00Z",
"atualizadoEm": "2026-09-28T12:00:00Z"
},
{
"templateId": "2103150000000000002",
"tipoDocumento": "NFe",
"idioma": "en",
"nome": "NF-e english",
"assunto": "Invoice {{numero}} from {{emitente.nome}}",
"corpoHtml": null,
"padrao": false,
"ativo": true,
"variaveisDisponiveis": null,
"criadoEm": "2026-09-28T12:05:00Z",
"atualizadoEm": "2026-09-28T12:05:00Z"
}
]
}
total*
int返回条数
*
array模板列表

* 必填字段

按语言选模板

同一类型不分语言只有一个默认模板。要用另一种语言发送,按 idioma 过滤后把所选项的 templateId 传给发送接口。

json
{
"total": 1,
"itens": [
{
"templateId": "2103150000000000002",
"tipoDocumento": "NFe",
"idioma": "en",
"nome": "NF-e english",
"assunto": "Invoice {{numero}} from {{emitente.nome}}",
"corpoHtml": null,
"padrao": false,
"ativo": true,
"variaveisDisponiveis": null,
"criadoEm": "2026-09-28T12:05:00Z",
"atualizadoEm": "2026-09-28T12:05:00Z"
}
]
}
total*
int返回条数
*
array模板列表

* 必填字段