I am trying to update the inventory level of a products but unfortunately not getting success.Here is my code. I want to update product\'s "inventory_level" but e
I am trying to do the same thing (different programming language). I have a call into their support. It seems like you still must reference the product_id.
You cannot update simply by SKU. You must know the product_id. I got around this by requesting all products and loading the response into an array (product_id, sku, etc.). I then read thru the array, get the quantity from our system using the SKU, and post (PUT) the inventory_level using the associated product_id.
IMHO this is a huge oversight on their part. Who cares what the product_id is on the website?
I have asked for an enhancement that allows updating by SKU.
No need to download ALL products, why not retrieve JUST the product that has the sku you need?
GET: /api/v2/products?sku=sku-that-I'm-interested-in
parse the response for the id (that's the product ID for the product with that SKU)
Then do a PUT using that product ID.