| [ |
| { |
| "_id": "chart-001", |
| "widget_id": "wid_revenue_trend_12m_001", |
| "type": "chart", |
| "title": "Revenue Trend (12 Months)", |
| "data_config": { |
| "source": "merchant_kpi_stats", |
| "params": { |
| "widget": "revenue_trend_12m", |
| "months": 12, |
| "chart_type": "line" |
| } |
| }, |
| "roles": { |
| "admin": true, |
| "manager": true, |
| "associate": false |
| }, |
| "endpoint": "/api/v1/charts/revenue-trend", |
| "cache_ttl": 1800, |
| "description": "Monthly revenue trend for the last 12 months with transaction counts and average order values" |
| }, |
| { |
| "_id": "chart-002", |
| "widget_id": "wid_gross_margin_trend_12m_001", |
| "type": "chart", |
| "title": "Gross Margin Trend (12 Months)", |
| "data_config": { |
| "source": "merchant_kpi_stats", |
| "params": { |
| "widget": "gross_margin_trend_12m", |
| "months": 12, |
| "chart_type": "line" |
| } |
| }, |
| "roles": { |
| "admin": true, |
| "manager": false, |
| "associate": false |
| }, |
| "endpoint": "/api/v1/charts/gross-margin-trend", |
| "cache_ttl": 1800, |
| "description": "Monthly gross margin percentage trend calculated from revenue and COGS" |
| }, |
| { |
| "_id": "chart-003", |
| "widget_id": "wid_channel_mix_001", |
| "type": "chart", |
| "title": "Channel Mix", |
| "data_config": { |
| "source": "merchant_kpi_stats", |
| "params": { |
| "widget": "channel_mix", |
| "period_window": "last_12_months", |
| "chart_type": "donut" |
| } |
| }, |
| "roles": { |
| "admin": true, |
| "manager": true, |
| "associate": false |
| }, |
| "endpoint": "/api/v1/charts/channel-mix", |
| "cache_ttl": 1800, |
| "description": "Revenue distribution across different sales channels (online, retail, wholesale, etc.)" |
| }, |
| { |
| "_id": "chart-004", |
| "widget_id": "wid_top_5_skus_001", |
| "type": "chart", |
| "title": "Top 5 SKUs", |
| "data_config": { |
| "source": "merchant_kpi_stats", |
| "params": { |
| "widget": "top_5_skus", |
| "period_window": "last_12_months", |
| "limit": 5, |
| "chart_type": "bar" |
| } |
| }, |
| "roles": { |
| "admin": true, |
| "manager": true, |
| "associate": false |
| }, |
| "endpoint": "/api/v1/charts/top-skus", |
| "cache_ttl": 1800, |
| "description": "Top 5 products by revenue with quantity sold and SKU information" |
| }, |
| { |
| "_id": "chart-005", |
| "widget_id": "wid_inventory_status_001", |
| "type": "chart", |
| "title": "Inventory Status", |
| "data_config": { |
| "source": "inventory_api", |
| "params": { |
| "categories": ["in_stock", "low_stock", "out_of_stock"], |
| "chart_type": "donut" |
| } |
| }, |
| "roles": { |
| "admin": true, |
| "manager": true, |
| "associate": true |
| }, |
| "endpoint": "/api/v1/charts/inventory-status", |
| "cache_ttl": 600, |
| "description": "Current inventory status distribution showing in-stock, low-stock, and out-of-stock products" |
| }, |
| { |
| "_id": "chart-006", |
| "widget_id": "wid_top_selling_products_30d_001", |
| "type": "chart", |
| "title": "Top Selling Products (30 Days)", |
| "data_config": { |
| "source": "sales_api", |
| "params": { |
| "widget": "top_selling_products_30d", |
| "window_days": 30, |
| "limit": 5, |
| "chart_type": "bar" |
| } |
| }, |
| "roles": { |
| "admin": false, |
| "manager": true, |
| "associate": true |
| }, |
| "endpoint": "/api/v1/charts/top-selling-products", |
| "cache_ttl": 900, |
| "description": "Top 5 best-selling products in the last 30 days by quantity sold" |
| }, |
| { |
| "_id": "chart-007", |
| "widget_id": "wid_staff_performance_001", |
| "type": "chart", |
| "title": "Staff Performance", |
| "data_config": { |
| "source": "analytics_api", |
| "params": { |
| "metrics": ["orders_completed", "upsell_rate", "service_rating"], |
| "chart_type": "bar" |
| } |
| }, |
| "roles": { |
| "admin": false, |
| "manager": true, |
| "associate": false |
| }, |
| "endpoint": "/api/v1/charts/staff-performance", |
| "cache_ttl": 900, |
| "description": "Staff performance metrics including orders completed, upsell rate, and service ratings" |
| }, |
| { |
| "_id": "chart-008", |
| "widget_id": "wid_personal_sales_trend_30d_001", |
| "type": "chart", |
| "title": "My Sales Trend (30 Days)", |
| "data_config": { |
| "source": "sales_api", |
| "params": { |
| "widget": "personal_sales_trend_30d", |
| "window_days": 30, |
| "chart_type": "line" |
| } |
| }, |
| "roles": { |
| "admin": false, |
| "manager": false, |
| "associate": true |
| }, |
| "endpoint": "/api/v1/charts/my-sales-trend", |
| "cache_ttl": 600, |
| "description": "Personal daily sales trend for the last 30 days (associate's own sales)" |
| }, |
| { |
| "_id": "chart-009", |
| "widget_id": "wid_top_products_sold_by_me_001", |
| "type": "chart", |
| "title": "Top Products Sold by Me", |
| "data_config": { |
| "source": "sales_api", |
| "params": { |
| "widget": "top_products_sold_by_me", |
| "window_days": 30, |
| "limit": 5, |
| "chart_type": "bar" |
| } |
| }, |
| "roles": { |
| "admin": false, |
| "manager": false, |
| "associate": true |
| }, |
| "endpoint": "/api/v1/charts/my-top-products", |
| "cache_ttl": 600, |
| "description": "Top 5 products sold by the associate in the last 30 days" |
| } |
| ] |
|
|