# How to identify warehouses no longer associated with product?

**URL:** <https://community.shiphero.com/t/how-to-identify-warehouses-no-longer-associated-with-product/516>\
**Category:** GraphQL API\
**Created:** [June 10, 2020, 4:15am UTC](https://community.shiphero.com/t/how-to-identify-warehouses-no-longer-associated-with-product/516 "2020-06-10T04:15:48Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![jwz](https://avatars.discourse-cdn.com/v4/letter/j/db5fbb/32.png) [@jwz](https://community.shiphero.com/u/jwz)\
**Post date:** [June 10, 2020, 4:15am UTC](https://community.shiphero.com/t/how-to-identify-warehouses-no-longer-associated-with-product/516/1 "2020-06-10T04:15:48Z")

</div>

Hi,

We are getting warehouses for products that are no longer associated together on the UI. Is there any field that identifies whether warehouse is associated with product or not?

Thank you!

---

<div class="post-metadata">

**Author:** ![tomasw](https://sea2.discourse-cdn.com/flex020/user_avatar/community.shiphero.com/tomasw/32/248_2.png) [@tomasw](https://community.shiphero.com/u/tomasw)\
**Post date:** [June 10, 2020, 1:25pm UTC](https://community.shiphero.com/t/how-to-identify-warehouses-no-longer-associated-with-product/516/2 "2020-06-10T13:25:37Z")

</div>

Hi @jwz  
You are using the products query and getting Inactive products, is that correct?

Or maybe you could filter by warehouse when querying for products, something like this:

```
query {
  warehouse_products(warehouse_id: "V2FyZWhvdXNlOjgwNzU=") {
    request_id
    complexity
    data(first: 10) {
      edges {
        node {
          id
          legacy_id
          account_id
          value_currency
          on_hand
          inventory_bin
          backorder
          allocated
          available
          product {
            sku
            name
            id
          }
        }
      }
    }
  }
}

```

Let me know if this is not what you were referring to, or if you have an example of a request\_id and the elements from the response you don’t want to show.  
Thanks in advance!  
Tom

---

<div class="post-metadata">

**Author:** ![jwz](https://avatars.discourse-cdn.com/v4/letter/j/db5fbb/32.png) [@jwz](https://community.shiphero.com/u/jwz)\
**Post date:** [June 10, 2020, 5:18pm UTC](https://community.shiphero.com/t/how-to-identify-warehouses-no-longer-associated-with-product/516/3 "2020-06-10T17:18:03Z")

</div>

Hi @tomasw  
Thanks for your reply! Sorry for not being clear.

For example request, this product has 1 warehouse on UI but we received 2 sets of warehouse\_product IDs from API response. We didn’t see a field that would identify the “active” warehouse\_product that would be shown on UI. We can’t use the warehouse\_product last updated\_at date because there are cases where a product should have 2+ warehouse\_product IDs.

Please let me know if I missed anything. Thank you!

“request\_id”: “5ee11189201ea3a4c75f05be”

> {  
> product(id:“UHJvZHVjdEluZm86MTE3ODQ4Mw==”) {  
> request\_id  
> complexity  
> data{  
> id  
> warehouse\_products {  
> id  
> warehouse\_id  
> }  
> }  
> }  
> }

---

<div class="post-metadata">

**Author:** ![tomasw](https://sea2.discourse-cdn.com/flex020/user_avatar/community.shiphero.com/tomasw/32/248_2.png) [@tomasw](https://community.shiphero.com/u/tomasw)\
**Post date:** [June 12, 2020, 2:12pm UTC](https://community.shiphero.com/t/how-to-identify-warehouses-no-longer-associated-with-product/516/4 "2020-06-12T14:12:02Z")

</div>

Hi @jwz  
That is correct, we now display both Active and Inactive products, so in your case, you are seeing an [Active product](https://app.shiphero.com/dashboard/products/details/241279505) and the [Inactive product](https://app.shiphero.com/dashboard/products/details/241279499) when making that request.  
We are currently working on a filter for returning only Active products, so I will let you know as soon as we have that and you can confirm that works for you  
I will let you know as soon as we have it available  
Thanks again!  
Tom

---

<div class="post-metadata">

**Author:** ![jwz](https://avatars.discourse-cdn.com/v4/letter/j/db5fbb/32.png) [@jwz](https://community.shiphero.com/u/jwz)\
**Post date:** [June 17, 2020, 9:02pm UTC](https://community.shiphero.com/t/how-to-identify-warehouses-no-longer-associated-with-product/516/5 "2020-06-17T21:02:18Z")

</div>

Hi, could you provide ETA of when this will be available?  
Thank you again too!

---

<div class="post-metadata">

**Author:** ![tomasw](https://sea2.discourse-cdn.com/flex020/user_avatar/community.shiphero.com/tomasw/32/248_2.png) [@tomasw](https://community.shiphero.com/u/tomasw)\
**Post date:** [June 18, 2020, 3:31pm UTC](https://community.shiphero.com/t/how-to-identify-warehouses-no-longer-associated-with-product/516/6 "2020-06-18T15:31:41Z")

</div>

Hi @jwz  
We don’t have yet an ETA on this, because its being worked along with other missing features.  
I will request for this to be expedited or if it could be worked separately so it is available asap.  
However I wouldn’t expect it for this or next week, but I will ask if this can be expedited  
I will let you know as soon as I have an update about it.  
Thanks again for the patience!  
Tom

---

<div class="post-metadata">

**Author:** ![dan](https://sea2.discourse-cdn.com/flex020/user_avatar/community.shiphero.com/dan/32/101_2.png) [@dan](https://community.shiphero.com/u/dan)\
**Post date:** [June 24, 2020, 9:30pm UTC](https://community.shiphero.com/t/how-to-identify-warehouses-no-longer-associated-with-product/516/7 "2020-06-24T21:30:50Z")

</div>

Hi Tomas,

Any updates on this? We would also really benefit from this feature.

Dan

---

<div class="post-metadata">

**Author:** ![tomasw](https://sea2.discourse-cdn.com/flex020/user_avatar/community.shiphero.com/tomasw/32/248_2.png) [@tomasw](https://community.shiphero.com/u/tomasw)\
**Post date:** [July 16, 2020, 6:56pm UTC](https://community.shiphero.com/t/how-to-identify-warehouses-no-longer-associated-with-product/516/8 "2020-07-16T18:56:18Z")

</div>

Hi @dan @jwz  
The feature should be live now

You should be able to query only for Active products by including a filter `active: true`  
Something like this:

```auto
query {
  warehouse_products(warehouse_id: "V2FyZWhvdXNlOjeRzkw", active: true) {
    request_id
    complexity
    data(first: 1) {
      edges {
        node {
          on_hand
          product{
            sku
            legacy_id
          }
          inventory_bin
          inventory_overstock_bin
          reserve_inventory
          replenishment_level
          reorder_amount
          reorder_level
          backorder
          allocated
          available
          non_sellable_quantity
          custom
          customs_value
          created_at
          updated_at
          sell_ahead
          active
          inbounds(first: 10) {
            edges {
              node {
                sell_ahead
              }
            }
          }
        }
      }
    }
  }
} 

```

The way it works is

- _ **active: true** _ it returns ONLY Active products
- _ **active: false** _ it returns both Active and Inactive products

Let me know if there is anything else I could help you with.  
Thank you once more for your patience while we worked on this  
Tom

---

<div class="post-metadata">

**Author:** ![dan](https://sea2.discourse-cdn.com/flex020/user_avatar/community.shiphero.com/dan/32/101_2.png) [@dan](https://community.shiphero.com/u/dan)\
**Post date:** [July 16, 2020, 7:39pm UTC](https://community.shiphero.com/t/how-to-identify-warehouses-no-longer-associated-with-product/516/9 "2020-07-16T19:39:05Z")

</div>

@tomasw - This is very exciting! We’ll dig in and let you know if we have any questions.
