Variant inventory_quantity when Sold Out

Solved
Brian90
New Member
2 1 0

We sell mostly one-off items. It is important that once an item is sold, it cannot be sold a second time. We use a bespoke inventory management system that can automatically update Shopify. I am using a test Shopify account as a sandbox for developing the software, so it can't be linked to a bank account for processing in case someone stumbles across it and tries to buy something. I can't do an actual sale, but that is not a big issue. By the way, is there a proper sandbox environment that I have not yet found? I would much rather use that.

For one-off items, we use the InventoryLevel part of the REST API to set the inventory to 1 and have Shopify manage the inventory for the online store. If I set the quantity to 0 in Shopify, the item shows up as Sold Out which is correct. There is only one Location, so the inventory at that location is all that there is. Within the Shopify web portal, everything looks fine.

Ultimately, we need to remove the item from Shopify altogether and ensure it is not also sold through our bricks and mortar store. The software reads the Variant and examines the inventory_quantity value that I understand and accept is now read only. Even though the Shopify quantity is 0, inventory_quantity continues coming back as 1.

Is this a bug, to be expected (a 'why' would be appreciated if this is the case), or is there a better way of finding out whether an item has been sold online? I would rather not to have to troll through orders to reverse engineer this information.

Accepted Solution (1)

Accepted Solutions
Brian90
New Member
2 1 0

This is an accepted solution.

Okay. I was using 2020-07 as that was the latest when I started writing the software. I changed to 2021-07 and the problem seems to be resolved.

View solution in original post

Replies 2 (2)
csam
Shopify Staff
Shopify Staff
267 40 43

Hi @Brian90 

What API request are you using to find the inventory_quantity is set to 1 when it is showing as 0 in the Shopify admin? If you could provide a recent x-request-id from the response, that would be helpful.

CS | API Support @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

Brian90
New Member
2 1 0

This is an accepted solution.

Okay. I was using 2020-07 as that was the latest when I started writing the software. I changed to 2021-07 and the problem seems to be resolved.