Overview
Special event permits are required for organizing events in public or municipal spaces. These permits track the event type, authorized services (food, beverages, confectionery, etc.), and event-specific details.Event Types
The system supports the following event classifications:Deportivo
Sports events and competitions
Cultural
Cultural activities and exhibitions
Benéfico
Charitable and fundraising events
Educativo
Educational events and workshops
Religioso
Religious ceremonies and gatherings
Otros
Other event types (custom description)
Service Types
Events can be authorized to offer the following services:Comida
Food service
Bebidas
Beverage service
Confitería
Confectionery and sweets
Artículos Varios
Miscellaneous items sales
Heladería
Ice cream service
Otros
Other services (requires description)
Required Fields
Event Information
Name of the event
Event type: “Deportivo”, “Cultural”, “Benéfico”, “Educativo”, “Religioso”, or custom type
Applicant Information
Organizer’s first name
Organizer’s last name
Organizer’s identification document number
Organizer’s phone number
Organizer’s address or location
Permit Details
Event start date
Event end date or permit expiration
Authorized event schedule (e.g., “9:00 AM - 6:00 PM”)
Location or sector where the event will take place
Authorized Services
Food service authorized (true/false or “true”/“false”)
Beverage service authorized (true/false or “true”/“false”)
Confectionery service authorized (true/false or “true”/“false”)
Miscellaneous items sales authorized (true/false or “true”/“false”)
Ice cream service authorized (true/false or “true”/“false”)
Description of other authorized services
Additional Fields
Payment receipt file upload (optional)
Current date in YYYY-MM-DD format for validation
Creating a Permit
To create a new special event permit, send a POST request with multipart form data:Request Example
Boolean service fields are automatically converted using the
converToBooleanService function:trueor"true"→ 1 (authorized)- Any other value → 0 (not authorized)
Response
Editing a Permit
Update an existing event permit:Request Body
All fields from creation plus:ID of the permit to edit
Set to “true” if updating the payment receipt, “false” otherwise
Example
Response
Approving a Permit
Approve a permit by uploading the authorized permit document:Request Body
ID of the permit to approve
Authorized permit document file
Response
Canceling a Permit
Cancel a permit with an observation note:Request Body
ID of the permit to cancel
Reason for cancellation
Example
Response
Searching and Filtering
Search for event permits:Request Body
Search term (searches across permit code, dates, organizer name, document, phone, sector)
Filter by status: “Todos” (all), “Emitido” (approved), or “No Emitido” (not approved)
Response
Returns HTML template with search results:Getting Permit Details
Retrieve details for a specific permit:Request Body
Permit ID
Response
PDF Generation
Generate a PDF document for a specific permit:eventos-especiales_{codigo_permiso}
Response
Returns a PDF document with:- Content-Type:
application/pdf - Event details with checkboxes for event type
- Service authorizations marked with “x” for enabled services
- Formatted using the template at
views/templates/permisos/eventos.html
PDF Template Logic
The PDF generation includes special handling:Real-Time Updates with Socket.io
The system supports real-time synchronization for event permits using Socket.io:Socket Events
src/index.js:181-187) ensures that all connected clients receive updates when permits are modified, approved, or canceled.
Deleting a Permit
Delete a permit (only if not approved):Request Body
ID of the permit to delete
Response
Report Generation
Generate a comprehensive PDF report:Database Schema
Thepermisos_eventos table includes event-specific fields:
| Field | Type | Description |
|---|---|---|
| nombre_evento | varchar | Event name |
| tipo_evento | varchar | Event type classification |
| servicio_comida | tinyint | Food service (0 or 1) |
| servicio_bebidas | tinyint | Beverage service (0 or 1) |
| servicio_confiteria | tinyint | Confectionery service (0 or 1) |
| servicio_articulos_varios | tinyint | Misc. items sales (0 or 1) |
| servicio_heladeria | tinyint | Ice cream service (0 or 1) |
| servicio_otros | text | Other services description |
File Storage
Files are stored in:Integration Points
Frontend Integration
The frontend JavaScript (src/public/JS/eventos.js) handles:
- Form submissions for add/edit operations
- Search and filtering with real-time updates
- PDF generation links
- Delete operations with confirmation
- Socket.io event listeners for multi-user synchronization
Route Mounting
Fromsrc/index.js:55:
/eventos_especiales base path.