Unable to update inventory using Shopify API

Highlighted
New Member
2 0 2

I have 1 shipping location and I am trying to update the inventory using shopify API. On another store I am able to successfully update inventory using the Product update API 

PUT /admin/api/2019-10/products/#{product_id}.json
{
"product": {
     "id": 111111,
    "variants": [
        {
            "id": 22222,
            "inventory_quantity": 20
       }
]
}
}

 

I also tried using the Inventory Level Api

POST /admin/api/2019-10/inventory_levels/set.json

{
"location_id": 4444,
"inventory_item_id": 5555,
"available": 20
}

 

IT returns an HTML with the link to continue.Tried this through POSTMAN.

 

 

 

1 Like
Highlighted

Hello 
Use the adjust endpoint with the location ID and inventory item ID to increase or decrease the available quantity for an inventory level:

POST https://{shop}.myshopify.com/admin/api/2019-10/inventory_levels/adjust.json

{
"location_id": 6884556842,
"inventory_item_id": 12250274365496,
"available_adjustment": 1
}
Want to modify or incorporate custom changes on store, Hire us
If helpful then please Like and Accept Solution .
Email: pallavi@oscprofessionals.com
Skype : oscprofessionals-87
Whats app
Free Website Review and advice for sale from Shopify Conversion Experts | Shopify Private App | Custom Theme Development | Custom Modifications In To Shopify Theme | Shopify SEO ; Digital Marketing & amp | Site Speed Optimization | Performance Site Audit
0 Likes
Highlighted
New Member
2 0 2

Hello oscprofessional,

 

Even this API doesn't work

POST https://{shop}.myshopify.com/admin/api/2019-10/inventory_levels/adjust.json

1 Like
Highlighted
New Member
1 0 1

@smdev I ran in to the exact same issue. Were you able to figure it out? If so, please post your solution.

Thanks,

1 Like
Highlighted
New Member
1 0 0

I'm having the same issue. I'm able to read inventory but apparently cant update it. I get an html response, with a Continue link.

Any help would be appreciated.

 

Thanks.

0 Likes