Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/gcapella0/agente-inteligente-expedientes/llms.txt

Use this file to discover all available pages before exploring further.

The validation endpoint performs a comprehensive, read-only audit of a dossier. It does not modify any data. Use it to determine whether a dossier is ready for formal submission, identify missing documents, flag contact-data gaps, and review OCR coverage across uploaded files.

GET /validacion/expediente/

Run a full audit of the dossier identified by cedula. Returns a structured result with per-document presence/state, data-integrity checks, OCR coverage, alert messages, and a single estado_general classification.
No authentication is required for this endpoint.

Path Parameters

cedula
string
required
Venezuelan ID number of the docente to audit (digits only), e.g. 12345678.

Query Parameters

detalle
boolean
default:"false"
Reserved for future use. Currently accepted but has no effect on the response payload.

Response

{
  "docente_cedula": "12345678",
  "validaciones": {
    "documentos_requeridos": {
      "cedula_identidad":              { "presente": true,  "estado_validacion": "aprobado",  "observaciones": null },
      "partida_nacimiento":            { "presente": true,  "estado_validacion": "pendiente", "observaciones": null },
      "rif":                           { "presente": true,  "estado_validacion": "aprobado",  "observaciones": null },
      "titulo_bachiller":              { "presente": true,  "estado_validacion": "aprobado",  "observaciones": null },
      "certificado_notas_bachillerato":{ "presente": true,  "estado_validacion": "aprobado",  "observaciones": null },
      "titulo_universitario":          { "presente": false, "estado_validacion": "N/A",       "observaciones": null },
      "certificado_notas_pregrado":    { "presente": false, "estado_validacion": "N/A",       "observaciones": null },
      "fondo_negro_titulo":            { "presente": false, "estado_validacion": "N/A",       "observaciones": null },
      "acta_grado":                    { "presente": true,  "estado_validacion": "aprobado",  "observaciones": null },
      "resolucion_nombramiento":       { "presente": true,  "estado_validacion": "rechazado", "observaciones": "Firma ilegible" }
    },
    "integridad_datos": {
      "campos_contacto_validos": true,
      "email_principal_presente": true,
      "telefono_presente": false,
      "direccion_completa": false
    },
    "ocr_completeness": {
      "documentos_procesados_ocr": 5,
      "documentos_pendientes_ocr": 2,
      "confianza_promedio": 0.94
    }
  },
  "estado_general": "requiere_atencion",
  "alertas": [
    "Documento faltante: titulo_universitario",
    "Documento faltante: certificado_notas_pregrado",
    "Documento faltante: fondo_negro_titulo",
    "Teléfono no registrado",
    "Dirección incompleta"
  ],
  "es_apto_para_presentacion": false
}

Response Field Reference

docente_cedula
string
The cedula echoed back from the request path.
validaciones.documentos_requeridos
object
A fixed map of the 10 required document types (see list below). Each entry contains:
  • presente (boolean) — whether at least one document of this type exists in the dossier
  • estado_validacion (string) — the validacion.estado of the found document (pendiente, aprobado, rechazado, requiere_revision), or "N/A" if not present
  • observaciones (string | null) — reviewer notes from the document’s validacion.observaciones field
validaciones.integridad_datos
object
Contact and address completeness checks derived from the docente record:
  • campos_contacto_validostrue if the contacto sub-document is non-empty
  • email_principal_presentetrue if docente.contacto.email_personal is set
  • telefono_presentetrue if docente.contacto.telefono_principal is set
  • direccion_completatrue if docente.direccion.direccion_completa is set
validaciones.ocr_completeness
object
OCR coverage across all documents in the dossier (not just the 10 required):
  • documentos_procesados_ocr — count of documents where ocr.procesado == true
  • documentos_pendientes_ocr — count of documents where OCR has not yet run
  • confianza_promedio — arithmetic mean of ocr.confianza_promedio across processed documents (0 if none processed)
estado_general
string
Single classification derived from completeness percentage and alert count. The logic evaluates in priority order:
ValueCondition
aptocompletitud >= 100% AND alertas is empty
requiere_atencionNot apto AND completitud >= 50%
criticocompletitud < 50%
Note: a dossier with completitud >= 50% but outstanding alerts will be requiere_atencion, not apto. A dossier with completitud == 100% but at least one alert is also requiere_atencion.
alertas
array
Human-readable alert messages. Generated for:
  • Each missing required document: "Documento faltante: {tipo}"
  • Missing phone: "Teléfono no registrado"
  • Missing address: "Dirección incompleta"
es_apto_para_presentacion
boolean
true only when completitud == 100% and the alertas array is empty. Equivalent to estado_general == "apto".

The 10 Required Documents

The audit evaluates exactly these document types. A dossier reaches 100% completeness only when all 10 are present:
#TipoDocumento
1cedula_identidad
2partida_nacimiento
3rif
4titulo_bachiller
5certificado_notas_bachillerato
6titulo_universitario
7certificado_notas_pregrado
8fondo_negro_titulo
9acta_grado
10resolucion_nombramiento
The completeness percentage shown in estado_general logic is sourced from completitud.porcentaje on the docente document, which is recalculated automatically whenever documents are added, updated, or deleted.

Error Responses

StatusDetail
404"Docente no encontrado"
500"Error en validación"

curl Examples

# Quick audit (summary only)
curl "http://localhost:8000/validacion/expediente/12345678"

# With detail flag (future use)
curl "http://localhost:8000/validacion/expediente/12345678?detalle=true"
Run this endpoint before calling DELETE /expedientes/{cedula} or generating an export, to capture the dossier’s readiness state as a pre-flight check.

Build docs developers (and LLMs) love