How to get Grouped Product id from child product id in Magento 2?

You can get Parent Grouped Product id from child product id. Using Magento 2, You can fetch Parent product Ids as an array from child id of the product.

For Fetch Parent product id, You need Child Item Id associated with Grouped Product. Using Magento\GroupedProduct\Model\Product\Type\Grouped Magento Core class you can fetch parent product Id.

Used function getParentIdsByChild($childProductId)
Continue reading “How to get Grouped Product id from child product id in Magento 2?”

How to Update product using REST API magento 2?

In Magento 2, You can update already existing product using REST API. You need to call update product request url for perform update action.

For Update Product, you need to call PUT method as action Type.

Action: PUT

Request URL: <YOUR_SITE_URL>/rest/V1/products/<SKU>

ReplaceYOUR_SITE_URL with actual site URL and SKU with your product SKU which you want to update data.

Continue reading “How to Update product using REST API magento 2?”