Insights & Anomalies
Retail Mind can proactively scan your data for trends, anomalies, and business insights without you having to ask a specific question.
Trigger an Insight Scan
curl -X POST http://localhost:8000/v1/insights \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"source_id": "uuid",
"focus": "sales performance last 30 days"
}'Response (async job):
{
"job_id": "uuid",
"status": "pending",
"estimated_seconds": 30
}Poll Job Status
curl http://localhost:8000/v1/jobs/{job_id} \
-H "Authorization: Bearer $API_KEY"Example Insights
When complete, the job result contains a list of findings:
{
"insights": [
{
"type": "anomaly",
"severity": "high",
"title": "Sales drop in Store #12",
"description": "Revenue fell 34% vs prior week — no promotions active",
"affected_tables": ["orders", "stores"]
},
{
"type": "trend",
"severity": "info",
"title": "Product category 'Electronics' growing",
"description": "15% MoM growth driven by headphone SKUs"
}
]
}