Admin Dashboard
Admin dashboard statistics
Changed onReturns aggregate stats from Webkul\Admin\Helpers\Dashboard. Use ?type= to choose the stat group; ?start= + ?end= (ISO dates) to bound the window; ?channel= (channel code) to filter by channel.
get/dashboard/stats
Request
- Base URLhttp://localhost:8000/api/admin
- AuthHTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Query parameters
type'over-all' | 'today' | 'stock-threshold-products' | 'total-sales' | 'top-selling-products' | 'top-customers'
Stat group: over-all (default), today, stock-threshold-products, total-sales, top-selling-products, top-customers.
startstring date
Start date (YYYY-MM-DD). Defaults to 30 days ago.
endstring date
End date (YYYY-MM-DD). Defaults to today.
channelstring
Channel code filter.
Response
Stats payload + date range.
Changes
- breaking
removed the enum value
total-visitorsfrom thequeryrequest parametertype
- breaking