Shopify REST Admin API(2019-10) with Filter by title has two different result?

Highlighted
Tourist
7 0 1

I show the product listing in my app using Shopify REST Admin API here I also show the total records.
now I am trying to set new Admin API and I face the issue in count API which gives me result according to the old way of a filter with the title(find a word in the title) and list API works according to new way of filter with a title (compare exact title).
so How can I show the total records?

product title is : bla bla
 
#case 1:
Retrieves a list of products 
admin/api/2019-10/products.json?title=bla 
 
response
{
"products": []
}
 
#case 2:
Retrieves a count of products
 
admin/api/2019-10/products/count.json?title=bla 
 
response
{
"count": 3
}
Hope it make sense...
0 Likes
Highlighted

Hello 

Requests that pass a value for title will match only if the value is the same as the complete title. Partial matches aren't supported in Admin Product API version 2019-10
Means You will pass product title name completely not partial because partial title is not supported while filter in API Version 2019-10

EX : Your product title is : bla bla

So Your Admin product filter API like below

admin/api/2019-10/products.json?title=bla bla

Want to modify or incorporate custom changes on store, Hire us
If helpful then please Like and Accept Solution .
Email: pallavi@oscprofessionals.com
Skype : oscprofessionals-87
Whats app
Free Website Review and advice for sale from Shopify Conversion Experts | Shopify Private App | Custom Theme Development | Custom Modifications In To Shopify Theme | Shopify SEO ; Digital Marketing & amp | Site Speed Optimization | Performance Site Audit
0 Likes
Highlighted
New Member
2 0 0

What's the best way to do a partial match query for title?

 

For example, I want to search for "bla" and have the product with a title of "bla bla" returned in the results.

0 Likes
Highlighted
New Member
1 0 0

Hi @oscprofessional ,

 

It's not working anymore as per your suggestion.

 

Here is am using the same but no luck.

ShopifyApp::shop()->api()->rest( 'GET', '/admin/api/2019-10/products.json?title=beread');

 

its return 

 

{#280   +"errors": false
  +"response": GuzzleHttp\Psr7\Response {#287 
    -reasonPhrase: "OK"
    -statusCode: 200
    -headers: array:30 []
    -headerNames: array:30 []
    -protocol: "1.1"
    -stream: GuzzleHttp\Psr7\Stream {#285 }
  }
  +"body": null
  +"link": null
  +"timestamps": array:2 [
    0 => null
    1 => 1578491212.1431
  ]}

{#280 ▼
  +"errors": false
  +"response": GuzzleHttp\Psr7\Response {#287 ▼
    -reasonPhrase: "OK"
    -statusCode: 200
    -headers: array:30 [▶]
    -headerNames: array:30 [▶]
    -protocol: "1.1"
    -stream: GuzzleHttp\Psr7\Stream {#285 ▶}
  }
  +"body": null
  +"link": null
  +"timestamps": array:2 [▼
    0 => null
    1 => 1578491212.1431
  ]
}

 

0 Likes
Highlighted
New Member
2 0 0

So I found out that Shopify's graphql endpoints are much more robust and you CAN do partial matching search using the following structure:

 

{
				shop {
					search(query: "partial search term", types: PRODUCT, first: 10) {
						edges {
							node {
								reference {
									id
								}
								title
								image {
									originalSrc
									id
								}
								description
							}
							cursor
						}
						pageInfo {
							hasNextPage
							hasPreviousPage
						}
					}
				}
			}

 

 

 

0 Likes