Display quantity of items in stock via storefront API?

dnirns
New Member
1 0 0

Hi,

I'm building a React storefront for a client using the Storefront API and am having trouble finding a value for the current stock quantity in the checkout from the product object gets returned from the API request. I can see the 'avaliable for sale' boolean, but I need to build a selection dropdown for quantities, limited to the amount of items in stock.

I might be missing something completely obvious, in which case - apologies, but it seems to be either missing from the response object, or I'm being completely blind?

attached is an example of a product:

Screenshot 2021-01-30 at 16.23.11.png

 

Thank you!

 

 

0 Likes
florinanghel
Shopify Partner
102 15 17

aaaa021-01-31 113907.png

Maybe you don't have that permission enabled.

0 Likes