Sudrel API
Dashboard Create API key

Documentation › Concepts

Guides

NFS-e statuses

The 7 statuses of an issued invoice, the transitions, what to do in each one and the matching webhook.

The 7 statuses of an issued NFS-e

                     POST /v1/nfse
                          |
                          v
                    transmitindo ----(30 min)----> aviso processamento_prolongado
                     |   |    |                    (só aviso; o status não muda)
                     |   |    +--(competência acabou num retry)--> aguardando_confirmacao
                     |   |                                          |
                     |   |              POST /v1/nfse/{id}/confirmacao
                     |   |                                          |
                     |   |    <-------------------------------------+
                     |   |
                     |   +--(recuperação desiste após 7 dias)--> falha_transmissao
                     |
         +-----------+-----------+
         v                       v
     autorizada              rejeitada
         |
         | cancelamento, ou substituição autorizada
         v
     cancelada

descartada is not in the diagram: it is an invoice that came back without success and was discarded in the dashboard, or a valid row of a batch that you left out in POST /v1/lotes/{id}/emissao.

Status What it means What to do Final? Webhook
transmitindo Queued, sending, or recovering from a technical failure of the Sistema Nacional. Wait. Do not issue again. No None on entry. NFSE_PROCESSAMENTO_PROLONGADO at 30 minutes, once, as a warning.
autorizada NFS-e issued. numero and chave_acesso filled in. Download the PDF and XML. Yes (it can only become cancelada) NFSE_AUTORIZADA
rejeitada The Sistema Nacional refused it. Reason in rejeicao. Fix it and issue a new invoice, with another referencia. In a batch, POST /v1/lotes/{id}/reprocessamento. Yes, through the API NFSE_REJEITADA
cancelada Cancelled after authorization. Protocol in cancelamento. If it was a replacement, substituida_por tells which invoice replaced it. Nothing. Yes NFSE_CANCELADA
falha_transmissao The transmission could not be completed or confirmed, and nothing else will be tried automatically. See falha.dps_enviada. With "nao": issuing again is safe. With "desconhecido": check the Emissor Nacional first. Yes NFSE_FALHA_TRANSMISSAO
aguardando_confirmacao The invoice's accrual period (competência) ended before an automatic retry. Nothing is transmitted until you decide. POST /v1/nfse/{id}/confirmacao, keeping or changing the accrual period. No NFSE_AGUARDANDO_CONFIRMACAO
descartada Discarded in the dashboard, or a valid batch row that was not selected. Nothing. Yes None

There is no substituida status: the replaced invoice becomes cancelada, with substituida_por.

Each invoice's timeline is in eventos, in GET /v1/nfse/{id}: criada, each envio, consulta_dps, correcao_automatica, recuperada and the other steps, with the time of each one.

Why the invoice stays in transmitindo

A technical failure of the Sistema Nacional (timeout, instability) does not come back to you as an error. The invoice stays transmitindo while Sudrel recovers it: before any resend, Sudrel checks whether the DPS already became an invoice, so the same DPS never produces two invoices. If recovery does not succeed within 7 days, or if there is no way to query the DPS (for example, an invoice issued through the city hall's system), the invoice goes to falha_transmissao.