The order and cart-related APIs are enhanced to be able to enable the validation of product quantity against defined maximum and minimum limits without affecting the existing business logic.
The feature enhances cart-related APIs by adding validation of product quantity limits during operations like adding products to the cart, updating a cart, saving, restoring, cloning, and merging carts. If a product's quantity doesn't meet the specified limits, a warning message will be displayed. However, customers can still call these APIs successfully.
The feature also enhances order-related APIs by adding validation during operations such as placing orders, replenishing orders, canceling and returning orders. In these cases, it prevents customers from successfully calling these APIs and also an error message will be displayed. This feature ensures customers cannot order products that don't comply with the requirement. It also ensures that the product's remaining quantity continues to meet the minimum limit requirement after cancellations and returns.
Why?
This feature enhances logistical efficiency and prevents customers from depleting stock during shortages by enabling the verification of product quantity limits.