# How can I get latest SKU of a product through API?

**URL:** <https://community.shiphero.com/t/how-can-i-get-latest-sku-of-a-product-through-api/1552>\
**Category:** GraphQL API\
**Created:** [September 14, 2021, 2:57pm UTC](https://community.shiphero.com/t/how-can-i-get-latest-sku-of-a-product-through-api/1552 "2021-09-14T14:57:47Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Edwin](https://avatars.discourse-cdn.com/v4/letter/e/73ab20/32.png) [@Edwin](https://community.shiphero.com/u/Edwin)\
**Post date:** [September 14, 2021, 2:57pm UTC](https://community.shiphero.com/t/how-can-i-get-latest-sku-of-a-product-through-api/1552/1 "2021-09-14T14:57:48Z")

</div>

We are a 3PL that allows clients to manage their inventory on a customized dashboard with data pulled from ShipHero. How can we use the API to pull the latest SKU of a product from ShipHero so that the correct one is always displayed, given that customers may change their SKU of a product on Shopify and that would update the SKU in ShipHero, and we would need to show the latest SLU on our dashboard so that all 3 platforms show the same SKU?

---

<div class="post-metadata">

**Author:** ![Theresa](https://sea2.discourse-cdn.com/flex020/user_avatar/community.shiphero.com/theresa/32/377_2.png) [@Theresa](https://community.shiphero.com/u/Theresa)\
**Post date:** [September 14, 2021, 5:15pm UTC](https://community.shiphero.com/t/how-can-i-get-latest-sku-of-a-product-through-api/1552/2 "2021-09-14T17:15:43Z")

</div>

Hi @Edwin,  
Referencing this query, the product id will stay the same when the sku changes.

```auto
query{
  product(id: "<product id here>"){
    request_id
    complexity
    data{
     barcode
      id
      legacy_id
      sku
    }
  }
}

```

---

<div class="post-metadata">

**Author:** ![Edwin](https://avatars.discourse-cdn.com/v4/letter/e/73ab20/32.png) [@Edwin](https://community.shiphero.com/u/Edwin)\
**Post date:** [October 4, 2021, 2:38am UTC](https://community.shiphero.com/t/how-can-i-get-latest-sku-of-a-product-through-api/1552/3 "2021-10-04T02:38:20Z")

</div>

Thanks @Theresa. How can we detect if a product SKU has changed in ShipHero? Is there a webhook based on the Product ID or SKU that we can use to detect such changes.

---

<div class="post-metadata">

**Author:** ![Theresa](https://sea2.discourse-cdn.com/flex020/user_avatar/community.shiphero.com/theresa/32/377_2.png) [@Theresa](https://community.shiphero.com/u/Theresa)\
**Post date:** [October 4, 2021, 2:38pm UTC](https://community.shiphero.com/t/how-can-i-get-latest-sku-of-a-product-through-api/1552/4 "2021-10-04T14:38:35Z")

</div>

There is not a product change webhook. The following is a current list of webhooks available:

- Inventory Update
- Shipment Update
- Order Canceled
- Capture Payment
- PO Update
- Return Update
- Tote Complete
- Order Packed Out
- Package Added
- Order Allocated
- Order Deallocated

There is an overview of the webhooks available here: [Webhooks – Developer Resources | ShipHero](https://developer.shiphero.com/webhooks#overview).

---

<div class="post-metadata">

**Author:** ![Edwin](https://avatars.discourse-cdn.com/v4/letter/e/73ab20/32.png) [@Edwin](https://community.shiphero.com/u/Edwin)\
**Post date:** [October 4, 2021, 4:09pm UTC](https://community.shiphero.com/t/how-can-i-get-latest-sku-of-a-product-through-api/1552/5 "2021-10-04T16:09:39Z")

</div>

Hi Therea,

If that’s the case how can I propitiate changes to the product’s SKU from ShipHero to our system? Would that mean that I have to keep fetching for the SKU across all my merchants’ products? Wouldn’t that result in hitting the rate limit? Request advice.

Best Regards,  
Edwin

---

<div class="post-metadata">

**Author:** ![Theresa](https://sea2.discourse-cdn.com/flex020/user_avatar/community.shiphero.com/theresa/32/377_2.png) [@Theresa](https://community.shiphero.com/u/Theresa)\
**Post date:** [October 4, 2021, 4:39pm UTC](https://community.shiphero.com/t/how-can-i-get-latest-sku-of-a-product-through-api/1552/6 "2021-10-04T16:39:58Z")

</div>

Hi Edwin,  
SKU changes are not frequent in my understanding. They should be constant as a general rule. What would be the use case? Am I correct in my assumption that you would like a notification from ShipHero if a SKU was changed in ShopIfy. Thanks in advance!

---

<div class="post-metadata">

**Author:** ![Edwin](https://avatars.discourse-cdn.com/v4/letter/e/73ab20/32.png) [@Edwin](https://community.shiphero.com/u/Edwin)\
**Post date:** [October 6, 2021, 5:38am UTC](https://community.shiphero.com/t/how-can-i-get-latest-sku-of-a-product-through-api/1552/7 "2021-10-06T05:38:06Z")

</div>

Hi Theresa! Yes, you are absolutely right. SKU changes are not frequent and should be constant as a general rule.

However, the problem is that whilst it is a general rule, it is not enforced through the various online storefronts and marketplaces. In some platforms, even duplicate SKUs are allowed! Haha. And this is a problem because SKU is (and makes sense to be) the identifier for products for ShipHero API.

Hence, yes, I would like to have a notification (or webhook) if there are changes to SKUs of products in ShipHero, so that I can then trigger a fetch for the latest SKU of a product using its Product ID. This will ensure that my system has the latest ShipHero SKUs to work with.

Additionally, I would like to have a notification (or webhook) if there are changes to SKUs of products in online platforms and the rest of the online platforms. This is so that we can then change the SKU within ShipHero to match the changes in SKUs on those storefronts. So that orders can flow through smoothly.

Lastly, it will be great if we can pull up all SKUs across all platforms and ShipHero for comparison and determination if there are any SKU mismatches that we need to fix.

---

<div class="post-metadata">

**Author:** ![Theresa](https://sea2.discourse-cdn.com/flex020/user_avatar/community.shiphero.com/theresa/32/377_2.png) [@Theresa](https://community.shiphero.com/u/Theresa)\
**Post date:** [October 7, 2021, 6:46pm UTC](https://community.shiphero.com/t/how-can-i-get-latest-sku-of-a-product-through-api/1552/8 "2021-10-07T18:46:29Z")

</div>

Hi Edwin,  
I put this in for a feature. I will update you here when I get more information!
