How to update “inventory_level” of product by sku id in Bigcommerce?

送分小仙女□ 提交于 2019-11-30 09:56:54

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.

Memotronics

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.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!