TF Fiscal
Documentation

NFS-e

Query NFS-e

Returns status, access key, post-authorization events, XML / DANFSe links and the request echo.

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

Queries the document by the id sent at issuance. The NFS-e access key has 50 digits and is generated by the issuing authority, so a document that failed has no chaveAcesso and can only be located by identificacaoDps, the 45-character DPS identifier generated by the platform. For bulk reconciliation use the issued list. An unknown document returns 404.

Path parameters

empresaId*
stringCompany identifier
nfseId*
stringDocument id

* Required field

200
Document found. Document fact fields are filled in as the status advances; see the scenarios below.
id
stringDocument id
status
stringDocument status
motivoStatus
stringVerdict
numero
intNFS-e number
serie
stringSeries
numeroDps
intDPS number
chaveAcesso
stringAccess key
identificacaoDps
stringDPS identifier
codigoVerificacao
stringVerification code
dataEmissao
stringIssue time
dataAutorizacao
stringAuthorization time
padraoMunicipal
stringMunicipal standard
atualizadoEm
stringLast status change
chaveSubstituida
stringKey of the replaced invoice
chaveSubstituta
stringKey of the replacing invoice
linkXml
stringOfficial XML link
linkDanfse
stringDANFSe link
arrayPost-authorization events
nfse
objectEcho of the accepted request

The document fact fields (numero, chaveAcesso, links, eventos) are filled in as the status advances. The response example above is the Autorizada case; below, the other cases that change which fields carry a value.

Failure before numbering

The platform refused before numbering: invalid parameters or issuer not eligible. There is no number, key or DPS identifier; reconcile on id and do not expect to find the document in the issued list.

json
{
"id": "PED-20260918-002",
"status": "Falha",
"motivoStatus": "Empresa sem serie de DPS configurada",
"numero": null,
"chaveAcesso": null,
"identificacaoDps": null,
"dataEmissao": "2026-09-18T13:00:00Z",
"atualizadoEm": "2026-09-18T13:00:01Z",
"eventos": [],
"nfse": null
}
status*
stringStatus
motivoStatus*
stringLocal refusal reason

* Required field

Refused by the authority

The DPS was numbered and sent, and the authority refused it. There is an identificacaoDps but no key; motivoStatus carries the authority code and description.

json
{
"id": "PED-20260918-003",
"status": "Negada",
"motivoStatus": "E0143 - Codigo de tributacao nacional nao permitido para o municipio",
"numero": null,
"serie": "1",
"numeroDps": 43,
"chaveAcesso": null,
"identificacaoDps": "DPS355030824067306100013400001000000000000043",
"dataEmissao": "2026-09-18T13:05:00Z",
"padraoMunicipal": "Nacional",
"atualizadoEm": "2026-09-18T13:05:02Z",
"eventos": [],
"nfse": null
}
status*
stringStatus
motivoStatus*
stringAuthority verdict
identificacaoDps*
stringDPS identifier

* Required field

Cancelled, with events

After a successful cancellation the status is Cancelada and eventos carries the registered event; linkDanfse now points to the watermarked PDF.

json
{
"id": "PED-20260918-001",
"status": "Cancelada",
"numero": 1287,
"chaveAcesso": "35503082406730610001340000000000000000000000000077",
"atualizadoEm": "2026-09-19T10:00:00Z",
"eventos": [
{
"tipo": "Cancelamento",
"codigo": "101101",
"sequencia": 1,
"protocolo": "3550308000000000000000000000000000000000000000000001",
"data": "2026-09-19T10:00:00Z",
"linkXml": "https://api.v2.tffiscal.com/openapi/files/xml/9002?token=..."
}
],
"nfse": null
}
status*
stringStatus
*
arrayRegistered events

* Required field