How to search Shopify items with SKU number?

Hi guys!

When you have an SKU number only, how can you get a product with the Shopify module?

Does anyone have an idea?

Thanks!

Hi @Alderd_Froolik,

I don’t know if there were changes in the meantime, but long ago I had the same challenge. Using the Shopify API to search for a product by SKU is directly possible (so also not in Make), but it requires retrieving all products and their variants, then filtering the variants by SKU.

So first you can list all products with the default module or Make an API call module (admin/api/2024-04/products.json) and save all products. Each product contains a ‘variants’ array, which contains an SKU per variant.

Cheers,
Henk

Hello Henk,

With over 100.000 items it’s a bit heavy on downloading. That is why I am looking for a different approach.

Maybe some other way to find.

Thanks!

I completely understand. I found a lot of discussions only about this on many different forums. As the SKU is part of a productvariant and not of a product, there are some hefty discussions over the past 12 (!! lol) years.

It seems that some people use the Storefront API to search on SKU:

If a response is returned, it contains the product ID. Which should make it easier to retrieve the product.

This is all I could find, I hope it is of some use.

Cheers,
Henk

2 Likes

At this moment I’m stuck.

With the API I just the the X-shopID.

Any ideas to get the right product ID?

Thanks!