Update product inventory, without the product ID?

New Member
3 0 0

Hi there,

I would like to be able to update my inventory via the Shopify API. All the docs I see only mention using the product ID. This leads me to ask the following...

- How can I get a list of the Product ID's for my all my products? Or can I look up using a SKU or other identifier to get these ID's?

- Can I not just update the inventory using the SKU, or other identifier?

 

Any pointers would be much appreciated thanks.

Alan

0 Likes
Highlighted
Shopify Staff
Shopify Staff
293 53 40

Hi @Alan_Reid 

 

I would start by reading through this document here to get an idea of the relationship between inventory, locations, products etc. https://help.shopify.com/en/api/reference/inventory/inventorylevel

 

You will need the variant ID - this is a unique identifier. You can query your products for their ID such as https://help.shopify.com/en/api/reference/products/product#index-2020-01 

Vix | Developer Support @ Shopify
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Click Accept as Solution 


0 Likes
Highlighted
New Member
3 0 0
Hi Vix,
Yeah I started looking at that after posting. It’s a bit of a pain, having to looking up the `inventory_item_id` of a product, before being able to update.

Especially when Shopify doesn’t like you updating many at once, so many calls are needed so I get throttled.

Now looking at a more effective way to do push these updates.

Thanks
0 Likes