- NF-e events
- Cancel NF-e
NF-e events
Cancel NF-e
Registers the cancellation event for an authorized NF-e, within the state SEFAZ's deadline
POST
Registers the cancellation event for an authorized NF-e, within the deadline set by the SEFAZ of the issuer’s state.
Authentication
x-enterprise-key
required
string
Enterprise key with this route’s permission. See Authentication.
x-organization-id
required
string
ID of the organization (issuing company) the operation applies to.
Path parameters
nfeId
required
string
The NF-e’s ID (UUID) at Treeunfe.
Body
application/json
xJust
required
string
Reason for the cancellation (15 to 255 characters).
Responses
| Status | Description |
|---|---|
200 | Event processed. |
400 | Invalid body (missing required field, wrong format, or field not allowed). |
401 | Credential missing, invalid, or expired. |
404 | Resource not found. |
422 | Cancellation rejected by SEFAZ. |
curl -X POST "https://api.treeunfe.com.br/api/v1/nfe/006f917a-21a5-491d-90b4-f745d96385e7/cancel" \
-H "x-enterprise-key: YOUR_ENTERPRISE_KEY" \
-H "x-organization-id: ORGANIZATION_ID" \
-H "Content-Type: application/json" \
-d '{
"xJust": "Valor incorreto informado na nota"
}'
curl -X POST "https://api.treeunfe.com.br/api/v1/nfe/006f917a-21a5-491d-90b4-f745d96385e7/cancel" \
-H "x-enterprise-key: YOUR_ENTERPRISE_KEY" \
-H "x-organization-id: ORGANIZATION_ID" \
-H "Content-Type: application/json" \
-d '{
"xJust": "Valor incorreto informado na nota"
}'