For detailed information and usage examples, refer to the Sales API Postman Documentation.
- Endpoint:
GET /api/sales/total-revenue
- Description: Calculate and return the total revenue generated by all sales transactions.
- Endpoint:
GET /api/sales/quantity-by-product
- Description: Find and return the total quantity sold for each product.
- Endpoint:
GET /api/sales/top-products
- Description: Retrieve the top 5 products with the highest total revenue, along with their total revenue values.
- Endpoint:
GET /api/sales/average-price
- Description: Calculate and return the average price of products sold.
- Endpoint:
GET /api/sales/revenue-by-month
- Description: Group the sales data by month and year and calculate the total revenue for each month-year combination.
- Endpoint:
GET /api/sales/highest-quantity-sold
- Description: Find and return the product that had the highest quantity sold on a single day.
- Endpoint:
GET /api/sales/department-salary-expense
- Description: Calculate and return the total salary expense for each department.