Terminar Tratamiento
Terminar Tratamiento
POST /cl/consent_manager/terminate_processing
Registra un PROCESSING_TERMINATED (término informado por el responsable). Sólo aplica a tratamientos cuya Activity usa term_policy = TERMINATION_DEFINED_BY_CONTROLLER (típicamente CONTRACT, LEGITIMATE_INTEREST o la opción configurada de LEGAL_OBLIGATION). No aplica a CONSENT (usa revoke_processing) ni a RETENTION_PERIOD_FROM_ANCHOR.
- URL de producción:
https://api.floid.app/cl/consent_manager/terminate_processing - URL de sandbox:
https://sandbox.floid.app/cl/consent_manager/terminate_processing
Headers requeridos
Authorization: Bearer {{TOKEN}}
Content-Type: application/json
Parámetros del body
| Campo | Tipo | Requerido | Descripción |
|---|---|---|---|
processing_id | string (UUID) | Sí | Tratamiento a terminar. |
occurred_at | string (ISO 8601) | Sí | Momento real del término. Posterior al inicio del tratamiento. |
operational_code | string | No | Código operacional del término. |
metadata | object | No | Metadatos libres. |
duplicate_protection_key | string | No | Idempotencia por tenant. |
Campos prohibidos:
subject_external_id,subject_snapshot,activity_code,business_reference,medium,expires_at,terms_and_conditions,tc_version_id,evidence,redec. Incluir cualquiera devuelveINVALID_FIELD_FOR_PROCESSING_TERMINATED.
Ejemplo
curl --location 'https://api.floid.app/cl/consent_manager/terminate_processing' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {{TOKEN}}' \
--data '{
"processing_id": "770e8400-e29b-41d4-a716-446655440111",
"occurred_at": "2026-09-22T18:30:00.000Z",
"operational_code": "ops-terminate-77"
}'Respuesta exitosa (200)
{
"code": 200,
"message": "Processing terminated",
"caseid": "b3f1c2a4-9e77-4c31-8a10-2f6d5e7a1b90",
"data": {
"data_processing_id": "770e8400-e29b-41d4-a716-446655440111",
"data_processing_event_id": "aa11bb22-cc33-44dd-55ee-66ff77aa88bb",
"event_type": "PROCESSING_TERMINATED",
"occurred_at": "2026-09-22T18:30:00.000Z",
"received_at": "2026-09-22T18:30:04.000Z",
"status": "TERMINATED",
"legal_basis": "CONTRACT",
"legal_framework": "LPDP",
"subject_external_id": "customer-8293",
"subject_snapshot": { "subject_type": "NATURAL", "subject_identification": { "type": "CL_RUT", "value": "12.345.678-5" } },
"activity": { "code": "onboarding-contrato", "version_number": 1 },
"terms_and_conditions": null,
"validity": { "ends_at": null, "end_mode": "TERMINATION_DEFINED_BY_CONTROLLER", "ended_at": "2026-09-22T18:30:00.000Z" },
"evidence_status": "NOT_REQUIRED",
"evidence_due_at": null,
"evidence": [],
"operational_code": "ops-terminate-77",
"business_reference": null,
"metadata": null,
"redec": null,
"replayed": false,
"origin": null
}
}Estructura de data
dataMisma forma que create_processing, con event_type = PROCESSING_TERMINATED, status = TERMINATED y validity.ended_at con la fecha del término. Incluye origin (igual que en revoke_processing: null salvo que provenga de una solicitud de derecho) y replayed.
Errores
| HTTP | error_code | Cuándo |
|---|---|---|
| 400 | DATA_PROCESSING_ID_REQUIRED | Falta processing_id. |
| 400 | OCCURRED_AT_REQUIRED / OCCURRED_AT_INVALID | occurred_at ausente o inválido. |
| 400 | INVALID_FIELD_FOR_PROCESSING_TERMINATED | Se enviaron campos prohibidos. |
| 400 | TERMINATION_BEFORE_ORIGIN | occurred_at anterior al inicio del tratamiento. |
| 404 | PROCESSING_NOT_FOUND | El tratamiento no existe o no pertenece a tu cliente. |
| 409 | TERMINATION_NOT_ALLOWED_FOR_ACTIVITY | La Activity no usa TERMINATION_DEFINED_BY_CONTROLLER. |
| 409 | DATA_PROCESSING_ALREADY_TERMINATED / DATA_PROCESSING_FINALIZED | El tratamiento ya terminó o está finalizado. |
| 500 | INTERNAL_ERROR | Error inesperado del servidor. |
Updated about 10 hours ago
