Skip to content

Dashboards

All dashboard endpoints are read-only (GET only) and return analytics data for rendering charts, KPI cards, and summary views.

Authentication required. Each endpoint requires the corresponding dashboard privilege.


Base URL Pattern

GET /api/dashboard-{name}
GET /api/dashboard-{name}/{entity_id}

Available Dashboards

Overview & Statistics

Endpoint Privilege Description
GET /api/navigation-bar Any authenticated Navigation menu data
GET /api/dashboard-statistics Dashboard Overall KPI statistics
GET /api/dashboard-total Dashboard Aggregate order totals
GET /api/dashboard-world-map Dashboard Geographic distribution of orders

Revenue & Spend Analytics

Endpoint Privilege Description
GET /api/dashboard-analytics-sales-orders Sales Analytics Sales order analytics
GET /api/dashboard-analytics-purchase-orders Procurement Analytics Purchase order analytics
GET /api/dashboard-revenue-by-customer Revenue Analytics Revenue grouped by customer
GET /api/dashboard-revenue-by-customer/{customer_id} Revenue Analytics Revenue for a specific customer
GET /api/dashboard-revenue-by-item Revenue Analytics Revenue grouped by item
GET /api/dashboard-revenue-by-item/{item_id} Revenue Analytics Revenue for a specific item
GET /api/dashboard-spend-by-supplier Spend Analytics Spend grouped by supplier
GET /api/dashboard-spend-by-supplier/{supplier_id} Spend Analytics Spend for a specific supplier
GET /api/dashboard-spend-by-item Spend Analytics Spend grouped by item
GET /api/dashboard-spend-by-item/{item_id} Spend Analytics Spend for a specific item

Inventory Dashboards

Endpoint Privilege Description
GET /api/dashboard-inventory-planning Inventory Planning Inventory planning insights
GET /api/dashboard-inventory-distribution Inventory Inventory distribution by warehouse
GET /api/dashboard-inventory-by-item-and-warehouse Inventory Inventory matrix (items × warehouses)

Order Status Dashboards

Endpoint Privilege Description
GET /api/dashboard-demand-by-item-and-status Demand Sales order status breakdown
GET /api/dashboard-procurement-by-item-and-status Procurement PO status breakdown
GET /api/dashboard-manufacturing-by-item-and-status Manufacturing MO status breakdown
GET /api/dashboard-forecast-by-item Forecast Forecast quantities by item

Trend Analysis

Endpoint Privilege Description
GET /api/dashboard-historical-transactions Historical Historical transaction audit trail
GET /api/dashboard-trend-by-revenue Revenue Analytics Revenue trend over time
GET /api/dashboard-trend-by-spend Spend Analytics Spend trend over time

Procurement Intelligence

Endpoint Privilege Description
GET /api/dashboard-procurement-by-price/{item_id} Procurement Price history for item across suppliers
GET /api/dashboard-procurement-by-price/{item_id}/{warehouse_id} Procurement Price history scoped to warehouse
GET /api/dashboard-procurement-trend-by-item-and-price/{item_id} Procurement Price trend over time
GET /api/dashboard-procurement-items-frequency Procurement Purchase frequency by item
GET /api/dashboard-procurement-items-on-the-same-po Procurement Items commonly ordered together
GET /api/dashboard-procurement-items-from-the-same-supplier Procurement Supplier-item correlation

Heatmaps

Endpoint Privilege Description
GET /api/dashboard-heatmap Inventory Warehouse demand heatmap
GET /api/dashboard-heatmap/{item_id} Inventory Heatmap scoped to item
GET /api/dashboard-heatmap/{item_id}/{warehouse_id} Inventory Heatmap scoped to item + warehouse
GET /api/dashboard-heatmap-items Inventory Item-level heatmap
GET /api/dashboard-heatmap-items/{item_id} Inventory Item heatmap scoped to item

Common Response Structure

All dashboard endpoints return:

{
  "data": {
    "labels": ["Jan", "Feb", "Mar"],
    "datasets": [
      {
        "label": "Revenue",
        "values": [12000, 15000, 11000]
      }
    ],
    "summary": {
      "total": 38000,
      "change_pct": 8.5
    }
  }
}

The exact shape of data varies by endpoint - consult the UI or contact support for specific field definitions per dashboard type.


Query Parameters

All dashboard endpoints support:

Parameter Description
filter Standard filter expression
date_from Start date for time-range filtering (ISO 8601)
date_to End date for time-range filtering (ISO 8601)

Code Example

curl -b cookies.txt "https://acme.knosc.com/api/dashboard-statistics"
curl -b cookies.txt "https://acme.knosc.com/api/dashboard-spend-by-supplier/7"
response = session.get("https://acme.knosc.com/api/dashboard-statistics")
stats = response.json()["data"]
print(f"Total revenue: {stats['summary']['total']}")