Manage low-quantity notifications
Low stock notification alert the merchant that the salable quantity of a stock has reached a critical threshold. The Admin allows the merchant to configure low-quantity notifications from several locations:
- The Notify for Quantity Below field (Stores > Settings > Configuration > Catalog > Inventory > Product Stock Options) sets the default value globally for all products for the entire website/store.
- The Advanced Inventory Notify for Quantity Below field (Catalog > Products > specific product > Advanced Inventory) overrides the value set at the website/store level. The value applies to all of the product's sources.
- The Notify Quantity fields (Catalog > Products > specific product > Assigned Sources section) override all other settings. The merchant can assign a different threshold for each source for the specific product.
Adobe Commerce deducts either the global or the overriding quantity from the total salable quantity for the stock.
The REST low-quantity notification endpoints manage the values that merchants set from the Notify Quantity fields.
Service names:
inventoryLowQuantityNotificationApiGetSourceItemConfigurationV1
inventoryLowQuantityNotificationApiSourceItemConfigurationsSaveV1
inventoryLowQuantityNotificationApiDeleteSourceItemsConfigurationV1
REST endpoints:
POST /V1/inventory/low-quantity-notification
GET /V1/inventory/low-quantity-notification/:sourceCode/:sku
POST /V1/inventory/low-quantity-notifications-delete
sourceItemConfigurations parameters:
source_codenotify_stock_qtyskuCreate a low quantity notification
The POST /V1/inventory/low-quantity-notification endpoint accepts an array of values that map a SKU to a source and specify when to notify the merchant of a low stock quantity.
Sample usage:
POST <host>/rest/<store_code>/V1/inventory/low-quantity-notification
Payload:
{
"sourceItemConfigurations": [
{
"source_code": "baltimore_wh",
"notify_stock_qty": 10,
"sku": "sp1"
},
{
"source_code": "austin_wh",
"notify_stock_qty": 8,
"sku": "sp1"
},
{
"source_code": "reno_wh",
"notify_stock_qty": 5,
"sku": "sp1"
}
]
}
Response:
An empty array []
Return low-quantity notification information
This call returns the notify_stock_qty for the specified source and SKU.
Sample Usage:
GET <host>/rest/<store_code>/V1/inventory/low-quantity-notification/reno_wh/sp1
Payload:
None
Response:
{
"source_code": "reno_wh",
"notify_stock_qty": 5,
"sku": "sp1
}
Delete a low-quantity notification
The POST /V1/inventory/low-quantity-notifications-delete endpoint deletes the notification threshold for an array of sourceItem objects. Each object specified a SKU amd source.
Sample usage:
POST <host>/rest/<store_code>/V1/inventory/low-quantity-notifications-delete
Payload:
{
"sourceItems": [
{
"sku": "sp1",
"source_code": "reno_wh"
}
]
}
Response:
Commerce returns an empty array.
[]