Open duqkefly opened 4 years ago
This is due to the new inventory_item api changes, You no longer update a product directly but instead create inventory_items for the product.
https://shopify.dev/docs/admin-api/rest/reference/inventory/inventoryitem?api[version]=2020-07
How can we get access to this scope?
PHPShopify \ Exception \ ApiException (403)
[API] This action requires merchant approval for read_inventory scope.
For example:
$inventoryItems = $shopify->InventoryItem()->get(['ids' => implode(',', $inventoryItemsIds)]);
Try this: $qty = array ( "location_id" => '1234567', "inventory_item_id" => '22334455', "available" => 25 );
$result = $shopify->InventoryLevel->set($qty);
Hi Master.
How i cant adjust a product stock.??
I tried using the following but its not working for me.
$data = [ "price" => round(###,##), "inventory_level" => [ "inventory_item_id" => ????, (I dont know if this item is optional:?) "inventory_quantity" => ### ] ]; $res = $spf->Product($id_producto)->Variant($id_variant)->put($data);
How is the right way to do this.?