Planta Milenio exposes HTTP endpoints consumed by its own frontend through AJAX calls and direct browser navigation. These endpoints fall into three categories: autocomplete endpoints that return JSON arrays for real-time form field suggestions, report endpoints that stream PDF file downloads, and view endpoints that serve full HTML pages for the web UI. All endpoints are served by Django 5.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/JuanDiego3030/Planta_Milenio/llms.txt
Use this file to discover all available pages before exploring further.
Authentication
Authentication is performed by submitting aPOST request to /login/ with the user’s nombre and password form fields. On success, Django sets a sessionid cookie that must be included in every subsequent request.
Autocomplete endpoints for transport and logistics data (empresa, chuto, tanque, destino, conductor, producto) do not perform a session check in their view logic — they only require that the Django application is reachable. The six visitor/personnel autocomplete endpoints (/autocomplete/persona/…) also do not check session. PDF report endpoints vary: reporte_pdf_materia_prima checks for an active session and permiso_reportes; reporte_pdf_personal and reporte_historial do not perform a session check and are accessible without authentication.
All twelve autocomplete endpoints accept
GET requests only. The six
visitor/personnel endpoints (/autocomplete/persona/…) and
/autocomplete/producto/ are decorated with @require_GET and will return
405 Method Not Allowed for any other HTTP method. The remaining transport
endpoints (empresa, chuto, tanque, destino, conductor) are not decorated with
@require_GET but are functionally read-only in the application.CSRF Protection
Django’s CSRF middleware is active on allPOST endpoints. Browser clients handle this automatically via the csrftoken cookie that Django sets on the first page load. For programmatic access, obtain the CSRF token from the csrftoken cookie after loading any page and pass it either in the X-CSRFToken request header or in the csrfmiddlewaretoken POST body field.
Login Example
Endpoint Categories
Planta Milenio’s endpoints are organised into two primary API surface areas plus the HTML view layer.| Category | Base Path | Response Format | Auth Requirement |
|---|---|---|---|
| Autocomplete | /autocomplete/… | JSON array | None (transport) / None (persona) |
| PDF Reports | /reporte_pdf/…, /reporte_historial/ | application/pdf | Varies — see individual endpoint notes |
| HTML Views | /control/, /reportes/, etc. | text/html | Active session + per-module permission |
Per-Module Permissions
Non-autocomplete views enforce per-module permissions stored on the authenticated user’s profile. If a user attempts to access a restricted view without the required permission, they are redirected to the login page. Autocomplete endpoints do not check module-level permissions.Autocomplete Endpoints
Reference for all 12 GET autocomplete endpoints. Returns JSON arrays for
company, vehicle, driver, product, destination, and visitor field
suggestions.
PDF Report Endpoints
Reference for the three PDF report download endpoints that generate
WeasyPrint PDFs for raw-material history and personnel access records.