Is there any way to get product data from its SKU and update the product data using this.

krish115
Shopify Partner
26 0 5

I want to update product data like tags, price, etc from a csv input. The process works fine is i use the product id instead of its SKU, but i need to update the data using SKU, I am unable to find a suitable end point or the URL to perform the task, all the search result leads to this url "https://store..myshopify.com/search?type=product&q=variants.sku:XYZ00" but this not working. Anyone?

Replies 3 (3)

gr_trading
Shopify Partner
1762 142 187

Hi @krish115 

 

You can use GraphQL queries to search using SKU or the BARCODE. Below is the sample query.

{
  products(first: 5, query: "sku:abc123") {
    edges {
      node {
        title
        variants(first: 10) {
          edges {
            node {
              barcode
            }
          }
        }
      }
    }
  }
}

 

Hope this will help...

For any custom development WhatsApp or connect at Email ID: gr.trading15@gmail.com for quick consultation. | Shopify Free codes
To support Buy Me a Coffee
krish115
Shopify Partner
26 0 5

This is working but it has limit of 250 products only, can I fetch more than 250 products? like all products in my store.

 

gr_trading
Shopify Partner
1762 142 187

Yes, for security and performance reason their is a limit of max 250 records, to get data beyond to that you have to use pagination.

 

 

For any custom development WhatsApp or connect at Email ID: gr.trading15@gmail.com for quick consultation. | Shopify Free codes
To support Buy Me a Coffee