I'm fetching all the parent products from the store-api including children/variants.
In my shop the only difference between the parent and the children/variants is the stock and the name.
For the children i add the following association, and it returns the children ( with api_alias product)
{
"page":1,
"limit" : 100,
"filter":[
{
"type":"equals",
"field":"product.parentId",
"value":null
}],
"associations":{
"children":{
"associations":{
"options":{}
}
},
"properties":{
"associations":{
"group":{}
}
}
},
"total-count-mode":1
}
I only need the stock and variant name, but it returns all the data like price, images etc.
I can use includes to define what i want back based on the api_alias. But this is product as well. So when i add the stock and options the rest also dissapears on the parent product.
"includes": {
"product" : ["children", "stock", "options"]
}
I also tried dot notation
"includes": {
"product" : ["children.options", "children.stock"]
}
That doesn't work either
How can i combine associations with includes, so that on the children i only get stock and options back. ( if this is even possible)