POST
/api/cte/cancelCancel CT-e
Cancels an authorized CT-e (event 110111). Requires that the CT-e has been authorized (has a protocol) and is not yet cancelled. Only CT-e documents issued through this platform can be cancelled.
Required headers
tokenstring | string | Token of the issuing company |
signstring | string | MD5 signature |
timestampstring | string | Unix timestamp in seconds |
Body
chCTe*string | string | Access key of the CT-e (44 digits) |
xJust*string | string | Cancellation justification (minimum 15 characters as required by the tax authority) |
nProtstring | string | Authorization protocol. Optional: when omitted, uses the protocol registered at issuance |
* 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/cte/cancel" \ -H "Content-Type: application/json" \ -H "token: $TOKEN" \ -H "timestamp: $TIMESTAMP" \ -H "sign: $SIGN" \ -d @body.json
{
"chCTe": "35260626638419000167570010000000011123456780",
"xJust": "Cancelamento por erro no preenchimento dos dados da prestacao"
}
{
"success": true,
"message": "Evento registrado e vinculado a CT-e",
"cStat": "135",
"chCTe": "35260626638419000167570010000000011123456780",
"nProt": "135260000123457",
"xml": "https://storage.../cte/35260626638419000167570010000000011123456780.xml"
}