Invoice e-mail
Get e-mail template
Full template, with the body and the list of variables allowed for the type.
/openapi/v2/emails/templates/{templateId}token, timestamp and sign signature headers, see Authentication.Returns one integrator template by templateId, including corpoHtml and variaveisDisponiveis. A template of another integrator is not visible: it answers 10021001.
Path parameters
templateId* | string | Template identifier |
* Required field
templateId | string | Template identifier |
tipoDocumento | string | Document type |
idioma | string | Template language |
nome | string | Template name |
assunto | string | Subject template |
corpoHtml | string | Body template |
padrao | bool | Default template |
ativo | bool | Enabled |
variaveisDisponiveis | array | Allowed variables |
criadoEm | string | Creation time |
atualizadoEm | string | Last update |
variaveisDisponiveis is the full list the template may use, in the order the platform declares it: the eleven common variables first, then the type-specific ones. Use it to build a template editor; a name outside it is refused at save with 10021003.
NFe: common variables only
The NF-e has no variable of its own; cliente.nome is the buyer.
["numero","serie","chaveAcesso","dataEmissao","valorTotal","emitente.nome","emitente.cnpj","cliente.nome","cliente.documento","linkPdf","linkXml"]
variaveisDisponiveis* | array | Allowed variables |
* Required field
NFSe: common plus four of its own
codigoVerificacao, municipio, descricaoServico and valorIss; cliente.nome is the service taker.
["numero","serie","chaveAcesso","dataEmissao","valorTotal","emitente.nome","emitente.cnpj","cliente.nome","cliente.documento","linkPdf","linkXml","codigoVerificacao","municipio","descricaoServico","valorIss"]
variaveisDisponiveis* | array | Allowed variables |
* Required field
CTe: common plus three of its own
remetente.nome, destinatario.nome and valorFrete; cliente.nome is the freight taker.
["numero","serie","chaveAcesso","dataEmissao","valorTotal","emitente.nome","emitente.cnpj","cliente.nome","cliente.documento","linkPdf","linkXml","remetente.nome","destinatario.nome","valorFrete"]
variaveisDisponiveis* | array | Allowed variables |
* Required field
DCe: common plus one of its own
marketplace.site, from the issuer DC-e profile; cliente.nome is the recipient.
["numero","serie","chaveAcesso","dataEmissao","valorTotal","emitente.nome","emitente.cnpj","cliente.nome","cliente.documento","linkPdf","linkXml","marketplace.site"]
variaveisDisponiveis* | array | Allowed variables |
* Required field
tipoDocumentoDocument type
| Values | Meaning |
|---|---|
| NFe | NF-e, goods invoice |
| NFSe | NFS-e, service invoice |
| CTe | CT-e, transport document |
| DCe | DC-e, content declaration |
idiomaTemplate language
The language sets the format of amounts and dates in the variables; the time is always São Paulo time.
| Values | Meaning |
|---|---|
| pt | Portuguese; amounts 1.234,56, dates dd/MM/yyyy HH:mm |
| en | English; amounts 1,234.56, dates yyyy-MM-dd HH:mm |
| zh | Chinese; amounts 1,234.56, dates yyyy-MM-dd HH:mm |
| es | Spanish; amounts 1.234,56, dates dd/MM/yyyy HH:mm |
variaveisDisponiveis[]Variables common to the four types
Write {{nome}}; spaces inside the braces are accepted. Without a value the variable becomes empty text. In the body the value is HTML-escaped; in the subject it is not.
| Values | Meaning |
|---|---|
| numero | Document number |
| serie | Series |
| chaveAcesso | Access key, 44 or 50 digits |
| dataEmissao | Issue time, São Paulo time zone, formatted per language |
| valorTotal | Total amount, formatted per language: NF-e total, NFS-e service amount, CT-e total service value, DC-e declared value |
| emitente.nome | Issuer company name |
| emitente.cnpj | Issuer CNPJ |
| cliente.nome | Name of the invoice recipient: NF-e buyer, NFS-e and CT-e service taker, DC-e recipient |
| cliente.documento | Recipient document, CPF or CNPJ |
| linkPdf | PDF download link; validity per the integrator setting, 7 days by default |
| linkXml | Authorized XML download link; empty if the XML is not archived yet |
variaveisDisponiveis[]NFSe-only variables
In another document type the variable is refused at save with 10021003.
| Values | Meaning |
|---|---|
| codigoVerificacao | NFS-e verification code |
| municipio | Issuer municipality name |
| descricaoServico | Service description |
| valorIss | ISS amount, formatted per language |
variaveisDisponiveis[]CTe-only variables
In another document type the variable is refused at save with 10021003.
| Values | Meaning |
|---|---|
| remetente.nome | Cargo sender name |
| destinatario.nome | Cargo recipient name |
| valorFrete | Total freight value, formatted per language |
variaveisDisponiveis[]DCe-only variables
In another document type the variable is refused at save with 10021003.
| Values | Meaning |
|---|---|
| marketplace.site | Marketplace site, from the issuer DC-e profile |
| Code | HTTP | |
|---|---|---|
| 10021001 | 404 | E-mail template not found: the templateId does not exist or does not belong to this integrator. |
