Can't expand nested fields when querying product variant Store API route #5963
Replies: 3 comments
-
Hi, |
Beta Was this translation helpful? Give feedback.
-
What I found is that it's impossible to expand nested fields querying product variant, I guess |
Beta Was this translation helpful? Give feedback.
-
@hauseyo Hello! Sorry, I haven't found anything to solve this I wanted to implement a list of product variant items, instead of a list of product items that include variants, but after I've learned that product variants are not searchable, unlike products, I gave up on this Based on what you've found, fields are indeed not expandable So, if you need to get option names/titles, the only way is through product items list, probably ( |
Beta Was this translation helpful? Give feedback.
-
Good day!
I'm querying Store API route of product variant, and I need to expand
options.option
nested field (to get the name of the option itself). Docs say that, in the response,options
is expandable field, as well asoption
inside of itWhen I query it like this:
http://localhost:9000/store/variants?expand=options.option
it says "Relations [options.option] are not valid". Previously, I successfully expanded nested fields, likevariants.prices
in Products API, but here it doesn't work.What am I doing wrong?
Beta Was this translation helpful? Give feedback.
All reactions