TF Fiscal
Documentation

NF-e verification

DANFE retrieval

Returns the DANFE of an NF-e your account verified, by access key, as a PDF file.

GET/openapi/v3/consultas/danfe/{chave}
Requires the token, timestamp and sign signature headers, see Authentication.

Returns the DANFE (A4 layout) of an NF-e verified by your account, as a PDF file. Each call renders the PDF from the invoice's latest verification verdict at that moment; the platform does not store PDFs, retrieval itself never contacts SEFAZ, and it is not charged separately.

This endpoint has its own scope that the platform enables separately: having the chave lookup does not grant PDF retrieval, and vice versa.

Failures return an HTTP status and a bare {code, message} object (codes at the bottom of the page); errors are JSON even when the request carries Accept: application/pdf. Authentication failures (401 / 403 / 429) use the platform envelope, see Authentication and authorization errors.

Path parameters

chave*
stringAccess key

* Required field

200
The DANFE as a PDF file (not JSON). Response headers: Content-Type: application/pdf; Content-Disposition: inline; filename="{chave}.pdf"; Cache-Control: no-store; X-Tffiscal-Nfe-Status, the tax status this PDF reflects, Autorizada (regular version) or Cancelada (watermarked as cancelled), so you can tell them apart without parsing the PDF.

Authentication works as for the chave lookup: send the token, timestamp and sign headers; the GET body is the empty string and the chave is part of the signed path (full rules in Authentication). Given app_secret = sk_live_9f8e7d6c5b4a, the chave 35260764962869000108550990001366171195929648 and timestamp = 1784906308, the signing string is:

text
sign_input = "sk_live_9f8e7d6c5b4a"
+ "/openapi/v3/consultas/danfe/35260764962869000108550990001366171195929648"
+ ""
+ "1784906308"
sign = md5Hex(sign_input)