The Documents API lets community administrators publish official PDFs — such as meeting minutes, regulations, or financial reports — and make them available to all residents. Files are stored on the server filesystem at the path configured by theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/GuillermoNavarro/Proyecto_comunidades/llms.txt
Use this file to discover all available pages before exploring further.
app.upload.dir property. Each Documento record keeps a reference to the stored file path alongside its human-readable metadata.
Data model
Auto-generated primary key for the document record.
The community this document belongs to. Resolved automatically from the JWT on upload.
A display name for the document, e.g.
"Actas Junta 2025".A short description of the document’s contents.
The timestamp when the document was stored. Set by the database on insert.
The server-side filesystem path where the uploaded PDF file is stored.
ModifDocumento DTO
Used exclusively forPATCH requests. Only the fields listed below can be updated — the file itself cannot be replaced through this endpoint.
New display name for the document.
New description for the document.
Endpoints
POST /api/documentos
Uploads a new PDF document and creates its metadata record.Required role:
ADMIN or SUPER_ADMINmultipart/form-data. The PDF binary is passed via the archivo field; document metadata (nombre, descripcion) is passed as additional form fields.
A
SUPER_ADMIN may supply the optional idComunidadManual query parameter to upload a document on behalf of any community. An ADMIN always uploads to their own JWT community — the idComunidadManual parameter is ignored for this role.(SUPER_ADMIN only) The ID of the target community when uploading on behalf of another community. Ignored for
ADMIN callers.multipart/form-data
The PDF file to upload. Content type must be
application/pdf. Maximum size: 15 MB.Display name that will be stored in the
Documento record.Short description of the document’s contents.
| Code | Meaning |
|---|---|
200 OK | Document uploaded and record created successfully |
400 Bad Request | File is missing, empty, or not a PDF |
500 Internal Server Error | Unexpected server-side error during file storage |
The persisted document record, including the server filesystem path in the
documento field.GET /api/documentos
Returns all document records for the authenticated user’s community.Required role:
USER, ADMIN, or SUPER_ADMINSUPER_ADMIN may optionally pass idComunidadManual to retrieve documents for a different community.
Query parameters
(SUPER_ADMIN only) Override the JWT community and return documents for the specified community ID instead.
An array of document records belonging to the resolved community.
PATCH /api/documentos/{id}
Updates the metadata (nombre and/or descripcion) of an existing document. The underlying PDF file is not replaced by this operation.
Required role:
ADMIN or SUPER_ADMINThe ID of the document record to update.
application/json
New display name for the document.
New description for the document.
| Code | Meaning |
|---|---|
200 OK | Metadata updated and updated record returned |
404 Not Found | No document found with the given ID |
The full updated document record after applying the patch.
DELETE /api/documentos/{id}
Deletes a document record and its associated file from the server filesystem.Required role:
ADMIN or SUPER_ADMINThe ID of the document to delete.
| Code | Meaning |
|---|---|
200 OK | Document and file deleted successfully |
404 Not Found | No document found with the given ID |