The return of retrieving inventory quantity of one single variant differentiate from the one of product list REST API.
The values are not the same. Left is 12 and right is 0. It actually should be 12.
Solved! Go to the solution
This is an accepted solution.
There's 2 things you can check here. First, try making your calls again using a recent API version. The field you're referring to is supposed to aggregate inventory data from all locations, and this functionality was made available around 2019.
You should also check the location that stocks this variant, and make sure it's included in the fulfillment priority list. If the location isn't set to fulfill online orders, it's expected that the quantity from that location won't be included in the inventory_quantity field when you query using a sales channel app. When using the product listing resource, you'll only see products published to the channel, and inventory available to purchase through the channel.