TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/JoseOlivares19/Proyecto-PC3-JavaScript-Avanzado/llms.txt
Use this file to discover all available pages before exploring further.
/predict/smart-stock endpoint runs a product’s current sales and inventory signals through the SmartStock360 RandomForest classifier to produce one of three demand tier labels. The model weighs discount level, seasonal context, recent sales velocity, days without replenishment, and customer rating against current stock coverage. The response includes a confidence score, a full probability ranking across all three labels, and actionable replenishment recommendations ready to display in your inventory dashboard.
Endpoint
Request Body
Unit price of the product in local currency. Must be between
1 and 5000.Current units available in warehouse. Must be between
0 and 10000.Total units sold in the last 7 days. Must be between
0 and 5000.Active discount percentage applied to the product. Must be between
0 and 90.Current season or sales context. Accepted values:
0— Normal period1— Campaign / promotional period2— Holiday / peak demand period
Number of days since the last stock replenishment. Must be between
0 and 120.Average customer rating for the product. Must be between
1.0 and 5.0.Example Request
Example Response
Response Fields
Human-readable model identifier. Always
"SmartStock360" for this endpoint.The top predicted demand label. One of:
| Label | Meaning |
|---|---|
DEMANDA_ALTA_REABASTECER | High demand — immediate replenishment required |
DEMANDA_MEDIA_MONITOREAR | Medium demand — monitor daily and prepare moderate order |
DEMANDA_BAJA_OPTIMIZAR | Low demand — avoid overstock, review pricing or bundling |
Probability assigned to the top predicted class, in the range
0.0 to 1.0. Higher values indicate a more decisive classification.Probability distribution over all three demand labels, sorted in descending order of probability.
Contextual replenishment actions generated from the predicted label and input field values. Typically 1–3 actionable strings ready to surface in a UI notification or alert.
Echo of the validated request payload as parsed by Pydantic. Useful for logging and audit trails without re-serialising the original request.