This FastAPI application provides endpoints to fetch product demand for the current or a specified week and to calculate the reorder point for products.
This FastAPI application provides various endpoints to manage and analyze product demand, supplier scores, reorder points, and other inventory-related data.
- Endpoint:
GET /
- Description: Displays a welcome message on the home page.
- Example Request: https://pharma-ml.vercel.app/
- Example Response:
Welcome to Home Page
- Endpoint:
GET /product-demand
- Description: Fetches the product demand for the current week if no query parameter is specified. You can also specify a week number (from 1 to 18) to retrieve demand for that week.
- Query Parameter:
week
(optional, integer): The week number for which you want to fetch demand. Must be between 1 and 18.
- Example Request: https://pharma-ml.vercel.app/product-demand?week=3
- Example Response:
{ "Paracetamol": {"demand": 500}, "Aspirin": {"demand": 300} }