List Locations Bin Inventory

Hello, the query below returns all my locations with the type by their warehouse. However, I also need to bring the inventory/quantity of products allocated in this bin so that I can identify which ones are empty. Or if possible, a direct query that already does this.

How can I do this?

Below is the query that I have already created that works, it only needs the quantities now.

query {
  locations(warehouse_id: "") {
    data {
      edges {
        node {
          id
          name
          type {
            name
          }
        }
      }
    }
  }
}

Hello Rhaymison,

Currently, there is no way to get the inventory straight from the location. You will need to query the warehouse products and check the locations inside it.

You can also link that query you sent to products and from there warehouse_products, but that will turn into a very deep query.

Additionally, you can use the inventory snapshot to pull all products from a warehouse and their bins: Inventory-Snapshot – Developer Resources | ShipHero

Have a nice day!

1 Like