api - How to search product with SKU in shopify using PHP cURL
The API you shared is correct, please use the code below to fetch the product based on SKU.
<?php $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => 'https://yourstore.myshopify.com/admin/api/2022-10/products/search.json?query=sku:ABC74357', CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, CURLOPT_CUSTOMREQUEST => 'GET' )); $response = curl_exec($curl); curl_close($curl); echo $response;
If you are using Linux, you must install the Apache server and PHP to run the above code, and for windows, you have to use the Xampp server.
Didn't find the answer?
Our community is visited by hundreds of Shopify development professionals every day. Ask your question and get a quick answer for free.
Find the answer in similar questions on our website.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.