- Sales Overview:
GET /api/metrics/sales - Get total sales, discounted sales, net sales, and the total number of orders.
- Additional data: Average order value (calculated from total sales and the total number of orders), conversion rate (calculated from the total number of orders and the number of registered users).
- Product Metrics:
GET /api/metrics/products - Get top-selling products and product-wise sales distribution.
- Additional data: Total available stock for each product.
- User Metrics:
GET /api/metrics/users - Get the number of registered users, gender distribution, and age distribution.
- Additional data: Average user age (calculated from the sum of ages divided by the total number of users), percentage of users with accounts linked to social media.
- Cart Metrics:
GET /api/metrics/cart - Get average cart value, most frequently added products to the cart, and total abandoned carts.
- Additional data: Average time spent in the cart (calculated from user interaction timestamps), percentage of completed purchases (calculated from completed orders and abandoned carts).