POST
/api/nfcom/cancelCancel NFCom
Cancels an authorized NFCom (event 110111). Only NFCom documents issued through this platform can be cancelled: the access key is looked up in this account's records, and NFCom não encontrada is returned when it is not found. An NFCom already recorded as cancelled on the platform is rejected with an error without being submitted; the cancellation event is sent to the environment (production or test) in which the NFCom was issued.
Required headers
tokenstring | string | Token of the issuing company |
signstring | string | MD5 signature |
timestampstring | string | Unix timestamp in seconds |
Body
chNFCom*string | string | Access key of the NFCom (44 digits) |
xJust*string | string | Cancellation justification (minimum 15 characters as required by the tax authority) |
nProtstring | string | NFCom authorization protocol (16 digits). Optional — when omitted, the authorization protocol recorded on the platform is used; an error is returned when the record has no protocol (not authorized) |
* Required field.
Examples
# sign = md5(token + path + body + timestamp) # Template generated from the endpoint path; replace the placeholders curl -X POST "https://api.tffiscal.com/api/nfcom/cancel" \ -H "Content-Type: application/json" \ -H "token: $TOKEN" \ -H "timestamp: $TIMESTAMP" \ -H "sign: $SIGN" \ -d @body.json
{
"chNFCom": "35260712345678000199620010000000011012345675",
"xJust": "Cancelamento por erro no faturamento do assinante",
"nProt": "3532600001234567"
}
{
"success": true,
"message": "NFCom cancelada",
"cStat": "135",
"xMotivo": "Evento registrado e vinculado a NFCom",
"nProt": "3532600001234568"
}