Reports & Analytics API

Generate reports and access analytics data.

GET /admin/reports/sales

Get sales report for a date range

Query Parameters

?start_date=2026-03-01&end_date=2026-03-31&group_by=day

Response

{
  "success": true,
  "data": {
    "total_sales": 15750.00,
    "total_orders": 125,
    "average_order_value": 126.00,
    "daily_breakdown": [
      {"date": "2026-03-01", "sales": 500.00, "orders": 4}
    ]
  }
}
Bearer Token Required
GET /admin/reports/inventory

Get inventory report and analytics

Response

{
  "success": true,
  "data": {
    "total_sku_count": 342,
    "total_units_in_stock": 15234,
    "low_stock_items": 23,
    "value_of_inventory": 456789.50
  }
}
Bearer Token Required

Analytics API

Revenue trends, order breakdowns, product performance, and KPI summaries.

GET/admin/analytics/kpi-summary

Get a high-level KPI dashboard summary

Query Parameters

?start_date=2026-03-01&end_date=2026-03-31

Response

{
  "success": true,
  "data": {
    "revenue": 45230.00, "orders": 187, "average_order_value": 241.87,
    "new_customers": 34, "returning_rate": 0.62, "top_product": "Custom T-Shirt"
  }
}
Bearer Token Required
GET/admin/analytics/revenue-trends

Revenue trends by day, week, or month with comparison to prior period

Query Parameters

?start_date=2026-03-01&end_date=2026-03-31&group_by=week
Bearer Token Required

Financial Reports API

Revenue breakdowns by period, category, and product, plus tax summaries and export.

GET/admin/financial/summary

Get financial summary with revenue, costs, and margins

Response

{
  "success": true,
  "data": {
    "total_revenue": 45230.00, "total_cost": 18420.00, "gross_margin": 0.593,
    "total_tax_collected": 3618.40, "net_revenue": 41611.60
  }
}
Bearer Token Required
GET/admin/financial/export

Export financial data as CSV for accounting

Query Parameters

?start_date=2026-01-01&end_date=2026-03-31&format=csv
Bearer Token Required

Dashboard API

Get a high-level overview of your store with key metrics and recent activity.

GET/admin/dashboard

Get a summary dashboard with orders, revenue, inventory alerts, and recent activity

Response

{
  "success": true,
  "data": {
    "orders": { "pending": 12, "processing": 5, "shipped": 28, "today_total": 1249.99 },
    "inventory": { "low_stock_count": 8, "out_of_stock_count": 2 },
    "revenue": { "today": 1249.99, "this_week": 8750.00, "this_month": 34200.00 },
    "recent_orders": [
      { "id": "order_789", "customer": "Jane Doe", "total": 149.99, "status": "pending", "created_at": "2026-03-22T14:00:00Z" }
    ]
  }
}
Bearer Token Required