Solved

Filter products with tags or metafields using greater/less than operation with HTTP API

NirpE
Visitor
2 0 0

Hello,

I have been trying to find an answer how should I use product tags or metafields in order to accomplish an API query (HTTP or GraphQL) where I can search for products which fall into specific range.

And if this is not directly available, is there some workaround?

 

---

For example:

A book has custom information: min_read_minutes=120 and max_read_minutes=240

So when a customer would look for books which read time is approx 3 hours (180 minutes), the query would be able to return that book.

Thanks!

Accepted Solution (1)

DavedelaIsla
Tourist
9 2 3

This is an accepted solution.

Hi, did you have any luck with this? From what I have read here (https://community.shopify.com/c/Shopify-Discussion/Query-all-products-with-a-given-metafield-value/m...) It seem that we can't query products or product variants with metafields.

View solution in original post

Replies 4 (4)

DavedelaIsla
Tourist
9 2 3

This is an accepted solution.

Hi, did you have any luck with this? From what I have read here (https://community.shopify.com/c/Shopify-Discussion/Query-all-products-with-a-given-metafield-value/m...) It seem that we can't query products or product variants with metafields.

NirpE
Visitor
2 0 0

I guess will have to figure out other way.

23123213
Shopify Partner
3 0 0

how can we do that >

921Kiyo
Shopify Partner
14 0 1

Did anyone figure this out? Even workaround?