TF Fiscal
Documentation

NF-e

Cancel NF-e

Cancels an authorized invoice within 24 hours of authorization.

DELETE/openapi/v2/empresas/{empresaId}/nf-e/{nfeId}

Requires the token, timestamp and sign signature headers, see Authentication.

Cancels an authorized invoice; success is HTTP 200 with no body, and the query endpoint then returns Cancelada. Authentication errors (10009xxx) are listed under Authentication.

Parameters

Path parameters

  • empresaIdstringrequired

    Company identifier returned by Register company.

    Example: 1934811222334455
  • nfeIdstringrequired

    The id sent at issuance.

    Example: NFe-000014553

Responses

200

Cancellation registered with SEFAZ; no body.

No response body

Errors

CodeHTTP
NFe0001404

The nfeId does not exist. Check the id sent at issuance and the empresaId.

10003000404

empresaId does not exist or does not belong to this application.

10004012400

Invoice not in authorized status. Query to confirm the status.

10004013400

Outside the 24-hour window. Issue a return invoice instead.

10004014400

Refused by SEFAZ (status code and reason attached). Act on the SEFAZ reason.

Rules

  • Only Autorizada invoices can be cancelled; other statuses return 10004012.
  • Within 24 hours of authorization (some states allow more, per platform configuration); outside the window returns 10004013, and only a return invoice can be issued instead.
  • A SEFAZ refusal returns 10004014 with the SEFAZ status code and reason.
  • Unknown nfeId returns HTTP 404 + NFe0001.
  • Correction letters already registered remain queryable after cancellation, see List correction letters.