The Anaquel Inteligente 3B API is a FastAPI application served at port 8000. It exposes the real-time shelf inventory state, event history, analytics, and intelligence modules (predictions, heatmap, narratives) via standard HTTP endpoints, complemented by a Socket.IO WebSocket layer for live push updates. Full interactive documentation — generated automatically by FastAPI — is available at http://localhost:8000/docs (Swagger UI) and http://localhost:8000/redoc (ReDoc).Documentation Index
Fetch the complete documentation index at: https://mintlify.com/elzackarias/Hackaton3B-Reto1/llms.txt
Use this file to discover all available pages before exploring further.
Base URL
Authentication
No authentication is required in the current implementation. The server runs in development mode with CORS fully open (allow_origins=["*"]), accepting requests from any origin.
Content-Type
AllPOST and PUT requests must include the header:
application/json unless otherwise noted (the /dashboard endpoint returns text/html).
Interactive Documentation
| Interface | URL |
|---|---|
| Swagger UI | http://localhost:8000/docs |
| ReDoc | http://localhost:8000/redoc |
Endpoints Summary
| Method | Path | Description |
|---|---|---|
GET | /api/health | Server health check and uptime |
GET | /api/inventory | Full inventory state for all 7 products |
GET | /api/inventory/{sku_id} | Single product stock by SKU ID |
GET | /api/events | Paginated event history with optional SKU filter |
POST | /api/events | Simulate a product removal or return event |
POST | /api/mock/event | Trigger a random mock RETIRO event for testing |
GET | /api/predictions | Stock depletion predictions per SKU (M6) |
GET | /api/heatmap | Slot activity heatmap within a time window (M7) |
GET | /api/narratives | Auto-generated Spanish narrative messages (M8) |
GET | /api/analytics | Live KPI dashboard: fill rate, velocity, alerts |
GET | /api/restock | Priority-scored restock recommendations |
POST | /api/inventory/reset | Reset all products to initial stock of 8 units |
PUT | /api/config/threshold | Update the alert threshold at runtime |
GET | /dashboard | Standalone HTML operations dashboard |
API Sections
Inventory
Health check, full inventory state, single-product lookup, and inventory reset.
Events
Query event history, simulate removals or returns, and fire random mock events.
Analytics
Real-time KPIs, fill rates, velocity metrics, and restock recommendations.
Intelligence
Depletion predictions (M6), slot heatmaps (M7), and narrative messages (M8).
Config
Dynamic alert threshold updates and the embedded HTML dashboard.