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?
Hello identix,
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
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 ] }
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 } } } }
User | Count |
---|---|
13 | |
12 | |
7 | |
4 | |
4 |