Every academic document in the system is linked to a docente via theirDocumentation 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.
cedula (Venezuelan ID number). Documents carry rich metadata: the physical file location, file hash, OCR processing results (including extracted structured fields), visual-verification state, and a four-state validation workflow (pendiente → aprobado | rechazado | requiere_revision).
TipoDocumento Values
Thetipo field on every document must be one of the following 22 values defined in TipoDocumento:
| Value | Description |
|---|---|
cedula_identidad | Venezuelan national ID card |
rif | Tax identification (RIF) |
partida_nacimiento | Birth certificate |
titulo_bachiller | High-school diploma |
titulo_universitario | Undergraduate degree title |
titulo_postgrado | Postgraduate degree title |
certificado_notas_bachillerato | High-school transcript |
certificado_notas_pregrado | Undergraduate transcript |
certificado_notas_postgrado | Postgraduate transcript |
acta_grado | Graduation record/act |
fondo_negro_titulo | Official notarized title copy (fondo negro) |
nostrificacion | Foreign degree recognition (nostrificación) |
resolucion_nombramiento | Institutional appointment resolution |
evaluacion_docente | Teaching performance evaluation |
diploma_curso | Short-course diploma |
diploma_taller | Workshop diploma |
diploma_congreso | Conference/congress diploma |
constancia_trabajo | Employment certificate |
constancia_estudio | Study enrolment certificate |
carta_recomendacion | Letter of recommendation |
curriculo_vitae | Curriculum vitae |
otro | Other / miscellaneous |
GET /documentos/
Retrieve the complete detail record for a single document, including all OCR fields and file metadata.Path Parameters
MongoDB ObjectId of the document (24-character hex string).
Response
Physical file metadata. Key sub-fields:
ruta— server-side path underdata/storage/nombre_original— filename as uploadedformato— file extension:pdf,jpg,jpeg, orpngtamano_bytes— file size in bytes (max allowed: 25 MB = 26,214,400 bytes)hash_sha256— SHA-256 integrity hashcomprimido— whether the file was compressed at restratio_compresion— compression ratio if compressed, otherwisenull
OCR processing results. Key sub-fields:
procesado— whether OCR has run on this documentconfianza_promedio— average confidence score (0.0–1.0)idioma_detectado— ISO 639-1 language code, typically"es"paginas— number of pages processedcampos_extraidos— structured key/value pairs extracted from the document text
Current validation state:
pendiente, aprobado, rechazado, or requiere_revision.| Status | Detail |
|---|---|
422 | "ID de documento inválido" — not a valid MongoDB ObjectId |
404 | "Documento no encontrado" |
500 | "Error de base de datos" |
GET /documentos//validacion
Retrieve a structured validation audit for a document — format compliance, file size, and OCR reliability — plus a singlees_valido_para_expediente boolean.
Path Parameters
MongoDB ObjectId (24-character hex string).
Response
true when the file’s formato is one of pdf, jpg, jpeg, or png.true when tamano_bytes <= 26,214,400 (25 MB).true when idioma_detectado == "es".Mirror of
ocr.campos_extraidos — structured key/value pairs parsed by the OCR engine.true only when all three conditions hold:formato.valido == trueformato.tamano_dentro_rango == truevalidacion.estado == "aprobado"
| Status | Detail |
|---|---|
422 | Invalid MongoDB ObjectId |
404 | Document not found |
POST /documentos//agregar-documento
Add a new document record to an existing dossier. JWT (admin) required. The document is created withvalidacion.estado = "pendiente" and ocr.procesado = false. OCR processing is triggered separately by the background agent.
Path Parameters
Venezuelan ID number of the docente who owns this document.
Request Body (application/json)
Document type — must be a valid
TipoDocumento value.Human-readable document name.
Optional description or notes about the document.
Server-side path to the physical file (relative to the project root).
Original filename as provided by the uploader.
File extension:
pdf, jpg, jpeg, or png.File size in bytes.
Response (201 Created)
mongo.update_completitud(cedula) is called automatically to recalculate the dossier’s completeness percentage.
Error responses:
| Status | Detail |
|---|---|
401 | Missing or invalid JWT |
403 | Authenticated user does not have the admin role |
404 | Docente not found |
PATCH /documentos//validacion
Update the validation state of a document. JWT (admin) required. After the update, dossier completeness is recalculated.Path Parameters
MongoDB ObjectId of the document.
Request Body (application/json)
New validation state. Must be one of:
pendiente, aprobado, rechazado, requiere_revision.Optional reviewer notes stored in
validacion.observaciones.Response
| Status | Detail |
|---|---|
401 | Missing or invalid JWT |
403 | Authenticated user does not have the admin role |
422 | Invalid ObjectId or estado value not in allowed set |
404 | Document not found |
DELETE /documentos/
Permanently delete a document record from MongoDB. JWT (admin) required. The physical file indata/storage/ is not removed by this endpoint. Dossier completeness is recalculated after deletion.
Path Parameters
MongoDB ObjectId of the document to delete.
Response
| Status | Detail |
|---|---|
401 | Missing or invalid JWT |
403 | Authenticated user does not have the admin role |
422 | Invalid MongoDB ObjectId format |
404 | Document not found |
Every write operation (POST, PATCH, DELETE) is logged to the
auditoria MongoDB collection with the authenticated user’s identity (sub from the JWT), the affected docente_cedula, and a human-readable detalles string.