It's a little bit of work to set up, but I used the python api and created a sqlite database that stored all of the product id's and associated sku's so that I could just query the database and look up the product directly by id, given a specific sku:
product = shopify.Product.find(id)
Then I can make changes to the product and save it. You could potentially do the same thing with titles instead of skus.
You can search by title using the "title" param on the /admin/products.json API that Shopinet mentioned. As in:
I've found that some very simple matching is done. For example, searching with a title of "blue" will match a product named "blue shirt". But I haven't found a way to insert real wildcards... and the matching from the API isn't as good as the matching demonstrated by Shopify's own admin UI widgets.
So for now I'm using the "title" query param, but planning to pull everything into my own searchable datastore in the near future.
I did an Ajax request inside my Shopify App using this "/admin/products.json?title=<searchString>,limit=250,page=1,fields="id,title,etc" to search product by title ... but i get nailed by CORS.
Is there any way to use Ajax API call inside Shopify App or any alternative solution to Filter/Search data from API ?
I don't believe the CORS issue you're seeing is related to the query params used for searching products by title. This sounds like a general issue getting started with the API.
For what it's worth, you need to call the JSON API from your registered application... by which I mean your registered, authenticated server needs to make the call to the Shopify server. Not the browser. (I mention this because you said you're trying to use Ajax.)
Thank you Jerard,
Actually I have an Embeded App on Shopify and its run on my private VPS with an SSL certificate ... and I make calls to the Shopify API by a library called ShopifySharp ... every thing work great, But I need to filter & search products by Title!
Is there any alternative way to do a client side filter & search ? I heard about the App Proxy but i'm not sure !
perhaps the api changed, but i wanted to note this is not correct
rather, you want the extra options added with `&` and not " so instead
also page=1 isn't supported anymore, see here for updated pagination docs https://shopify.dev/tutorials/make-paginated-requests-to-rest-admin-api