# Filter Warehouse Products Endpoint

**URL:** <https://community.shiphero.com/t/filter-warehouse-products-endpoint/2810>\
**Category:** GraphQL API\
**Created:** [February 5, 2024, 6:50pm UTC](https://community.shiphero.com/t/filter-warehouse-products-endpoint/2810 "2024-02-05T18:50:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![IsaacW](https://avatars.discourse-cdn.com/v4/letter/i/8e8cbc/32.png) [@IsaacW](https://community.shiphero.com/u/IsaacW)\
**Post date:** [February 5, 2024, 6:50pm UTC](https://community.shiphero.com/t/filter-warehouse-products-endpoint/2810/1 "2024-02-05T18:50:27Z")

</div>

Hello!

I’m curious if it is possible to run a GraphQL query on the products or warehouse products endpoint that returns a list of SKUs with their corresponding on hand and available quantities for only products that have a quantity \> 0?

I’m working with a client that has \> 25k total products in the system that are active but only roughly 8k have quantity on hand/available. Filtering the query to only return the 8k products with available inventory will be much more efficient.

Here’s the query that i’m currently leveraging:

```auto
query {
  warehouse_products(active: true) {
    request_id
    complexity
    data (after: "<%cursor%>") {
      pageInfo {
        hasNextPage
        hasPreviousPage
        startCursor
        endCursor
      }
      edges {
        node {
          id
					active
          warehouse_identifier
          on_hand
          available
          product {
            sku
          }
        }
      }
    }
  }
}

```

---

<div class="post-metadata">

**Author:** ![tomasfd](https://avatars.discourse-cdn.com/v4/letter/t/5daacb/32.png) [@tomasfd](https://community.shiphero.com/u/tomasfd)\
**Post date:** [February 6, 2024, 3:00pm UTC](https://community.shiphero.com/t/filter-warehouse-products-endpoint/2810/2 "2024-02-06T15:00:13Z")

</div>

Hello Isaac,

You can check all arguments for our queries in our schema: [Schema – Developer Resources | ShipHero](https://developer.shiphero.com/schema/).

None of those 2 queries have an argument only to return products with stock.

However, our inventory snapshot does. This single 80 credit cost mutation triggers an async process that pushes a URL to a JSON to a URL you set. This JSON has the inventory for all products across all your warehouses, but it can be filtered by `warehouse_id` and `has_inventory`. You can find more information here: [Inventory-Snapshot – Developer Resources | ShipHero](https://developer.shiphero.com/inventory-snapshot/)

Have a great day!  
TomasFD
