Skip to content

Get product using SKU with respect to the store data

I use the core API /V1/products/:sku to get the product using the SKU.

for example, I have 2 stores, one in English and another in Japanese.
My API Endpoint is like
http://local.mystore.com/storefront/en-us/rest/V1/products/myproduct for the English store and
http://local.mystore.com/storefront/en-us/rest/V1/products/myproduct for the Japanese.

For both the API I am getting the same labels (in English) for the attributes but In my Admin I have different labels for the attribute in the store scope level and its works fine in the Magento pages but not in the API.

enter image description here
In this Function get() the $storeId is always null, I guess the problem is in this, if so please let me know How to send the store Id in this API to fix this issue.

enter image description here