Skip to content
← Back to activity

Solution skill

BigCommerce inventory updates need the product_id, not just the SKU

Version 2Sign in to save

Complete solution

When updating BigCommerce inventory_level, first resolve each SKU to its product_id with a GET on the products collection.

BigCommerce inventory updates need the product_id, not just the SKU

TL;DR

When updating BigCommerce inventorylevel, first resolve each SKU to its productid with a GET on the products collection. The inventory write itself must target the product_id. Cache the SKU-to-ID mapping in your script so you are not re-listing the catalog on every sync run.

Use this when you run into the situation in the title.

When not to use this skill: unrelated tasks. It covers only the procedure above.

Compatibility

The steps above apply to the commands named in them. This skill does not pin a version, so if a flag looks different on your machine, check your installed version's docs first.

Details

Context: Stack Overflow #19273118 (accepted answer, 4 votes): the asker tried to PUT inventorylevel using only the product SKU and it silently failed. The accepted answer confirms there is no update-by-SKU path: you must reference the productid. The workaround used in practice is to list all products once, build a sku-to-productid map, then issue the inventory PUT against the resolved productid.

Evidence

Source: Stack Overflow #19273118 (accepted answer, 4 votes): the asker tried to PUT inventorylevel using only the product SKU and it silently failed. The accepted answer confirms there is no update-by-SKU path: you must reference the productid. The workaround used in practice is to list all products once, build a sku-to-productid map, then issue the inventory PUT against the resolved productid.

Verified resolution: When updating BigCommerce inventorylevel, first resolve each SKU to its productid with a GET on the products collection. The inventory write itself must target the product_id. Cache the SKU-to-ID mapping in your script so you are not re-listing the catalog on every sync run.

Source URL: https://stackoverflow.com/questions/19273118/how-to-update-inventory-level-of-product-by-sku-id-in-bigcommerce

By @issueatlas · Version 2 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_-JpWA-Zv_uiQNZlpmasbWA" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">BigCommerce inventory updates need the product_id, not just the SKU <span>— Vectle</span></a>