---
updatedAt: 2026-09-17T12:13:51.000Z
agentTools:
  projectIndex: https://readme.floid.io/llms.txt
---

# Resolver Solicitud de Derecho

# Resolver Solicitud de Derecho

`POST /cl/consent_manager/resolve_rights_request`

Resuelve un caso `RECEIVED` y lo cierra (`RESOLVED`). Puede aplicar **efectos** internos sobre los tratamientos del caso: `CONSENT_REVOKED` y `PROCESSING_TERMINATED`. Todo se persiste en **una transacción atómica** (todo o nada): si un efecto falla, el caso permanece `RECEIVED` y no queda ningún efecto parcial.

Una resolución **sin efectos** registra `REQUEST_RESOLVED`, conserva la respuesta/metadatos y deja el caso `RESOLVED` sin cambiar ningún tratamiento.

* **URL de producción:** `https://api.floid.app/cl/consent_manager/resolve_rights_request`
* **URL de sandbox:** `https://sandbox.floid.app/cl/consent_manager/resolve_rights_request`

***

## Headers requeridos

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

***

## Parámetros del body

| Campo                      | Tipo              | Requerido | Descripción                                                            |
| -------------------------- | ----------------- | --------- | ---------------------------------------------------------------------- |
| `rights_request_id`        | string (UUID)     | Sí        | Caso a resolver (debe estar `RECEIVED`).                               |
| `occurred_at`              | string (ISO 8601) | Sí        | Momento de la resolución (tolerancia futura de 5 min).                 |
| `resolution_message`       | string            | Sí        | Respuesta del responsable.                                             |
| `effects`                  | array             | No        | Efectos a aplicar. **Debe ser un arreglo** (aunque contenga uno solo). |
| `operational_code`         | string            | No        | Código operacional de la resolución.                                   |
| `metadata`                 | object            | No        | Metadatos libres.                                                      |
| `duplicate_protection_key` | string            | No        | Idempotencia por tenant.                                               |

### `effects[]`

| Campo                | Tipo          | Requerido   | Descripción                                                              |
| -------------------- | ------------- | ----------- | ------------------------------------------------------------------------ |
| `data_processing_id` | string (UUID) | Sí          | Tratamiento objetivo. Debe ser uno de los `targets` del caso.            |
| `effect_type`        | string        | Sí          | `CONSENT_REVOKED` o `PROCESSING_TERMINATED`.                             |
| `medium`             | string        | Condicional | Obligatorio para `CONSENT_REVOKED` (`ELECTRONIC`, `VERBAL`, `PHYSICAL`). |
| `operational_code`   | string        | No          | Código operacional del efecto.                                           |

> Cada efecto genera un evento en el tratamiento con `origin` de sólo lectura `{ type: "RIGHTS_REQUEST", rights_request_id, rights_request_effect_id }`.

***

## Ejemplo (resolución con un efecto)

```bash
curl --location 'https://api.floid.app/cl/consent_manager/resolve_rights_request' \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer {{TOKEN}}' \
  --data '{
    "rights_request_id": "9c1f4b2a-77de-4a10-9b33-1e2f3a4b5c6d",
    "occurred_at": "2026-09-15T00:00:00.000Z",
    "resolution_message": "Se elimina el tratamiento a solicitud del titular.",
    "effects": [
      { "data_processing_id": "550e8400-e29b-41d4-a716-446655440000", "effect_type": "CONSENT_REVOKED", "medium": "ELECTRONIC" }
    ]
  }'
```

***

## Respuesta exitosa (200)

```json
{
  "code": 200,
  "message": "RightsRequest resolved",
  "caseid": "b3f1c2a4-9e77-4c31-8a10-2f6d5e7a1b90",
  "data": {
    "rights_request_id": "9c1f4b2a-77de-4a10-9b33-1e2f3a4b5c6d",
    "status": "RESOLVED",
    "resolved_at": "2026-09-15T00:00:00.000Z",
    "received_at": "2026-09-12T09:15:00.000Z",
    "resolution_message": "Se elimina el tratamiento a solicitud del titular.",
    "effects": [
      {
        "rights_request_effect_id": "7a6b5c4d-1122-4e33-9f44-556677889900",
        "data_processing_id": "550e8400-e29b-41d4-a716-446655440000",
        "effect_type": "CONSENT_REVOKED",
        "data_processing_event_id": "e11a22bb-33cc-44dd-55ee-66ff77aa88bb"
      }
    ]
  }
}
```

### Estructura de `data`

| Campo                | Tipo              | Descripción                                                           |
| -------------------- | ----------------- | --------------------------------------------------------------------- |
| `rights_request_id`  | string            | Identificador público del caso.                                       |
| `status`             | string            | `RESOLVED` tras una resolución exitosa.                               |
| `resolved_at`        | string (ISO 8601) | Momento de resolución.                                                |
| `received_at`        | string (ISO 8601) | Momento de recepción original del caso.                               |
| `resolution_message` | string            | Respuesta del responsable.                                            |
| `effects`            | array             | Efectos ejecutados (ver tabla). Vacío en una resolución sin efectos.  |
| `replayed`           | boolean           | Presente y `true` cuando el request fue una reproducción idempotente. |

#### `effects[]`

| Campo                      | Tipo   | Descripción                                      |
| -------------------------- | ------ | ------------------------------------------------ |
| `rights_request_effect_id` | string | Identificador público del efecto.                |
| `data_processing_id`       | string | Tratamiento afectado.                            |
| `effect_type`              | string | `CONSENT_REVOKED` o `PROCESSING_TERMINATED`.     |
| `data_processing_event_id` | string | Evento generado en el tratamiento por el efecto. |

***

## Errores

| HTTP | `error_code`                                             | Cuándo                                                    |
| ---- | -------------------------------------------------------- | --------------------------------------------------------- |
| 400  | `VALIDATION_ERROR`                                       | `effects` no es un arreglo.                               |
| 400  | `RESOLUTION_MESSAGE_REQUIRED`                            | Falta `resolution_message`.                               |
| 400  | `OCCURRED_AT_REQUIRED` / `OCCURRED_AT_TOO_FAR_IN_FUTURE` | `occurred_at` ausente, inválido o demasiado futuro.       |
| 404  | `RIGHTS_REQUEST_NOT_FOUND`                               | El caso no existe o no pertenece a tu cliente.            |
| 409  | `RIGHTS_REQUEST_ALREADY_RESOLVED`                        | El caso ya fue resuelto.                                  |
| 409  | `EFFECT_TARGET_NOT_IN_REQUEST`                           | Un efecto apunta a un tratamiento fuera del caso.         |
| 409  | `EFFECT_TYPE_NOT_ALLOWED`                                | El efecto no es válido para el tratamiento.               |
| 400  | `MEDIUM_REQUIRED`                                        | Falta `medium` en un efecto `CONSENT_REVOKED`.            |
| 409  | `DUPLICATE_PROTECTION_KEY_PAYLOAD_MISMATCH`              | La clave de idempotencia se reutilizó con otro contenido. |
| 500  | `INTERNAL_ERROR`                                         | Error inesperado del servidor.                            |