Why does updating a product variant remove stock?

Linq5
New Member
2 0 0

Hello there,

Today a customer of our product (which syncs, amount other things, products from one platform towards Shopify) mentioned 'we clear out the stock'. We did some tests and found this to be true.

Your documentation doesn't mention anything about sending stock along with a product update, however, if you do not mention the stock quantity, the stock is reset.

Some info we send:

 

{
    "product": {
        "sku": "100910",
        "variants": [
            {
                "barcode": "8718548003620",
                "inventory_management": "shopify",
                "inventory_policy": "continue",
                "metafields": [],
                "price": 89,
                "sku": "100910"
            }
        ]
    }
}

This clears out the current stock (say it was 100) on the variant. When we send along "inventory_quantity", it's used.

Basically my question is: why does Shopify clear out the inventory quantity when updating the variant without supplying the inventory quantity property?

Kind regards,
Eelco

 

0 Likes
Linq5
New Member
2 0 0

My colleague just mentioned it doesn't clear the stock when we send along the variant ID. Does Shopify add a new variant which overrules the variant with the stock?

0 Likes