TF Fiscal
Documentation

NF-e

Query NF-e

Returns status, invoice data and DANFE / XML download links.

GET/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

  • empresaIdstringrequired

    Company identifier returned by Register company.

    Example: 1934811222334455
  • nfeIdstringrequired

    The id sent at issuance.

    Example: NFe-000014553

Responses

200

Invoice found.

  • idstring

    Issuance request id.

  • tipostring

    Always NF-e.

  • statusstring

    AguardandoAutorizacao processing / Autorizada authorized / Negada denied / Cancelada cancelled.

    Values:AguardandoAutorizacaoAutorizadaNegadaCancelada
  • motivoStatusstring

    Denial reason: SEFAZ status code + description, e.g. 778 - Rejeicao: NCM inexistente; present only for Negada.

  • ambienteEmissaostring

    Homologacao / Producao.

  • enviadaPorEmailboolean

    Always false (the platform does not e-mail invoices).

  • dataCriacaostring

    Time the issuance request was accepted, ISO-8601 UTC.

  • dataUltimaAlteracaostring

    Last update time.

  • forcarEmissaoContingenciaboolean

    Always false.

  • pedidoobject

    Order info.

  • clienteobject

    Customer info.

  • numerostring

    Invoice number nNF (string).

  • seriestring

    Series.

  • dataEmissaostring

    Issuance time.

  • chaveAcessostring

    44-digit access key.

  • transporteobject

    Transport.

  • dataAutorizacaostring

    SEFAZ authorization time; empty until authorized.

  • linkDanfestring

    DANFE PDF download link, Autorizada only; the first download triggers rendering. See File download.

  • linkDownloadXmlstring

    Authorized XML download link, when an XML exists. See File download.

  • linkConsultaPorChaveAcessostring

    Always the empty string.

  • protocoloobject

    Authorization protocol.

  • emitidaEmContingenciaboolean

    Whether issued in contingency mode.

  • finalidadestring

    Invoice purpose echoed back: Normal / Devolucao.

  • notaReferenciadaobject

    Return invoices echo the access key of the original invoice.

  • itensarray

    Line items.

  • valorTotalnumber

    Invoice total.

  • informacoesAdicionaisstring

    Additional information, not provided at present.

  • informacoesAdicionaisFiscostring

    Additional information for the tax authority, not provided at present.

Errors

CodeHTTP
NFe0001404

The nfeId does not exist. Check the id sent at issuance and the empresaId.

10003000404

empresaId does not exist or does not belong to this application.

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.

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.