Regarding update variant inventory quantity

Santosh9
New Member
1 0 0

I am trying to update the inventory quantity of shopify product variant using shopify API using the Product update API 
PUT /admin/api/2019-10/products/#{product_id}.json

{
  "variant": {
    "id"39767608328245,
    "inventory_quantity"10,
    "old_inventory_quantity"10
  }

which have deprecated parameter's So after this I have tried inventory API.


But it doesnot seems to work and I have tried to use the another Api end point Inventory level. 

POST https://{shop}.myshopify.com/admin/api/2019-10/inventory_levels/adjust.json and my request body data which I have passed in the json body in postman.

{
"inventory_item_id"41861939363893,
"location_id":302645275,
"available_adjustment"-2
}

Even this API doesn't work. I'm able to read inventory but apparently cant update it.  Any help would be appreciated thanks.

0 Likes
GrahamS
Shopify Staff
Shopify Staff
83 16 16

Hey @Santosh9 ,

I notice you are calling 2019-10, which is a deprecated API version. Can you update to a more recent, supported version and let us know your results?

Graham S | API Support @ 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

0 Likes