Query With Shopify Product API

Solved
sbdev
Shopify Partner
34 0 3

Hello,

I am using Shopify Product REST API and passing product title in the query parameter.

Before certain days I was passing "t" as a product name I was getting all the products starting with t letter. But now the API is only responding when I enter the entire product name.
Maybe Shopify updated their API or what I do not aware of. Can anyone know how to achieve this functionality?

I need all products in response which starting from the letter which is entered or provided to the API.

Below mentioned are the details of this REST API.

 

GET request on "api/2020-07/products.json" URL with the "title" parameter.

I have also tried with 2020-04 and 2020-01 API versions but nothing worked.

If anyone can help to suggest ways to do this then it will be highly suggested.

 

Thank you for hearing me.

 

0 Likes
olivert
Explorer
51 11 14

This is an accepted solution.

Hi Mate, 

They canned this functionality in API version 2019-07
Only way you can get partial title matching is with GraphQL. 

you could also use an older version of the API in your URL. but you'll need to upgrade eventually!

patch notes below:

https://help.shopify.com/en/api/versioning/release-notes/2019-07

sbdev
Shopify Partner
34 0 3

Hello, @olivert,

 

Thanks for your response. Is there any other way to tackle this situation using REST API or we have to compulsory use GRAPHQL API?
Transforming of the API may take a certain time and our app is in production and users are lacking this feature. Can anyone is having some suggestions/information?

Thanks again.

0 Likes
olivert
Explorer
51 11 14

This is an accepted solution.

Have a go at changing your API version to an older one.

2019-04

This is an unsupported version of the API

 

You would be better off changing your logic to maybe search by the entire title or using another field like barcode or SKU to identify an item

Long term switching to GraphQL would be the safer option as shopify prefer it. But I understand that's a complete rework of your code.

sbdev
Shopify Partner
34 0 3

Thanks @olivert. I highly appreciate your help mate.

0 Likes