Skip to main content

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.

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).

Base URL

http://localhost:8000

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

All POST and PUT requests must include the header:
Content-Type: application/json
Responses are always application/json unless otherwise noted (the /dashboard endpoint returns text/html).

Interactive Documentation

Endpoints Summary

MethodPathDescription
GET/api/healthServer health check and uptime
GET/api/inventoryFull inventory state for all 7 products
GET/api/inventory/{sku_id}Single product stock by SKU ID
GET/api/eventsPaginated event history with optional SKU filter
POST/api/eventsSimulate a product removal or return event
POST/api/mock/eventTrigger a random mock RETIRO event for testing
GET/api/predictionsStock depletion predictions per SKU (M6)
GET/api/heatmapSlot activity heatmap within a time window (M7)
GET/api/narrativesAuto-generated Spanish narrative messages (M8)
GET/api/analyticsLive KPI dashboard: fill rate, velocity, alerts
GET/api/restockPriority-scored restock recommendations
POST/api/inventory/resetReset all products to initial stock of 8 units
PUT/api/config/thresholdUpdate the alert threshold at runtime
GET/dashboardStandalone 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.

Build docs developers (and LLMs) love