# Get List of products including inactive ones

**URL:** https://community.shiphero.com/t/get-list-of-products-including-inactive-ones/3211
**Category:** GraphQL API
**Created:** [February 20, 2025, 11:22am UTC](https://community.shiphero.com/t/get-list-of-products-including-inactive-ones/3211 "2025-02-20T11:22:36Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![ahmadMamdouh](https://avatars.discourse-cdn.com/v4/letter/a/c89c15/32.png) [@ahmadMamdouh](https://community.shiphero.com/u/ahmadMamdouh)
#### Post date: [February 20, 2025, 11:22am UTC](https://community.shiphero.com/t/get-list-of-products-including-inactive-ones/3211/1 "2025-02-20T11:22:36Z")

</div>

Hello Team ,  
how could i get a list of products including inactive products as attached below

 ![Captura de pantalla 2025-02-19 a la(s) 14.36.18](https://us1.discourse-cdn.com/flex020/uploads/shiphero/original/1X/056923653c94fdf1c27975a919a6ba263fe0d4fe.jpeg)

---

<div class="post-metadata">

### Author: ![ahmadMamdouh](https://avatars.discourse-cdn.com/v4/letter/a/c89c15/32.png) [@ahmadMamdouh](https://community.shiphero.com/u/ahmadMamdouh)
#### Post date: [February 23, 2025, 9:51pm UTC](https://community.shiphero.com/t/get-list-of-products-including-inactive-ones/3211/2 "2025-02-23T21:51:51Z")

</div>

Hello Team, is there anyone can help me ?

---

<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 27, 2025, 3:09pm UTC](https://community.shiphero.com/t/get-list-of-products-including-inactive-ones/3211/3 "2025-02-27T15:09:28Z")

</div>

Hello @ahmadMamdouh!

To pull all products, including inactive ones, you can use the products query: [https://developer.shiphero.com/wp-content/uploads/spectaql/#query-products](https://developer.shiphero.com/wp-content/uploads/spectaql/#query-products)

Have a great day!

---

<div class="post-metadata">

### Author: ![ahmadMamdouh](https://avatars.discourse-cdn.com/v4/letter/a/c89c15/32.png) [@ahmadMamdouh](https://community.shiphero.com/u/ahmadMamdouh)
#### Post date: [March 12, 2025, 1:24pm UTC](https://community.shiphero.com/t/get-list-of-products-including-inactive-ones/3211/4 "2025-03-12T13:24:06Z")

</div>

Hello @tomasfd ,  
thanks for support , but is there a way to use the query of getting the products and including the lots details for each Product(SKU) , lots details as attached above in the Topic

---

<div class="post-metadata">

### Author: ![sh-agent2](https://avatars.discourse-cdn.com/v4/letter/s/9f8e36/32.png) [@sh-agent2](https://community.shiphero.com/u/sh-agent2)
#### Post date: [March 12, 2025, 8:55pm UTC](https://community.shiphero.com/t/get-list-of-products-including-inactive-ones/3211/5 "2025-03-12T20:55:53Z")

</div>

Hello @ahmadMamdouh!  
To get the lots in the products query you must query expiration\_lots nested under warehouse\_products → locations → expiration\_lots.

Here is an example of that query

```auto
{
  products(sku: "string") {
    request_id
    complexity
    data(last: 1) {
      pageInfo {
        hasNextPage
        hasPreviousPage
        startCursor
        endCursor
      }
      edges {
        node {
          id
          legacy_id
          account_id
          name
          sku
          warehouse_products {
            id
            locations {
              pageInfo {
                hasNextPage
                hasPreviousPage
                startCursor
                endCursor
              }
              edges {
                node {
                  id
                  legacy_id
                  expiration_lot {
                    id
                    name
                    sku
                    created_at
                    updated_at
                    expires_at
                    received_at
                    is_active
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}

```

Please let me know if you have any other questions

---

<div class="post-metadata">

### Author: ![ahmadMamdouh](https://avatars.discourse-cdn.com/v4/letter/a/c89c15/32.png) [@ahmadMamdouh](https://community.shiphero.com/u/ahmadMamdouh)
#### Post date: [March 13, 2025, 11:59am UTC](https://community.shiphero.com/t/get-list-of-products-including-inactive-ones/3211/6 "2025-03-13T11:59:15Z")

</div>

Hello Austin\_Harvey,  
thanks for your support, it’s working now , but is there a way to get the quantity in each expiration lot ?

---

<div class="post-metadata">

### Author: ![sh-agent2](https://avatars.discourse-cdn.com/v4/letter/s/9f8e36/32.png) [@sh-agent2](https://community.shiphero.com/u/sh-agent2)
#### Post date: [March 13, 2025, 2:57pm UTC](https://community.shiphero.com/t/get-list-of-products-including-inactive-ones/3211/7 "2025-03-13T14:57:40Z")

</div>

Yes!

Adding “Quantity”

Under the locations nest will get you the values for the quantities, and since you can only have 1 lot per location this will naturally get you the lot values.

```auto
{
  products(sku: "string") {
    request_id
    complexity
    data(last: 1) {
      pageInfo {
        hasNextPage
        hasPreviousPage
        startCursor
        endCursor
      }
      edges {
        node {
          id
          legacy_id
          account_id
          name
          sku
          warehouse_products {
            id
            locations {
              pageInfo {
                hasNextPage
                hasPreviousPage
                startCursor
                endCursor
              }
              edges {
                node {
                  id
                  legacy_id
                  quantity
                  expiration_lot {
                    id
                    name
                    sku
                    created_at
                    updated_at
                    expires_at
                    received_at
                    is_active
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}

```

Let me know if you have any further questions!

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex020/uploads/shiphero/original/2X/8/83f2a5ec5d7908b156cb6999baa4c753fadfa85d.svg) [@system](https://community.shiphero.com/u/system)
#### Post date: [June 11, 2025, 2:58pm UTC](https://community.shiphero.com/t/get-list-of-products-including-inactive-ones/3211/8 "2025-06-11T14:58:21Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
