- Guides
- NF-e events
Guides
NF-e events
Cancel invoices, issue correction letters, and void number ranges.
Events are registered on an NF-e that has already been authorized. The {nfeId} is the invoice’s ID at Treeunfe (UUID), not the access key.
Cancellation
POST /nfe/{nfeId}/cancel
{ "xJust": "Valor incorreto informado na nota" }
| Field | Rule |
|---|---|
xJust | Justification, 15 to 255 characters. |
Cancellation is only accepted within the deadline set by the SEFAZ of the issuer’s state.
Correction letter (CC-e)
POST /nfe/{nfeId}/cce
{
"nSeqEvento": 1,
"xCorrecao": "Correcao do endereco de entrega para Rua das Flores, 100"
}
| Field | Rule |
|---|---|
nSeqEvento | Sequence number of the correction for this invoice. Start at 1 and add 1 for each new CC-e. |
xCorrecao | Text, 15 to 1000 characters. |
Each new CC-e replaces the previous one. Repeat in the text every correction that still applies.
A CC-e cannot correct:
- amounts and taxes (tax base, rate, price difference, quantity, value);
- data that would change the issuer or the recipient;
- the issue date or the departure date.
Get CC-e
GET /nfe/{nfeId}/cce returns the correction letters registered for the invoice.
Number voiding
POST /nfe/inutilizations
Use it when a range of NF-e numbers was skipped and will not be used, for example after a failure in the issuing system. Voiding (inutilização) tells SEFAZ those numbers have no invoice. Unlike cancellation and the CC-e, it does not refer to an invoice: send the series and the range.
{
"CNPJ": "12345678000195",
"mod": 55,
"serie": 1,
"nNFIni": 15,
"nNFFin": 20,
"xJust": "Numeracao pulada por falha no sistema emissor"
}
| Field | Rule |
|---|---|
CNPJ | Issuer CNPJ, 14 digits, no punctuation. |
mod | 55 (NF-e). |
serie | Series of the numbers. |
nNFIni and nNFFin | First and last number of the range. For a single number, use the same value in both. |
xJust | Justification, 15 to 255 characters. |
Only void numbers that were never used in an authorized or denied invoice. Voiding cannot be undone.
SEFAZ accepts voiding until the 10th day of the month after the gap in the numbering.
List voided ranges
GET /nfe/inutilizations returns the ranges already voided, in pages (page and per_page).