Pretty frustrating for many users that simple information can’t be gathered wihtout having to have external resources.
The ability to simply access product information from the front end is one of them.
The modern online selling platform now includes warehouse or multilocation of stock, but without pickup availabilty. Currently to get inventory location information a custom app has to be written on an external server to leverage the admin api, to perform a simple query to return that info, to then be displayed..
When simply including the variant to inventory id link to then query location, within liquid, could make this so much cleaner and simpler. Even adding this info to the storefront api would be better than nothing, i see no reason to hide this info behind the admin?
Hey @calljj - there are some ways to pull inventory location information through the Storefront API (specifically through the products object). Not sure if this is exactly what you’re looking for, but you could run a query like this, for example:
{
products (first:10) {
nodes{
id
variants (first:10) {
nodes {
id
storeAvailability (first:10) {
nodes {
location {
name
id
}
}
}
}
}
}
}
}
This would only be for inventory that is set up for local pickup though. For locations that don’t offer local pick up options, you are correct that the Admin API is the only way to acquire those details.
That said, I’m happy to take a look at your use case if you’re open to sharing it and getting in touch with our devs to see if this is something that’s on their roadmap/set up a feature request for you - just let me know. Hope this helps a little bit!
yes, has to be setup for localpickup, so no good for showing “shadow stock” held at warehouses. its such a simple query to add in, and a question constantly asked in the forums. I guess while you guys are getting paid based on queries, theres no incentive to include this one as a freebie, when you can charge based on Admin api ones.