Write requests to inventory_quantity and inventory_quantity_adjustment are no longer supported. Please use the Inventory Levels API

Shopify Partner
3 0 0

HI

Can someone please help me, I know shopify is depreciating the option to update inventory level using admin/variants/13889269727345.json

This method has worked for all my customers to update inventory until my recent customer.

Some products i can still update using the variants option as above and some product it will get the error 422 Unprocessable Entity. The site does not have locations enabled so why would it be complaining about using the Inventory levels api

 

{
    "errors": {
        "base": [
            "Write requests to inventory_quantity and inventory_quantity_adjustment are no longer supported. Please use the Inventory Levels API."
        ]
    }
}

Here is sample of what i sending to the server

{
  	"variant": {
    "id": 13889269727345,
    "inventory_quantity": 5
  }

}

Thanks

0 Likes
Shopify Expert
3857 2 277

Update your App to use Inventory Item and Inventory Level API calls. No Choice. Do it. 

Custom Shopify Apps built just for you! hunkybill@gmail.com http://www.resistorsoftware.com
0 Likes
Shopify Partner
3 0 0

Hi

thanks for that. not what i wanted to hear.

If i switch to Inventory Level api, is there any setting that needs t change under the site or can we just go ahead and use the api.

 

0 Likes
Highlighted
Shopify Expert
3857 2 277

Add two scopes to your App:

  1. write_inventory
  2. read_locations

Then you can simply take your variant object, and use it's inventory_item_id to update levels. It only gets effed up hard when items are spread out at locations. Then you have to decide which location to assign inventory too, and for that, ad hoc logic kicks in. 

Custom Shopify Apps built just for you! hunkybill@gmail.com http://www.resistorsoftware.com
1 Like
Shopify Partner
3 0 0

Ok, cool.

Will start with that now, right now i dont have multipule location so it should be to hard just to get a test up and running.

0 Likes