Reorder Property Index
PUT /v2/product/property/reorder
Reorders top-level product property groups based on the provided list of names (e.g., \{"names": \["Storage", "Memory"\]\}). The service validates the input, updates each group’s orderIndex, persists changes, and returns the updated property collection including each group’s values.
Request Body
{
"names": [
"Storage",
"Memory"
]
}
Response Example
[
{
"name": "Storage",
"displayName": null,
"orderIndex": 0,
"values": [
{
"_id": "prop-val-id-1",
"value": "1TB SSD",
"tenant": "tenant-id-1",
"orderIndex": 0,
"productsCount": 1
},
{
"_id": "prop-val-id-2",
"value": "256GB SSD",
"tenant": "tenant-id-1",
"orderIndex": 0,
"productsCount": 3
},
{
"_id": "prop-val-id-3",
"value": "512GB SSD",
"tenant": "tenant-id-1",
"orderIndex": 0,
"productsCount": 4
}
]
},
{
"name": "Memory",
"displayName": null,
"orderIndex": 1,
"values": [
{
"_id": "prop-val-id-4",
"tenant": "tenant-id-1",
"orderIndex": 1,
"productsCount": 0
},
{
"_id": "prop-val-id-5",
"value": "16GB RAM",
"tenant": "tenant-id-1",
"orderIndex": 1,
"productsCount": 6
},
{
"_id": "prop-val-id-6",
"value": "8GB RAM",
"tenant": "tenant-id-1",
"orderIndex": 1,
"productsCount": 2
}
]
},
{
"name": "Size",
"displayName": null,
"orderIndex": 2,
"values": [
{
"_id": "prop-val-id-7",
"value": "13.3-inch",
"tenant": "tenant-id-1",
"orderIndex": 3,
"productsCount": 2
},
{
"_id": "prop-val-id-8",
"value": "14-inch",
"tenant": "tenant-id-1",
"orderIndex": 3,
"productsCount": 2
}
]
}
]