NF-e
Query NF-e
Returns status, invoice data and DANFE / XML download links.
/openapi/v2/empresas/{empresaId}/nf-e/{nfeId}Requires the token, timestamp and sign signature headers, see Authentication.
nfeId is the id sent at issuance. Unknown ids return HTTP 404 + NFe0001. Authentication errors (10009xxx) are listed under Authentication.
Parameters
Path parameters
empresaIdstringrequiredCompany identifier returned by Register company.
Example:1934811222334455nfeIdstringrequiredThe
idsent at issuance.Example:NFe-000014553
Responses
Invoice found.
idstringIssuance request id.
tipostringAlways
NF-e.statusstringAguardandoAutorizacaoprocessing /Autorizadaauthorized /Negadadenied /Canceladacancelled.Values:AguardandoAutorizacaoAutorizadaNegadaCanceladamotivoStatusstringDenial reason: SEFAZ status code + description, e.g.
778 - Rejeicao: NCM inexistente; present only for Negada.ambienteEmissaostringHomologacao/Producao.enviadaPorEmailbooleanAlways false (the platform does not e-mail invoices).
dataCriacaostringTime the issuance request was accepted, ISO-8601 UTC.
dataUltimaAlteracaostringLast update time.
forcarEmissaoContingenciabooleanAlways false.
pedidoobjectOrder info.
clienteobjectCustomer info.
numerostringInvoice number
nNF(string).seriestringSeries.
dataEmissaostringIssuance time.
chaveAcessostring44-digit access key.
transporteobjectTransport.
dataAutorizacaostringSEFAZ authorization time; empty until authorized.
linkDanfestringDANFE PDF download link, Autorizada only; the first download triggers rendering. See File download.
linkDownloadXmlstringAuthorized XML download link, when an XML exists. See File download.
linkConsultaPorChaveAcessostringAlways the empty string.
protocoloobjectAuthorization protocol.
emitidaEmContingenciabooleanWhether issued in contingency mode.
finalidadestringInvoice purpose echoed back:
Normal/Devolucao.notaReferenciadaobjectReturn invoices echo the access key of the original invoice.
itensarrayLine items.
valorTotalnumberInvoice total.
informacoesAdicionaisstringAdditional information, not provided at present.
informacoesAdicionaisFiscostringAdditional information for the tax authority, not provided at present.
Errors
| Code | HTTP | |
|---|---|---|
| NFe0001 | 404 | The |
| 10003000 | 404 |
|
Status semantics
AguardandoAutorizacao from acceptance until SEFAZ replies; Autorizada once authorized; Negada when rejected (motivoStatus explains why: fix and resubmit); Cancelada after a successful cancellation.
Download links (`linkDanfe` / `linkDownloadXml`)
Links look like https://api.v2.tffiscal.com/openapi/files/{kind}/{ref}?token=… and need no signature headers: a plain GET that follows the 302 redirect is enough. Every query issues new links; an expired link returns 401 + 10009036. Validity, on-demand DANFE rendering and the remaining errors are described in File download.
