According to the swagger, the REST API PUT /V1/products/{productSku}/stockItems/{itemId}
is used to update the product inventory.
However, for the attribute value itemId
, I found no differences no matter I entered which values. So, the following request URLs can update the same product without any errors AND return the same integer value:
http://<magento_url>/rest/V1/products/{productSku}/stockItems/1
http://<magento_url>/rest/V1/products/{productSku}/stockItems/{correctItemId}
http://<magento_url>/rest/V1/products/{productSku}/stockItems/999999
Given that the {productSku}
is a simple product, my question is: What is the exact usage of itemId
in the request URL?