The export endpoint streams a complete academic dossier as a downloadable file in your choice of JSON, XML, or CSV format. The response is delivered as aDocumentation 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.
StreamingResponse with a Content-Disposition: attachment header, so browsers and HTTP clients save it directly to disk without buffering the entire payload in memory first.
GET /expedientes//exportar
Export a full dossier to a structured file. All three formats include the docente profile, institutional link, formation data, completeness metrics, and — when enabled — document metadata and raw OCR text.No authentication is required for this endpoint.
Path Parameters
Venezuelan ID number of the docente to export (digits only), e.g.
12345678.Query Parameters
Output format. Accepted values:
json, xml, csv.
Passing any other value returns HTTP 415 Unsupported Media Type.When
true, the export includes a documentos array with the metadata for every document in the dossier (type, name, validation state, basic OCR fields). Set to false to export only the docente record.When
true, each document entry in the documentos array also includes ocr.texto_completo — the full raw text extracted by the OCR engine. This can significantly increase file size for multi-page documents. Ignored when incluir_documentos=false.Response Headers
| Header | Value |
|---|---|
Content-Disposition | attachment; filename=expediente_{cedula}.{formato} |
Content-Type | application/json / application/xml / text/csv |
JSON Response Structure
The JSON export is a single object with the following top-level keys:The dossier’s assigned reference number (e.g.
EXP-2024-0042), or null if not yet assigned.Core identity fields:
cedula, nombres, apellidos, and fecha_nacimiento (serialized as a string).Academic formation entries from the docente record. Each item typically includes
titulo, institucion, and ano_graduacion.Institutional affiliation: department, campus, current role, academic category, dedication, and contract type.
Dossier completeness summary:
porcentaje (integer 0–100) and documentos_faltantes (list of missing required types).Present only when
incluir_documentos=true. Each entry contains _id, tipo, nombre, validacion, and ocr (summary). When incluir_ocr=true, each ocr object additionally includes texto_completo.XML Format
Whenformato=xml, the endpoint returns a well-formed XML document that mirrors the JSON structure. The root element is <expediente>. Dicts become named XML elements; arrays become <{key}> wrappers with <item> children.
CSV Format
Whenformato=csv, the dossier is exported as a two-column key/value file with dotted-path keys derived by flattening the JSON structure. List fields are represented by a count of their items rather than individual rows.
In CSV format, nested arrays (such as
documentos or formacion_academica) are collapsed to a single row containing the item count, not individual entries. Use JSON or XML if you need per-document rows.Error Responses
| Status | Detail |
|---|---|
404 | "Docente no encontrado" |
415 | "Formato no soportado. Use json, xml o csv." |
500 | "Error en exportación" |