Skip to content
GitHub

Legal Representatives Service

El LegalRepService gestiona los representantes legales de la empresa, permitiendo registrar apoderados con sus facultades y estados.

flowchart LR
    subgraph Frontend
        LR[LegalRepresentativesViewIsland]
    end
    
    subgraph Orchestrator
        R["/api/admin/representatives"]
        S[LegalRepService]
        Repo[LegalRepRepository]
    end
    
    subgraph Database
        T["administracion.representantes_legales"]
    end
    
    LR -->|HTTPS| R
    R --> S
    S --> Repo
    Repo -->|SQL| T

Lista representantes legales.

Query Parameters:

ParámetroTipoDescripción
activeOnlybooleanSolo representantes activos

Respuesta exitosa (200):

[
{
"id": "uuid",
"rut": "12.345.678-9",
"nombres": "Juan Alberto",
"apellido_paterno": "Pérez",
"apellido_materno": "González",
"email": "[email protected]",
"telefono": "+56 9 1234 5678",
"tipo_representacion": "APODERADO_GENERAL",
"facultades": ["FIRMAR_CONTRATOS", "REPRESENTAR_JUICIO", "ABRIR_CUENTAS"],
"fecha_inicio": "2020-01-15",
"fecha_termino": null,
"activo": true,
"es_principal": true
}
]

Obtiene un representante por ID.

Crea un nuevo representante.

Request Body:

{
"rut": "12.345.678-9",
"nombres": "Juan Alberto",
"apellido_paterno": "Pérez",
"apellido_materno": "González",
"email": "[email protected]",
"telefono": "+56 9 1234 5678",
"tipo_representacion": "APODERADO_GENERAL",
"facultades": ["FIRMAR_CONTRATOS", "REPRESENTAR_JUICIO"],
"fecha_inicio": "2025-01-01"
}

Actualiza un representante existente.

Elimina un representante.

POST /api/admin/representatives/:id/set-active

Section titled “POST /api/admin/representatives/:id/set-active”

Establece un representante como principal (ADMIN requerido).

Comportamiento:

  • Desactiva el representante principal anterior
  • Activa el representante indicado como principal
TipoDescripción
APODERADO_GENERALPoderes amplios para todo tipo de actos
APODERADO_ESPECIALPoderes limitados a actos específicos
DIRECTORMiembro del directorio
GERENTE_GENERALGerente con poderes de representación
SOCIO_ADMINISTRADORSocio con facultades de administración
CódigoDescripción
FIRMAR_CONTRATOSSuscribir contratos comerciales
REPRESENTAR_JUICIOActuar en procedimientos judiciales
ABRIR_CUENTASAbrir cuentas bancarias
FIRMAR_ESCRITURASSuscribir escrituras públicas
CONTRATAR_PERSONALContratar y despedir trabajadores
OPERAR_BANCARIORealizar operaciones bancarias
  • Directoryorchestrator/src/
    • Directoryroutes/admin/
      • representatives.ts
    • Directorydomain/legal-representatives/
      • LegalRepService.ts
      • LegalRepRepository.ts
      • types.ts