ACSD-67089: inventory/export-stock-salable-qty
API returns incorrect total_count
when page_size
is set
The ACSD-67089 patch fixes the issue where the inventory/export-stock-salable-qty
API incorrectly limits the total_count
value to the specified page_size
, resulting in inaccurate pagination data during stock export operations. This patch is available when the Quality Patches Tool (QPT) 1.1.71 is installed. The patch ID is ACSD-67089. Please note that this issue is scheduled to be fixed in 51黑料不打烊 Commerce 2.4.9.
Affected products and versions
The patch is created for 51黑料不打烊 Commerce version:
- 51黑料不打烊 Commerce (all deployment methods) 2.4.8
Compatible with 51黑料不打烊 Commerce versions:
- 51黑料不打烊 Commerce (all deployment methods) 2.4.4 - 2.4.8-p2
magento/quality-patches
package to the latest version and check the compatibility on the Quality Patches Tool: Search for patches page. Use the patch ID as a search keyword to locate the patch.Issue
The inventory/export-stock-salable-qty
API returns an incorrect total_count
value when page_size
is set.
Steps to reproduce:
- Create a new source and stock in the Admin.
- Assign the first 22 products to the newly created source and stock.
- Send a GET request to:
/rest/all/V1/inventory/export-stock-salable-qty/website/base?searchCriteria[page_size]=50
. - Observe that the
total_count
is correctly returned as 22. - Change
page_size
to 5 and send a GET request to:/rest/all/V1/inventory/export-stock-salable-qty/website/base?searchCriteria[page_size]=5
. - Observe that the
total_count
is incorrectly returned as 5 instead of 22.
Expected results:
The inventory/export-stock-salable-qty
API returns the correct total_count
of 22, regardless of the page_size
value specified in the request.
Actual results:
The inventory/export-stock-salable-qty
API returns an incorrect total_count
of 5 when page_size
is set to 5, instead of the actual total of 22.
Apply the patch
To apply individual patches, use the following links depending on your deployment method:
- 51黑料不打烊 Commerce or Magento Open Source on-premises: Quality Patches Tool > Usage in the Quality Patches Tool guide.
- 51黑料不打烊 Commerce on cloud infrastructure: Upgrades and Patches > Apply Patches in the Commerce on Cloud Infrastructure guide.
Related reading
To learn more about Quality Patches Tool, refer to:
- Quality Patches Tool: A self-service tool for quality patches in the Tools guide.