Richiesta cancellazione dati

POST [baseUrl]/api/sync/v1/RequestDataCancellation

Descrizione

Questa API avvia la richiesta di cancellazione dati dell'utente autenticato. Invia un codice OTP alla mail predefinita dell'utente e restituisce il token da usare con Conferma cancellazione dati.

L'OTP scade dopo 10 minuti.

INFO

La chiamata è consentita solo con header AccessToken valido. Chiavi API o IP autorizzati, senza utente loggato, non sono sufficienti.

Parametri Richiesta

Field Type Required Default Description Notes
OTPLength int ❌ 5 Lunghezza del codice OTP da inviare Se assente, se il body è vuoto oppure se il valore non è positivo, viene usato 5

Esempio Richiesta

sh
curl --location '[baseUrl]/api/sync/v1/RequestDataCancellation' \
--header 'AccessToken: {{token}}' \
--header 'Content-Type: application/json' \
--data '{
    "OTPLength": 5
}'

Risposta

Esito positivo

JSON
{
  "statusCode": 200,
  "errorCode": null,
  "message": null,
  "result": {
    "totalCount": 0,
    "totalPages": 0,
    "page": 0,
    "count": 0,
    "records": null,
    "record": {
      "Token": "18c3c16f2039496c9298f2e81fd3942f",
      "Expiration": "2026-10-28T20:10:00.0000000+01:00"
    }
  },
  "debug": null
}

Non autorizzato

JSON
{
  "statusCode": 403,
  "errorCode": "4x003",
  "message": "Not authorized.",
  "result": null,
  "debug": null
}

Body non valido

JSON
{
  "statusCode": 400,
  "errorCode": "4x001",
  "message": "The parameters present in the body do not have a valid JSON format.",
  "result": null,
  "debug": null
}

Mail non presente

Se l'utente non esiste oppure non ha una mail predefinita configurata:

JSON
{
  "statusCode": 521,
  "errorCode": "5x021",
  "message": "OTP mail failed.",
  "result": null,
  "debug": null
}