These endpoints let you query the engine’s past event log and inject test events without needing a physical camera or the computer-vision pipeline. Simulated events flow through the sameDocumentation 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.
InventoryEngine.process_event() path as real detections, triggering stock updates, alert evaluation, and all connected WebSocket broadcasts.
GET /api/events
Returns the recordedInventoryEvent log in reverse chronological order (most recent first). Supports pagination and filtering by SKU.
Maximum number of events to return. Minimum
1, maximum 500.Optional. When provided, only events whose
sku_id matches this value are returned. Must be one of the 7 valid SKU IDs.InventoryEvent Object
UUID v4 uniquely identifying this event.
Either
"retiro" (product taken from shelf) or "devolucion" (product returned to shelf).Identifier of the affected product.
Human-readable name of the affected product.
Physical shelf slot number where the event occurred.
Stock level immediately before this event was applied.
Stock level immediately after this event was applied.
Detection confidence score (0.0–1.0). Events below
0.15 are discarded by the engine before reaching this log.ISO 8601 datetime when the event was detected.
POST /api/events
Injects a simulated detection event directly into theInventoryEngine without requiring the camera pipeline. The event is processed identically to a real camera detection.
The SKU to apply the event to. Must be one of the 7 valid SKU IDs. Returns HTTP 404 if not found.
The type of event to simulate. Must be exactly
"retiro" or "devolucion".Simulated detection confidence. Range
0.0–1.0. Events below the engine’s internal threshold (0.15) will be rejected with HTTP 422.InventoryEvent):
This endpoint also broadcasts two Socket.IO events to all connected WebSocket clients:
inventory_update (carrying both the event and updated stock) and detection_event (carrying the raw event). Use it to exercise WebSocket integrations without needing the camera pipeline active.POST /api/mock/event
Fires a randomRETIRO event against a randomly selected SKU. No request body is required. Designed for quick smoke-testing of WebSocket connections and dashboard integrations.
"ok" when the event was processed, or "ignored" when the randomly selected product has stock_current = 0.The
InventoryEvent that was created (only present when status is "ok").Explanation string (only present when
status is "ignored").