# SKU exists for client?

**URL:** <https://community.shiphero.com/t/sku-exists-for-client/2264>\
**Category:** GraphQL API\
**Created:** [December 7, 2022, 7:38pm UTC](https://community.shiphero.com/t/sku-exists-for-client/2264 "2022-12-07T19:38:14Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Raj](https://avatars.discourse-cdn.com/v4/letter/r/c0e974/32.png) [@Raj](https://community.shiphero.com/u/Raj)\
**Post date:** [December 7, 2022, 7:38pm UTC](https://community.shiphero.com/t/sku-exists-for-client/2264/1 "2022-12-07T19:38:14Z")

</div>

Hi, Is there a way to put a client\_id filter for the product query?  
I’m trying to determine if a given sku under a 3PL client account exists before sending a product\_create mutation.  
Pls feel free to suggest if there’s a better way to achieve the same.  
Thank you!

---

<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, 2022, 7:59pm UTC](https://community.shiphero.com/t/sku-exists-for-client/2264/2 "2022-12-07T19:59:03Z")

</div>

Hey @Raj,

Thanks for reaching out!

You can attach the `customer_account_id` filter to your products query.  
A small example query would look something like this:

```auto
{
  products(sku: "string", customer_account_id: "string") {
    request_id
    complexity
    data(first: 10) {
      edges {
        node {
          id
          legacy_id
          sku
          name
        }
      }
    }
  }
}

```

Let me know if this works for you!

Best,  
RayanP

---

<div class="post-metadata">

**Author:** ![Raj](https://avatars.discourse-cdn.com/v4/letter/r/c0e974/32.png) [@Raj](https://community.shiphero.com/u/Raj)\
**Post date:** [December 7, 2022, 8:02pm UTC](https://community.shiphero.com/t/sku-exists-for-client/2264/3 "2022-12-07T20:02:23Z")

</div>

That’s perfect! Just one last bit - is the account\_id the same as client\_id that we see in the dashboard here: [https://3pl.shiphero.com/threepl](https://3pl.shiphero.com/threepl)  
Sorry there are just so many ids that it gets hard to keep track of.  
Thank you!

---

<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, 2022, 8:07pm UTC](https://community.shiphero.com/t/sku-exists-for-client/2264/4 "2022-12-07T20:07:47Z")

</div>

Hey @Raj,  
You’re welcome!

I believe those would be the same ID.  
Let me know if there’s anything I can do to assist.

Best,  
RayanP

---

<div class="post-metadata">

**Author:** ![Raj](https://avatars.discourse-cdn.com/v4/letter/r/c0e974/32.png) [@Raj](https://community.shiphero.com/u/Raj)\
**Post date:** [December 7, 2022, 8:47pm UTC](https://community.shiphero.com/t/sku-exists-for-client/2264/5 "2022-12-07T20:47:22Z")

</div>

Thank you @sh-agent for the quick responses - I tried multiple IDs but giving both the sku and id filters gives zero results to me each time. Here’s my last request id “6390fb0e9c7b82baa08f45fe”.

I also didn’t know you could put ‘sku’ filter in the **products** query, but I tried just putting the sku filter and it seems to ignore the filter and starts sending hundreds of products.

---

<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, 2022, 8:55pm UTC](https://community.shiphero.com/t/sku-exists-for-client/2264/6 "2022-12-07T20:55:19Z")

</div>

Hey @Raj,

No problem, looking into this now.  
Will keep you updated.

Let me know if there’s anything I can do to assist in the meantime!

Best,  
RayanP

---

<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:** [December 8, 2022, 1:16pm UTC](https://community.shiphero.com/t/sku-exists-for-client/2264/7 "2022-12-08T13:16:23Z")

</div>

Hello @Raj

I checked that req ID; in that case, you sent the same value for SKU and customer\_account\_id.

I picked up several random SKUs for that customer ID from the UI and replaced them in the call, and I am getting successful responses.

If you have a request ID for a call that returned hundreds of products I could also look into that.

Have a great day!  
TomasFD

---

<div class="post-metadata">

**Author:** ![Raj](https://avatars.discourse-cdn.com/v4/letter/r/c0e974/32.png) [@Raj](https://community.shiphero.com/u/Raj)\
**Post date:** [December 8, 2022, 1:35pm UTC](https://community.shiphero.com/t/sku-exists-for-client/2264/8 "2022-12-08T13:35:46Z")

</div>

Oh crap… That’s right, I totally messed up - classic PEBKAC!  
Thank you mate once again for your help… though I should’ve caught that one. Cheers!
