Category
In the QSC Console categories can be managed.
There are serveral options to compute the category tree:
- 1.) compute the tree in a external system and save it in the qsc
- This is useful when the tree is managed in an external system
- 2.) create the tree in qsc manually
- 3.) compute the tree in qsc
Configuration
- strategy
- passthrough: the category tree is directly returned - there is no check that all categories have documents
- default: only categories with documents are returned - with a search query it is checked that each category has documents - this is useful for permissions where not ervery user cann see all documents
- facet: the category tree is computed directly by a facet.
- searchCode: defines which search is used to compute the category tree - default: navigation
- searchQuery: defines which search query is used to compute the category tree
- facetId: defines which facet is used to compute the category tree
- default: categories
- categoryNameMergeStrategy - configure how the category names are merged
- qsc - the category names are configured in qsc
- default - the category names are configured in an external system
- defaultSort: defines how the categories are sorted
- name: sort by the name of the category
- count: sort by the count of the category
Configuration facet
{
"strategy": "facet",
"category": {
"id": "root",
"name": "root",
"level": 0,
"children": [],
"tags": [
"active"
]
},
"searchQuery": {
"q": "*"
},
"facetId": "categories",
"searchCode": "trendware",
"defaultSort": "name"
}
Request:
- https://qsc-dev.quasiris.de/api/v1/category/demo/navigation
GET
andPOST
API is supported
Response:
{
"category": {
"id": "root",
"name": "root",
"children": [
{
"id": "Bekleidung",
"name": "Bekleidung",
"children": [
{
"id": "Damen",
"name": "Damen",
"children": [
{
"id": "Oberteile",
"name": "Oberteile",
"tags": [],
"count": 500
}
],
"tags": [],
"count": 500
},
{
"id": "Herren",
"name": "Herren",
"children": [
{
"id": "Oberteile",
"name": "Oberteile",
"tags": [],
"count": 4
}
],
"tags": [],
"count": 4
}
],
"tags": [],
"count": 504
},
{
"id": "Oberteile",
"name": "Oberteile",
"children": [
{
"id": "Herren",
"name": "Herren",
"children": [
{
"id": "Blazer",
"name": "Blazer",
"tags": [],
"count": 2
}
],
"tags": [],
"count": 2
}
],
"tags": [],
"count": 2
},
{
"id": "Schuhe",
"name": "Schuhe",
"children": [
{
"id": "Herren",
"name": "Herren",
"children": [
{
"id": "Sneaker",
"name": "Sneaker",
"tags": [],
"count": 500
}
],
"tags": [],
"count": 500
}
],
"tags": [],
"count": 500
}
],
"tags": []
}
}