Storefront API now supports per-market Fulfillable Inventory
API
Effective April 01, 2024
As of Storefront API version 2024-04, you can use the @inContext
directive to query product
and productVariant
fulfillable inventory for specified market country. The Fulfillable Inventory feature must be enabled.
query Contextualized @inContext(country:CA){
product(id:"gid://shopify/Product/1" )
{
availableForSale
totalInventory
variants(first:1)
{
edges
{
node
{
id
availableForSale
quantityAvailable
currentlyNotInStock
}
}
}
}
}
Learn more about Fulfillable Inventory on Shopify help docs.