NFS-e
Query issued NFS-e by access key
Fetches one issued document by its 50-digit access key; the response is identical to the query by `id`.
GET
/openapi/v2/empresas/{empresaId}/nfse/emitidas/{chaveAcesso}Requires the
token, timestamp and sign signature headers, see Authentication.For key-based reconciliation: when you hold the access key (from the XML, the DANFSe or a counterparty) but not the integrator id. The response is exactly the same as Query NFS-e, which looks up by id; only the Falha status never appears, because a task that failed before numbering has no key. Older São Paulo documents carry no 50-digit key and cannot be found here: reconcile on id or identificacaoDps, or walk the issued list.
Path parameters
empresaId* | string | Company identifier |
chaveAcesso* | string | Access key |
* Required field
200
Document found. The fact fields are filled in as the status advances; the per-status scenarios are in Query NFS-e.
id | string | Document id |
status | string | Document status |
motivoStatus | string | Verdict |
numero | int | NFS-e number |
serie | string | Series |
numeroDps | int | DPS number |
chaveAcesso | string | Access key |
identificacaoDps | string | DPS identifier |
codigoVerificacao | string | Verification code |
dataEmissao | string | Issue time |
dataAutorizacao | string | Authorization time |
padraoMunicipal | string | Municipal standard |
atualizadoEm | string | Last status change |
chaveSubstituida | string | Key of the replaced invoice |
chaveSubstituta | string | Key of the replacing invoice |
linkXml | string | Official XML link |
linkDanfse | string | DANFSe link |
| array | Post-authorization events |
nfse | object | Echo of the accepted request |
statusDocument status
| Values | Meaning |
|---|---|
| Pendente | Accepted, no verdict yet; covers queued, sent and reconciling |
| Autorizada | Issued successfully; can be cancelled or replaced |
| Negada | Refused by the authority; motivoStatus carries the code and description; terminal |
| EmProcessoDeCancelamento | Cancellation review accepted, awaiting the municipality; granted turns into Cancelada, refused goes back to Autorizada |
| Cancelada | Cancelled; terminal |
| Substituida | Replaced by another invoice; chaveSubstituta carries the new key; terminal |
padraoMunicipalMunicipal standard
| Values | Meaning |
|---|---|
| Nacional | National standard: national issuer and national distribution |
| Paulistana | The São Paulo municipality own system |
eventos[].tipoEvent type
The list follows the official events and may grow.
| Values | Meaning |
|---|---|
| Cancelamento | Cancellation registered by the provider (101101) |
| CancelamentoPorSubstituicao | Cancelled because another invoice replaced it (105102) |
| PedidoAnalise | Cancellation tax review request (101103) |
| AnaliseDeferida | Municipality granted the cancellation (105104) |
| AnaliseIndeferida | Municipality refused the cancellation (105105) |
| CancelamentoDeOficio | Cancellation of record by the municipality (305101) |
| Bloqueio | Block of record by the municipality (305102) |
| Desbloqueio | Unblock of record by the municipality (305103) |
| Confirmacao | One of the parties confirmed the invoice, or tacit confirmation by the municipality (202201 / 203202 / 204203 / 205204) |
| Rejeicao | One of the parties rejected the invoice (202205 / 203206 / 204207) |
| RejeicaoAnulada | Municipality annulled a rejection (205208) |
| Outro | Official event not modelled yet; the real code is in status |
eventos[].codigoOfficial event code
| Values | Meaning |
|---|---|
| 101101 | Cancellation by the provider |
| 105102 | Cancellation by replacement |
| 101103 | Cancellation tax review request |
| 105104 | Review granted |
| 105105 | Review refused |
| 305101 | Cancellation of record |
| 305102 | Block of record |
| 305103 | Unblock of record |
| 202201 | Confirmation by the provider |
| 203202 | Confirmation by the recipient |
| 204203 | Confirmation by the intermediary |
| 205204 | Tacit confirmation by the municipality |
| 202205 | Rejection by the provider |
| 203206 | Rejection by the recipient |
| 204207 | Rejection by the intermediary |
| 205208 | Rejection annulled by the municipality |
| 000000 | Official event not modelled yet; the real code is in status |
| Code | HTTP | |
|---|---|---|
| 10018003 | 404 | Document not found: the key does not belong to this company. Check chaveAcesso and empresaId. Older São Paulo documents carry no 50-digit key and cannot be found here. |
| 10003000 | 404 | empresaId does not exist or does not belong to this application. |
