Storefront API Variant's quantityAvailable inconsistency

Storefront API Variant's quantityAvailable inconsistency

aleksandra_gjd
Shopify Partner
1 0 0

Hi!

 

I am using the Storefront API to retrieve quantityAvailable for variants of my products.

My store has 2 locations – one is Shipping only, and another – Pickup in store only. Products can be avaiable in both of these locations.

The API is returning the number of available products inconsistently meaning that it either returns the number available in Shipping, if products are available in both locations OR if only available in the Pickup in store location then it is returning that number. There is no way of telling which number is it. In Storefront API there is no access to inventories in locations with Shipping only, so it is impossible to tell.

 

I would expect for the quantityAvailable to always return the total number of products available in all of the locations as the docs suggest or to only return the variants available for shipping.

 

I don't know if this is a bug in the API or am I missing something?

 

Replies 0 (0)