Revocar Consentimiento

Revocar Consentimiento

POST /cl/consent_manager/revoke_processing

Registra un CONSENT_REVOKED sobre un tratamiento de consentimiento. Sólo aplica a tratamientos con legal_basis = CONSENT; en otras bases usa terminate_processing.

  • URL de producción: https://api.floid.app/cl/consent_manager/revoke_processing
  • URL de sandbox: https://sandbox.floid.app/cl/consent_manager/revoke_processing

Headers requeridos

Authorization: Bearer {{TOKEN}}
Content-Type: application/json

Parámetros del body

CampoTipoRequeridoDescripción
processing_idstring (UUID)Tratamiento a revocar.
occurred_atstring (ISO 8601)Momento real de la revocación. Debe ser posterior al inicio del tratamiento.
mediumstringMedio: ELECTRONIC, VERBAL, PHYSICAL.
operational_codestringNoCódigo operacional de la revocación.
metadataobjectNoMetadatos libres.
duplicate_protection_keystringNoIdempotencia por tenant.

Campos prohibidos: subject_external_id, subject_snapshot, activity_code, business_reference, terms_and_conditions, tc_version_id, evidence, expires_at, redec. Incluir cualquiera devuelve INVALID_FIELD_FOR_CONSENT_REVOKED.


Ejemplo

curl --location 'https://api.floid.app/cl/consent_manager/revoke_processing' \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer {{TOKEN}}' \
  --data '{
    "processing_id": "550e8400-e29b-41d4-a716-446655440000",
    "occurred_at": "2026-09-20T10:00:00.000Z",
    "medium": "ELECTRONIC",
    "operational_code": "crm-revoke-01"
  }'

Respuesta exitosa (200)

{
  "code": 200,
  "message": "Consent revoked",
  "caseid": "b3f1c2a4-9e77-4c31-8a10-2f6d5e7a1b90",
  "data": {
    "data_processing_id": "550e8400-e29b-41d4-a716-446655440000",
    "data_processing_event_id": "e11a22bb-33cc-44dd-55ee-66ff77aa88bb",
    "event_type": "CONSENT_REVOKED",
    "occurred_at": "2026-09-20T10:00:00.000Z",
    "received_at": "2026-09-20T10:00:03.000Z",
    "status": "REVOKED",
    "legal_basis": "CONSENT",
    "legal_framework": "REDEC",
    "subject_external_id": "customer-8293",
    "subject_snapshot": { "subject_type": "NATURAL", "subject_identification": { "type": "CL_RUT", "value": "12.345.678-5" } },
    "activity": { "code": "marketing-redec", "version_number": 3 },
    "terms_and_conditions": { "version": 2, "title": "Términos de marketing", "status": "PUBLISHED", "snapshot_url": "https://cdn.floid.app/tc/marketing-v2.pdf", "hash": "9f2b...e7" },
    "validity": { "ends_at": "2026-09-25T13:00:00.000Z", "end_mode": "FIXED_DURATION_FROM_FACT", "ended_at": "2026-09-20T10:00:00.000Z" },
    "evidence_status": "RECEIVED",
    "evidence_due_at": null,
    "evidence": [],
    "operational_code": "crm-revoke-01",
    "business_reference": null,
    "metadata": null,
    "redec": { "consent_id": "institution-consent-001", "institution_code": "1234", "purpose": "2", "objective": "02", "executive_rut": "98765432-1" },
    "replayed": false,
    "origin": null
  }
}

Estructura de data

Misma forma que create_processing, con event_type = CONSENT_REVOKED, status = REVOKED y validity.ended_at con la fecha de la revocación. Campos adicionales:

CampoTipoDescripción
originobjectOrigen de sólo lectura. null en revocaciones directas; { type: "RIGHTS_REQUEST", rights_request_id, rights_request_effect_id } si proviene de la resolución de una solicitud de derecho.
replayedbooleantrue si el request fue una reproducción idempotente.

Errores

HTTPerror_codeCuándo
400DATA_PROCESSING_ID_REQUIREDFalta processing_id.
400OCCURRED_AT_REQUIRED / OCCURRED_AT_INVALIDoccurred_at ausente o inválido.
400MEDIUM_REQUIRED / MEDIUM_INVALIDmedium ausente o fuera de catálogo.
400INVALID_FIELD_FOR_CONSENT_REVOKEDSe enviaron campos prohibidos.
400REVOCATION_BEFORE_ORIGINoccurred_at anterior al inicio del tratamiento.
404PROCESSING_NOT_FOUNDEl tratamiento no existe o no pertenece a tu cliente.
409DATA_PROCESSING_NOT_CONSENTEl tratamiento no fue creado desde un consentimiento.
409DATA_PROCESSING_ALREADY_REVOKED / DATA_PROCESSING_FINALIZEDEl tratamiento ya fue revocado o está finalizado.
500INTERNAL_ERRORError inesperado del servidor.