shopifyliquidshopify-template

How can I get location based inventory data?


Suppose I've a product available on two locations with different quantities. Now in liquid I can get the total quantity from those two location which is mostly useless.

So, I need to get the location specific quantity like location 'A' has 'x' and 'B' has 'y' quantity.

How can I achieve that?

Thanks!


Solution

  • So 1st of all there is no way to get the inventory wise variants quantity from the liquid API.

    We can get the inventory specific quantity only using the admin API.

    However, when we are getting the variants quantity using liquid we are getting the total inventory quantity but only from the inventories/locations that have online sales turned on. This was an important discovery for us and solved the errors we've been facing.

    Hope this helps you too. Thanks!