API issue, can't fetch products filtering by their title

Solved
Tourist
4 1 0

Hi guys ! I'm trying to migrate to the new api, but I can't fetch products filtering by their title

 

API 2019-04 (Works fine, has results 🍻)

Url: https://{{api_key}}:{{api_password}}@{{store_name}}.myshopify.com/admin/api/2019-04/products.json?title=value

Results :

{
    "products": [
        {..},
        {..},
        {..},
        {..},
        {..},
        {..},
    ]
}

 

API 2019-07 (No results 🥺)

Url: https://{{api_key}}:{{api_password}}@{{store_name}}.myshopify.com/admin/api/2019-07/products.json?title=value

Results :

{
    "products": []
}

 

The docs : https://help.shopify.com/en/api/reference/products/product?api[version]=2019-07

In the docs title is supported ¿Any ideas ? 

0 Likes

Success.

Tourist
4 1 0

Hi ! I founded my "problem" here https://help.shopify.com/en/api/versioning/release-notes/2019-07

Searching by partial title is not supported now, the 2019-07 changelog:

 

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.

 

 

0 Likes

Success.

Shopify Partner
15 1 2

Partial matching has moved to the GraphQL endpoint. To match all products containing "partial", you'd provide the query:

*partial*

 

For example:

{
  products(first: 10, query: "title:*partial*") {
    edges {
      node {
        id
        title
      }
    }
  }
}
1 Like