Skip to content

API Reference

Quick Reference

  • Base URL: https://insights.omisell.com
  • Format: JSON
  • Auth: Bearer JWT

1. Gửi tin nhắn đến AI (Chat Query)

POST /api/v1/ai/chat

Body:

json
{
  "message": "Doanh thu 30 ngày qua",
  "history_id": "opt_xxx_xxx"
}

Response:

json
{
  "success": true,
  "data": {
    "reply_text": "Mình gửi bạn biểu đồ...",
    "chart_hint": { "type": "line", "x_axis": "date" },
    "rows": [
      { "date": "2026-04-01", "revenue": 1000000 }
    ]
  }
}

2. Lấy Insight tĩnh định sẵn

GET /api/v1/insights/:code/execute

Thực thi câu truy vấn bằng mã insight từ catalog. Môi trường frontend cung cấp environment.demoMode sẽ trả mock data không cần gọi API này.

Hệ thống tài liệu Boxme Insight - Dựng bởi CodyMaster DocKit