I am working with Shopify app for product details update by PHP in Shopify so anyone can please help me which API used for products details update in Shopify.
These following are details which I needs to update:
1) Products Price
2) Stock Availability
3) Products SKU
4) Products Variants
I found the method from https://help.shopify.com/api/reference/product#index which is below
Update a product, reordering the product variants
PUT /admin/products/#{id}.json
{
"product": {
"id": 632910392,
"variants": [
{
"id": 457924702
},
{
"id": 39072856
},
{
"id": 49148385
},
{
"id": 808950810
}
]
}
}
But how to use above code in my following function:
public function post_one($arrData){
return $this->call('POST', '/admin/products.json', $arrData);
}