- 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
/nfe/{nfeId}/cancel
curl --request POST \
--url https://api.treeunfe.com.br/api/v1/nfe/{nfeId}/cancel \
--header 'x-api-key: <api-key>' \
--header 'x-api-key: <x_api_key>' \
--header 'Content-Type: application/json' \
--data '{
"xJust": "<string>"
}'
curl --request POST \
--url https://api.treeunfe.com.br/api/v1/nfe/{nfeId}/cancel \
--header 'x-api-key: <api-key>' \
--header 'x-api-key: <x_api_key>' \
--header 'Content-Type: application/json' \
--data '{
"xJust": "<string>"
}'Registers the cancellation event for an authorized NF-e, within the deadline set by the SEFAZ of the issuer’s state.
Authentication
x-api-key
required
string
The organization’s API Key (rawKey).
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-api-key: ORGANIZATION_RAW_KEY" \
-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-api-key: ORGANIZATION_RAW_KEY" \
-H "Content-Type: application/json" \
-d '{
"xJust": "Valor incorreto informado na nota"
}'
curl --request POST \
--url https://api.treeunfe.com.br/api/v1/nfe/{nfeId}/cancel \
--header 'x-api-key: <api-key>' \
--header 'x-api-key: <x_api_key>' \
--header 'Content-Type: application/json' \
--data '{
"xJust": "<string>"
}'
curl --request POST \
--url https://api.treeunfe.com.br/api/v1/nfe/{nfeId}/cancel \
--header 'x-api-key: <api-key>' \
--header 'x-api-key: <x_api_key>' \
--header 'Content-Type: application/json' \
--data '{
"xJust": "<string>"
}'