TF Fiscal
Documentation

NFS-e

Query received NFS-e

Detail of one received NFS-e: parties, amounts, origin, links and this company manifestation.

GET/openapi/v2/empresas/{empresaId}/nfse/recebidas/{chaveAcesso}
Requires the token, timestamp and sign signature headers, see Authentication.

Returns one service invoice in which this company is the recipient or intermediary, by access key. The response is shaped like the items of Received NFS-e and additionally carries the eventos array, which list items do not. To register a manifestation use Manifest on received NFS-e. A key that is not among this company received invoices returns 404.

Path parameters

empresaId*
stringCompany identifier
chaveAcesso*
stringAccess key

* Required field

200
Received invoice found.
chaveAcesso
stringAccess key
numero
intNFS-e number
codigoVerificacao
stringVerification code
status
stringDocument status
papel
stringRole of this company
origem
stringRow origin
dataEmissao
stringIssue time
dataAutorizacao
stringAuthorization time
competencia
stringCompetence
objectProvider
objectService recipient
objectIntermediary
codigoTributacaoNacional
stringNational service code
discriminacao
stringService description
valorServico
numberService amount
valorLiquido
numberNet amount
valorIss
numberISS amount
issRetido
boolISS withheld
chaveSubstituida
stringKey of the replaced invoice
chaveSubstituta
stringKey of the replacing invoice
dataUltimoEvento
stringLast event
dataRecebimento
stringReceipt time
objectThis company manifestation
linkXml
stringOfficial XML link
linkDanfse
stringDANFSe link
arrayInvoice events

Received invoices arrive through the national distribution. A São Paulo company has a second source: after each sync the platform also pulls from the São Paulo municipal system the invoices this company received, and they are visible before the national transcription arrives. A PrefeituraSP row switches to `ADN` on its own once the transcription arrives, without producing a second row; at that moment chaveAcesso swaps the temporary key for the official one and the links become the national original and the DANFSe. Use prestador.cpfCnpj + numero as the identifier that is stable across syncs and never treat the temporary key as a permanent primary key.

Row from the national distribution

The definitive shape: official key, national-layout original and DANFSe available.

json
{
"chaveAcesso": "35503082406730610001340000000000000000000000000077",
"numero": 77,
"codigoVerificacao": null,
"origem": "ADN",
"prestador": { "cpfCnpj": "40673061000134" },
"linkXml": "https://api.v2.tffiscal.com/openapi/files/xml/9101?token=...",
"linkDanfse": "https://api.v2.tffiscal.com/openapi/files/danfse/35503082406730610001340000000000000000000000000077?token=..."
}
origem*
stringOrigin
chaveAcesso*
stringOfficial key

* Required field

Row pulled straight from the São Paulo system

São Paulo companies only, before the merge. The temporary key is 3550308 + 0 + the 14-digit provider CNPJ + the invoice number left-padded with zeros to 28 digits, recognizable by the 0 in position 8; it works in the detail and manifestation paths. linkXml points to the original from the municipal system and linkDanfse is still null.

json
{
"chaveAcesso": "35503080406730610001340000000000000000000000000077",
"numero": 77,
"codigoVerificacao": "A1B2C3D4",
"origem": "PrefeituraSP",
"prestador": { "cpfCnpj": "40673061000134" },
"linkXml": "https://api.v2.tffiscal.com/openapi/files/xml/9099?token=...",
"linkDanfse": null
}
origem*
stringOrigin
chaveAcesso*
stringTemporary key
codigoVerificacao*
stringMunicipal verification code

* Required field