# Product API returns non-existing product

**URL:** <https://community.shiphero.com/t/product-api-returns-non-existing-product/1985>\
**Category:** GraphQL API\
**Created:** [May 6, 2022, 7:51am UTC](https://community.shiphero.com/t/product-api-returns-non-existing-product/1985 "2022-05-06T07:51:44Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![sb2020](https://avatars.discourse-cdn.com/v4/letter/s/4da419/32.png) [@sb2020](https://community.shiphero.com/u/sb2020)\
**Post date:** [May 6, 2022, 7:51am UTC](https://community.shiphero.com/t/product-api-returns-non-existing-product/1985/1 "2022-05-06T07:51:44Z")

</div>

Hello,

Some SKUs do not exists anymore in ShipHero, but API still shows that products are active, so we are not able to detect removed products.

When user tries to search SKU in ShipHero, then it’s not there. But if query product by SKU via API, then is shows that product exists and active. Is this some issue with API? Example of request ID 6274d23c6bc30f2ade7833d2.

Thank you

---

<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:** [May 6, 2022, 2:58pm UTC](https://community.shiphero.com/t/product-api-returns-non-existing-product/1985/2 "2022-05-06T14:58:01Z")

</div>

Hello @sb2020!

What process did you use to delete those products?

Kind regards,  
TomasFD

---

<div class="post-metadata">

**Author:** ![sb2020](https://avatars.discourse-cdn.com/v4/letter/s/4da419/32.png) [@sb2020](https://community.shiphero.com/u/sb2020)\
**Post date:** [August 10, 2022, 9:49am UTC](https://community.shiphero.com/t/product-api-returns-non-existing-product/1985/3 "2022-08-10T09:49:28Z")

</div>

Sorry for delay. Products were removed using Bulk Delete function in ShipHero by going to the product screen, selecting a checkbox at the front of a SKU, and then clicking Bulk Delete. Here is one more example of request ID that returns SKU not visibke in ShipHero: 62f37e155322026d9998bd93.

---

<div class="post-metadata">

**Author:** ![sb2020](https://avatars.discourse-cdn.com/v4/letter/s/4da419/32.png) [@sb2020](https://community.shiphero.com/u/sb2020)\
**Post date:** [August 15, 2022, 2:10pm UTC](https://community.shiphero.com/t/product-api-returns-non-existing-product/1985/4 "2022-08-15T14:10:31Z")

</div>

@tomasfd Could please take a look at this issue? We have one more client with the same problem, here is one more example of request ID that returns SKU not visibke in ShipHero: 62fa5314e9b1605f64b76272.

---

<div class="post-metadata">

**Author:** ![sh-agent](https://avatars.discourse-cdn.com/v4/letter/s/e47774/32.png) [@sh-agent](https://community.shiphero.com/u/sh-agent)\
**Post date:** [August 15, 2022, 2:15pm UTC](https://community.shiphero.com/t/product-api-returns-non-existing-product/1985/5 "2022-08-15T14:15:19Z")

</div>

Hey @sb2020,

I’m currently investigating this issue. I’ll have an update for you soon.

Best,  
RayanP

---

<div class="post-metadata">

**Author:** ![sh-agent](https://avatars.discourse-cdn.com/v4/letter/s/e47774/32.png) [@sh-agent](https://community.shiphero.com/u/sh-agent)\
**Post date:** [August 15, 2022, 8:42pm UTC](https://community.shiphero.com/t/product-api-returns-non-existing-product/1985/6 "2022-08-15T20:42:28Z")

</div>

Hey @sb2020,

I wasn’t able to reproduce your issue, however I was able to find a fix for it.

If you run into any problem SKU’s such as “Bp\_ScendidocciaPerla\_Prealpi\_40x60” you can delete them using the Public API and it should solve your issue. I used this mutation here:  
`mutation { product_delete(data: { sku: "Bp_ScendidocciaPerla_Prealpi_40x60" }) { request_id complexity } } `

Please let me know if you have any questions or concerns!

Best,  
RayanP

---

<div class="post-metadata">

**Author:** ![sb2020](https://avatars.discourse-cdn.com/v4/letter/s/4da419/32.png) [@sb2020](https://community.shiphero.com/u/sb2020)\
**Post date:** [August 16, 2022, 6:55am UTC](https://community.shiphero.com/t/product-api-returns-non-existing-product/1985/7 "2022-08-16T06:55:06Z")

</div>

Thank you @sh-agent. But this solution does not work for us. We have a lot of clients who connect ShipHero accounts to our application, and each account may have many deleted SKUs, it’s not feasible for us to find and delete each problem SKU separately. We need some way to automatically detect deleted SKUs. Is it possible to fix API so that it does not return products which were deleted in ShipHero?

---

<div class="post-metadata">

**Author:** ![sh-agent](https://avatars.discourse-cdn.com/v4/letter/s/e47774/32.png) [@sh-agent](https://community.shiphero.com/u/sh-agent)\
**Post date:** [August 16, 2022, 6:35pm UTC](https://community.shiphero.com/t/product-api-returns-non-existing-product/1985/8 "2022-08-16T18:35:14Z")

</div>

Hey @sb2020,

Wanted to let you know that we’re still looking into this issue. We still haven’t been able to reproduce this issue on our end. This problem is related more so to the bulk delete not clearing out the product data table in our DB compared to the API.

Best,  
RayanP

---

<div class="post-metadata">

**Author:** ![originsid](https://avatars.discourse-cdn.com/v4/letter/o/cc9497/32.png) [@originsid](https://community.shiphero.com/u/originsid)\
**Post date:** [November 30, 2023, 3:45pm UTC](https://community.shiphero.com/t/product-api-returns-non-existing-product/1985/9 "2023-11-30T15:45:58Z")

</div>

@sh-agent or @tomasfd we seem to be hitting this issue as well.

Many products were bulk deleted via the UI ([app.shiphero.com](http://app.shiphero.com)) but they are still returned by API requests.

This is the closest post I found in the developer forum so I wanted to revive this one rather than creating a new topic, we can provide examples if needed.

To reproduce:  
Have multiple warehouses  
Create a product in all warehouses  
Bulk Delete the product from some warehouses  
Query for warehouse products with the sku, and all the deleted warehouse products are included in the result.

This is particularly troublesome for us since they’re still ‘active’ in the API response.

---

<div class="post-metadata">

**Author:** ![sh-agent](https://avatars.discourse-cdn.com/v4/letter/s/e47774/32.png) [@sh-agent](https://community.shiphero.com/u/sh-agent)\
**Post date:** [December 1, 2023, 7:04pm UTC](https://community.shiphero.com/t/product-api-returns-non-existing-product/1985/10 "2023-12-01T19:04:04Z")

</div>

Hey @originsid,

Thanks for reaching out, and providing the steps to reproduce!  
Are you able to provide a request id for an example where the SKU is not visible in the UI?

Please let me know if you have any questions or concerns.

Best,  
RayanP

---

<div class="post-metadata">

**Author:** ![originsid](https://avatars.discourse-cdn.com/v4/letter/o/cc9497/32.png) [@originsid](https://community.shiphero.com/u/originsid)\
**Post date:** [December 1, 2023, 7:17pm UTC](https://community.shiphero.com/t/product-api-returns-non-existing-product/1985/11 "2023-12-01T19:17:08Z")

</div>

Yessir @sh-agent !

“request\_id”: “6569f27e23f2533052a11c49”,

Note that for this request, we specified “active” as one of our query parameters.

The query didn’t include the “inactive” sku in one of our other warehouses, which is excellent/expected.

The query did include the “active” sku in several warehouses where we deleted those warehouse products using the UI ([app.shiphero.com](http://app.shiphero.com))

Please let us know if there’s any other info we can provide to help.

Thank you!

-Sid

---

<div class="post-metadata">

**Author:** ![sh-agent](https://avatars.discourse-cdn.com/v4/letter/s/e47774/32.png) [@sh-agent](https://community.shiphero.com/u/sh-agent)\
**Post date:** [December 4, 2023, 4:08pm UTC](https://community.shiphero.com/t/product-api-returns-non-existing-product/1985/12 "2023-12-04T16:08:50Z")

</div>

Hey @originsid,

Thanks for providing us with that request id and the extra details. I really appreciate it!

I ran a query for SKU 5000066-002-85EE and had 4 results return through the Public API as well:

```auto
"data": {
        "edges": [
          {
            "node": {
              "id": "UHJvZHVjdDo0MTg4MDE4Mzk=",
              "legacy_id": 418801839,
              "warehouse_identifier": "Backorder Origin Labs Wilton",
              "active": true
            }
          },
          {
            "node": {
              "id": "UHJvZHVjdDo0MTg4MDE4NDU=",
              "legacy_id": 418801845,
              "warehouse_identifier": "Backorder Primary",
              "active": true
            }
          },
          {
            "node": {
              "id": "UHJvZHVjdDo0MTg4MDE4NDI=",
              "legacy_id": 418801842,
              "warehouse_identifier": "Nutrition Jay",
              "active": true
            }
          },
          {
            "node": {
              "id": "UHJvZHVjdDo0MTM4NjQ4MTc=",
              "legacy_id": 413864817,
              "warehouse_identifier": "Primary",
              "active": true
            }
          }
        ]
      }
   

```

This also correlates with what I see in appdot when I search by SKU.

Were all results here bulk deleted previously? Meaning that this product shouldn’t show up in appdot or the Public API.

Please let me know if you have any questions or concerns.

Best,  
RayanP

---

<div class="post-metadata">

**Author:** ![originsid](https://avatars.discourse-cdn.com/v4/letter/o/cc9497/32.png) [@originsid](https://community.shiphero.com/u/originsid)\
**Post date:** [December 4, 2023, 4:26pm UTC](https://community.shiphero.com/t/product-api-returns-non-existing-product/1985/13 "2023-12-04T16:26:17Z")

</div>

Hey @sh-agent!

This Product/SKU only now exists in our “Primary” and “North Carolina One” warehouses, according to [app.shiphero.com](http://app.shiphero.com) when filtering both active and inactive products.

It is inactive in the “Primary” warehouse, and active in the “North Carolina One” warehouse.

We don’t see this sku in any other warehouses when using [app.shiphero.com](http://app.shiphero.com).

We used [app.shiphero.com](http://app.shiphero.com) to bulk delete this sku along with many others from the additional warehouses “Backorder Origin Labs Wilton”, “Backorder Primary”, and “Nutrition Jay”

If you’re able to see the sku in those warehouess when using appdot, that’s not the same behavior we’re seeing.

“Were all results here bulk deleted previously? Meaning that this product shouldn’t show up in appdot or the Public API.”

> > Not all results, just the ones that weren’t in the “North Carolina One” or “Primary” warehouses, so it should show up in appdot and the Public API for those two warehouses, but should not show up for any other warehouses.

Please let me know if there’s anything else we can clarify to help pin this down.

Thank you!

-Sid

---

<div class="post-metadata">

**Author:** ![sh-agent](https://avatars.discourse-cdn.com/v4/letter/s/e47774/32.png) [@sh-agent](https://community.shiphero.com/u/sh-agent)\
**Post date:** [December 4, 2023, 6:23pm UTC](https://community.shiphero.com/t/product-api-returns-non-existing-product/1985/14 "2023-12-04T18:23:34Z")

</div>

Hey @originsid,

Thank you again for the insight and explanation!

Could you please share a screenshot of your search for SKU 5000066-002-85EE in appdot? I can present this case to the team with this last bit of information.

Please let me know if you have any questions or concerns!

Best,  
RayanP

---

<div class="post-metadata">

**Author:** ![originsid](https://avatars.discourse-cdn.com/v4/letter/o/cc9497/32.png) [@originsid](https://community.shiphero.com/u/originsid)\
**Post date:** [December 6, 2023, 3:17pm UTC](https://community.shiphero.com/t/product-api-returns-non-existing-product/1985/15 "2023-12-06T15:17:26Z")

</div>

@sh-agent apologies for the delay, we’re getting close to data we don’t readily share publicly, but here’s a screenshot showing that, as well as the query parameters, and the response we’re getting:

\*note: to reproduce, search products for that sku, and filter “Active: All”

 ![image](https://us1.discourse-cdn.com/flex020/uploads/shiphero/original/1X/47eb9a44e1f9c996b8c42f62888d92df09804afc.png)

Query:

```auto
query {
  warehouse_products(sku:"5000066-002-85EE") {
    request_id
    data(first:100) {
      pageInfo {
        hasNextPage
        endCursor
      }
      edges {
        node {
          id
					active
          warehouse_id
					warehouse {
						identifier
					}
          updated_at
          product {
            id
            sku
            barcode
            updated_at
          }
        }
      }
    }
  }
}

```

Query response:

```auto
{
	"data": {
		"warehouse_products": {
			"request_id": "657090403106d0b2e067a0fe",
			"data": {
				"pageInfo": {
					"hasNextPage": false,
					"endCursor": "YXJyYXljb25uZWN0aW9uOjQ="
				},
				"edges": [
					{
						"node": {
							"id": "UHJvZHVjdDo0MTg4MDE4Mzk=",
							"active": true,
							"warehouse_id": "V2FyZWhvdXNlOjYxMTcz",
							"warehouse": {
								"identifier": "Backorder Origin Labs Wilton"
							},
							"updated_at": "2023-09-14T21:05:29",
							"product": {
								"id": "UHJvZHVjdEluZm86MzA4MjQ3NTU0",
								"sku": "5000066-002-85EE",
								"barcode": "197088026739",
								"updated_at": "2023-12-04T15:47:50"
							}
						}
					},
					{
						"node": {
							"id": "UHJvZHVjdDo0MTg4MDE4NDU=",
							"active": true,
							"warehouse_id": "V2FyZWhvdXNlOjYxMTcy",
							"warehouse": {
								"identifier": "Backorder Primary"
							},
							"updated_at": "2023-09-14T21:05:29",
							"product": {
								"id": "UHJvZHVjdEluZm86MzA4MjQ3NTU0",
								"sku": "5000066-002-85EE",
								"barcode": "197088026739",
								"updated_at": "2023-12-04T15:47:50"
							}
						}
					},
					{
						"node": {
							"id": "UHJvZHVjdDo0MTM4NjQ4MTg=",
							"active": false,
							"warehouse_id": "V2FyZWhvdXNlOjgwNTg0",
							"warehouse": {
								"identifier": "North Carolina One"
							},
							"updated_at": "2023-12-01T11:24:32",
							"product": {
								"id": "UHJvZHVjdEluZm86MzA4MjQ3NTU0",
								"sku": "5000066-002-85EE",
								"barcode": "197088026739",
								"updated_at": "2023-12-04T15:47:50"
							}
						}
					},
					{
						"node": {
							"id": "UHJvZHVjdDo0MTg4MDE4NDI=",
							"active": true,
							"warehouse_id": "V2FyZWhvdXNlOjY4ODcw",
							"warehouse": {
								"identifier": "Nutrition Jay"
							},
							"updated_at": "2023-09-14T21:05:29",
							"product": {
								"id": "UHJvZHVjdEluZm86MzA4MjQ3NTU0",
								"sku": "5000066-002-85EE",
								"barcode": "197088026739",
								"updated_at": "2023-12-04T15:47:50"
							}
						}
					},
					{
						"node": {
							"id": "UHJvZHVjdDo0MTM4NjQ4MTc=",
							"active": true,
							"warehouse_id": "V2FyZWhvdXNlOjk4Nw==",
							"warehouse": {
								"identifier": "Primary"
							},
							"updated_at": "2023-11-29T21:19:12",
							"product": {
								"id": "UHJvZHVjdEluZm86MzA4MjQ3NTU0",
								"sku": "5000066-002-85EE",
								"barcode": "197088026739",
								"updated_at": "2023-12-04T15:47:50"
							}
						}
					}
				]
			}
		}
	},
	"extensions": {
		"throttling": {
			"estimated_complexity": 101,
			"cost": 6,
			"cost_detail": {
				"warehouse_products": {
					"items_count": 5,
					"cost": 1,
					"total_cost": 6,
					"fields": {}
				}
			},
			"user_quota": {
				"credits_remaining": 1993,
				"max_available": 2002,
				"increment_rate": 30
			}
		}
	}
}

```

---

<div class="post-metadata">

**Author:** ![sh-agent](https://avatars.discourse-cdn.com/v4/letter/s/e47774/32.png) [@sh-agent](https://community.shiphero.com/u/sh-agent)\
**Post date:** [December 6, 2023, 3:50pm UTC](https://community.shiphero.com/t/product-api-returns-non-existing-product/1985/16 "2023-12-06T15:50:01Z")

</div>

Hey @originsid,

Thanks for providing this detailed information!

I’ll have an update for you shortly.

Best,  
RayanP

---

<div class="post-metadata">

**Author:** ![sh-agent](https://avatars.discourse-cdn.com/v4/letter/s/e47774/32.png) [@sh-agent](https://community.shiphero.com/u/sh-agent)\
**Post date:** [December 7, 2023, 3:32pm UTC](https://community.shiphero.com/t/product-api-returns-non-existing-product/1985/17 "2023-12-07T15:32:21Z")

</div>

Hey @originsid,

Thanks for hanging in there!

I’ve created a fresh engineering ticket for this issue. Thank you again for the detailed information - it goes a long way.

I’ll update you here when there are any updates to share.

Best,  
RayanP

---

<div class="post-metadata">

**Author:** ![originsid](https://avatars.discourse-cdn.com/v4/letter/o/cc9497/32.png) [@originsid](https://community.shiphero.com/u/originsid)\
**Post date:** [December 7, 2023, 3:44pm UTC](https://community.shiphero.com/t/product-api-returns-non-existing-product/1985/19 "2023-12-07T15:44:40Z")

</div>

Excellent, thank you @sh-agent !

Definitely understand it’s a huge help to have clear info on a problem and how to reproduce it before working on a solution for it

🕶🤙
