The Export API allows authenticated users to download filtered snapshots of the inventory as PDF or Excel files. It aggregates data from both theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Danielings/Pasantia-Proyecto/llms.txt
Use this file to discover all available pages before exploring further.
equipos and perifericos Firestore collections, applies the same sede-scoping rules as GET /api/componentes (Superadministradores see all records; other roles see only their own sede), and then applies any additional query-parameter filters before generating the file.
PDF output is a landscape A4 document with a styled table and alternating row shading. Excel output is a single-sheet .xlsx workbook with seven fixed columns. Both formats use the same underlying filtered dataset, so the row count in the file matches what the UI displays.
GET /api/export/tipos
Returns an alphabetically sorted array of all canonical asset type strings currently present in the inventory. The list is derived dynamically from the actual documents in Firestore rather than a static enum, so new types appear automatically once at least one asset of that type is registered. Auth: Required.Request
No parameters.Response
Returns a JSON array of strings:A canonical type label, capitalized consistently via the
CANONICAL_TIPOS map (e.g., "PC", "Laptop", "Monitor", "Mouse", "Teclado", "Switch", "Impresora", "Corneta").Example
GET /api/export/descargar
Generate and download a filtered inventory report. The response body is a binary file stream — either a PDF or an Excel workbook — with appropriateContent-Type and Content-Disposition headers so that browsers and curl can save it directly to disk.
Auth: Required.
The generated PDF title includes the applied type label and the total record count, for example:
"Inventario — Monitor (12 registros)". For a full inventory report, the title reads "Inventario — Información completa (N registros)".Request
Output format. Must be
"pdf" or "excel" (case-insensitive).Asset type to include. Pass
"completa" or "completo" (or omit entirely) to include all types. Pass a canonical type string such as "Monitor" or "PC" to restrict to one type.Comma-separated list of condition values to include (e.g.,
"Bueno,Regular"). Items not matching any of the listed states are excluded.Comma-separated list of model names to include (e.g.,
"S24F350,K120"). Exact match against the stored modelo field.Comma-separated list of office names to include (e.g.,
"Torre Norte,Oficina Central"). Matched against the sede field of the deployment location.Comma-separated list of asset types to include. Provides multi-type filtering when you need more than one type but not all (e.g.,
"Monitor,Teclado,Mouse"). This filter is applied in addition to — and independently of — the tipo parameter.Free-text search string. Matched against the normalized
marca and serial fields of each record. A record is included if either field contains the search string as a substring (case-insensitive, accent-insensitive).Response
PDF (formato=pdf):
Content-Type: application/pdfContent-Disposition: attachment; filename="inventario-<type>-<date>.pdf"- Body: Binary PDF buffer. Landscape A4. Columns: Tipo, Serial, Marca, Modelo, Ubicación, Estado, Observaciones.
formato=excel):
Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheetContent-Disposition: attachment; filename="inventario-<type>-<date>.xlsx"- Body: Binary
.xlsxbuffer. Single worksheet named"Inventario".
| Column | Field | Width (chars) |
|---|---|---|
| Tipo | Asset type | 14 |
| Serial | Serial number | 18 |
| Marca | Brand | 14 |
| Modelo | Model | 14 |
| Ubicación | Deployment sede | 18 |
| Estado | Condition | 12 |
| Observaciones | notas field | 30 |