POST
/api/mdfe/cancelCancel MDF-e
Cancels an authorized MDF-e. Window: up to 24 hours after authorization. Not allowed if the MDF-e has already been closed.
Required headers
tokenstring | string | Token of the issuing company |
signstring | string | MD5 signature |
timestampstring | string | Unix timestamp in seconds |
Body
chMDFe*string | string | Access key of the MDF-e (44 digits) |
xJust*string | string | Cancellation justification (minimum 15 characters per tax authority requirement) |
* 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/mdfe/cancel" \ -H "Content-Type: application/json" \ -H "token: $TOKEN" \ -H "timestamp: $TIMESTAMP" \ -H "sign: $SIGN" \ -d @body.json
{
"chMDFe": "35260512345678000199580010000000011000000018",
"xJust": "Cancelamento por erro no preenchimento dos dados do veiculo"
}
{
"success": true,
"message": "Evento registrado e vinculado a MDF-e",
"cStat": "135",
"chMDFe": "35260512345678000199580010000000011000000018",
"nProt": "135260000123457",
"xml": "https://storage.../mdfe/35260512345678000199580010000000011000000018.xml"
}