This page has moved to Adobe Experience League and will be redirected soon.
MDVA-31640 patch: unable to create consecutive scheduled update via REST API
MDVA-31640 patch: unable to create consecutive scheduled update via REST API
The MDVA-31640 patch fixes the issue where a new scheduled update for the special price cannot be created for multiple stores using REST API, if the start date of the update coincides with the end date of the previously existing update. This patch is available when the Quality Patches Tool (QPT) 1.0.9 is installed. Please note that the issue was fixed in Adobe Commerce 2.4.2.
Affected products and versions
The patch was created for Adobe Commerce version:
Adobe Commerce on cloud infrastructure 2.3.5-p1
Compatible with Adobe Commerce versions:
Adobe Commerce on cloud infrastructure and Adobe Commerce on-premises 2.3.1 - 2.3.5-p2, 2.4.0, 2.4.0-p1
NOTE
The patch might become applicable to other versions with new Quality Patches Tool releases. To check if the patch is compatible with your Adobe Commerce version, update the magento/quality-patches
package to the latest version and check the compatibility on the [!DNL Quality Patches Tool]: Search for patches page. Use the patch ID as a search keyword to locate the patch.
Issue
Fixes the issue where a new scheduled update for the special price cannot be created for multiple stores using REST API, if the start date of the update coincides with the end date of the previously existing update.
Steps to reproduce:
- Set up an additional website, store, and store view.
- Create two simple products: "product1" and "product2".
- Assign product1 to one website and product2 to both websites.
- Create a scheduled update for the special price for the product1 on the store view for the store with ID 1. Use REST API
POST
request to rest/V1/products/special-price
with the following payload:
{ "prices": [ { "price": 15, "store_id": 1, "sku": "product1", "price_from": "2021-11-15 04:00:00", "price_to": "2021-11-15 04:10:00" } ] }
- Create a scheduled update for the special price for the product2 on both store views for stores with ID 1 and 2 using REST API
POST
request to rest/V1/products/special-price
with the following payload (the price_from
date is the same as price_to
date in the previous request):
{ "prices": [ { "price": 14, "store_id": 1, "sku": "product2", "price_from": "2021-11-15 04:10:00", "price_to": "2021-11-15 04:15:00" }, { "price": 13, "store_id": 2, "sku": "product2", "price_from": "2021-11-15 04:10:00", "price_to": "2021-11-15 04:15:00" } ] }
Expected results:
Scheduled update with the special price change is created on both store views.
Actual results:
Adobe Commerce throws an error. Scheduled update is not created.
Apply the patch
To apply individual patches, use the following links depending on your deployment method:
To learn more about Quality Patches Tool, refer to:
For info about other patches available in QPT, refer to the Patches available in QPT in our developer documentation.