Covers all questions related to inventory management, order fulfillment, and shipping.
this is the format I'm using to send update information : var jsonContent = new StringContent(
$"{{\"product\": {{\"id\": {product.ProductId}, \"variants\": [{{\"id\": {product.variant}, \"sku\": \"{product.sku}\", \"inventory_quantity\": {product.inventory_quantity}}}]}}}}",
Encoding.UTF8,
"application/json"
);
with put request getting sucesscode but it is not updating product.inventory_quantity
Hi Vijaydave,
I believe you'll need to use the InventoryLevel resource to update a products inventory as the inventory_quantity on product variants is read only.
Liam | Developer Advocate @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog
Thanks , Liam for Replaying .. So I have to call Post Api insted of the Put or Patch Api to update inventory Quantity . that I understand from this example is it correct ?? and from here I'm calling Post Api with adjust.json one so it require Location Id but we have only one location so i do not have location id.. so there are two endpoint to update inventory quantity adjust.json and set.json both require location id .
You can get the inventory_item_id via the inventory item resource.
Liam | Developer Advocate @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog