@plentymarkets/shop-api / getFacet
Function: getFacet() ​
Method getFacet - Used to get the category facets.
Parameters ​
• context: PlentysystemsIntegrationContext
• params: FacetSearchCriteria
categoryId: id of the category. page: current page number. itemsPerPage: number of items per page. sort: type of sorting. facets: search facet
Returns ​
Category facets.
Remarks ​
- Calls /rest/storefront/items
- Method should be used to get the category facets.
Example ​
ts
const { data } = await useSdk().plentysystems.getFacet({
categoryId: '17',
categorySlug: "armchair-stool",
page: 1,
itemsPerPage: 20,
sort: 'sorting.price.avg_asc',
facets: 'feedback-2'
});