Oten Tecnologia
Oten Fiscal
Documentation
POST/nfse/cancelar/{idNota}

Request invoice cancellation

Requests NFS-e cancellation by ID. Notes: - Only invoices with status CONCLUIDO can be canceled. - After a successful cancellation the webhook fires and the invoice status becomes CANCELADO. - Some cities require a cancellation code in the body. National NFS-e codes: - 1 — Issuance error - 2 — Service not provided - 9 — Other By default, national NFS-e uses code 9 and the reason “Cancellation requested by the provider”.

Production: https://api.otentecnologia.com.brSandbox: https://api.sandbox.otentecnologia.com.br

Parameters

This route has no path or query parameters.

Request

cURL
curl -X POST 'https://api.otentecnologia.com.br/nfse/cancelar/{idNota}' \
  -H 'x-api-key: $OTEN_API_KEY' \
  -H 'Content-Type: application/json'

Responses

200OK
JSON
{
  "message": "Cancelamento em processamento",
  "data": {
    "protocol": "888738ef-e738-427f-a391-44ea7b497644"
  }
}
400Bad Request
JSON
{
  "error": {
    "message": "A ação de Cancelar NFSe é permitida apenas para notas com status CONCLUIDO",
    "data": {
      "id": "0000000000",
      "idIntegracao": "XXXYY999",
      "status": "PROCESSANDO"
    }
  }
}
401Unauthorized
JSON
{
  "error": {
    "message": "O token informado é inválido. Para o ambiente de produção, Acesse https://www.otentecnologia.com.br/, e gere o seu TOKEN de acesso"
  }
}
404Not Found
JSON
{
  "error": {
    "message": "Não localizamos qualquer NFSe com os parâmetros informados",
    "data": {
      "id": "0000000000"
    }
  }
}