Obtener Consentimiento

Obtener Consentimiento

POST /cl/consent_manager/get_consent

Devuelve el detalle completo de un consentimiento.

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

Contrato en inglés. Los nombres de los campos del request y de la respuesta van en inglés. Los errores usan el envelope legacy con un error_code granular.


Headers requeridos

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

Identificador

Envía el consent_token en el body:

CampoTipoRequeridoDescripción
consent_tokenstringUUID Floid devuelto por create_consent.

Si no lo envías, la API devuelve MISSING_CONSENT_IDENTIFIER (400). Si no corresponde a ningún consentimiento de tu cliente, devuelve CONSENT_NOT_FOUND (404).


Ejemplo

curl --location 'https://api.floid.app/cl/consent_manager/get_consent' \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer {{TOKEN}}' \
  --data '{ "consent_token": "550e8400-e29b-41d4-a716-446655440000" }'

Respuesta exitosa (200)

El data es el objeto del consentimiento directamente (campos en inglés).

{
  "code": 200,
  "msg": "OK",
  "caseid": "550e8400-e29b-41d4-a716-446655440000",
  "data": {
    "id": 12345,
    "consent_token": "550e8400-e29b-41d4-a716-446655440000",
    "client_id": 42,
    "framework": "REDEC",
    "person_type": "NATURAL",
    "person_rut": "12345678-9",
    "person_name": "GARCIA/PEREZ/JUAN CARLOS",
    "person_email": "[email protected]",
    "person_phone": "+56912345678",
    "institution_code": "123456789",
    "internal_code": "BCH-NAT-001",
    "purpose": 2,
    "objective": "02",
    "medium": 1,
    "executive_rut": "98765432-1",
    "state": "ACTIVE",
    "validity_origin": "REDEC_REGULATION",
    "granted_date": "20260512",
    "granted_time": "143022",
    "expiration_date": "20260602",
    "expiration_time": "235959",
    "accepted_at": "2026-05-12T14:30:22.000Z",
    "expires_at": "2026-06-02T23:59:59.000Z",
    "revoked_at": null,
    "evidence_url": "https://institution.com/evidence/consent-001.pdf",
    "evidence_hash": "0F6400343D627EEF5A5346BC3E8006EE17B888D9D37945959602A5EC28980A47",
    "evidence_status": "SUCCESS",
    "evidence_file_format": "PDF_A",
    "created_by": "GATEWAY_API",
    "has_attorneys": false,
    "caseid": "550e8400-e29b-41d4-a716-446655440000"
  }
}

Para una persona jurídica (person_type: "JURIDICA"), la respuesta también incluye el objeto company y, cuando corresponde, el arreglo attorneys — todos con claves en inglés.


Errores

error_codeerror_typeHTTPCuándo
MISSING_CONSENT_IDENTIFIERGATEWAY400No se envió consent_token en el body.
CONSENT_NOT_FOUNDNOT_FOUND404El consent_token no existe para tu cliente.
INTERNAL_ERRORINTERNAL500Error de base de datos o excepción no controlada.