@plentymarkets/shop-api / getBlocks
Function: getBlocks() ​
Method getBlocks - Used to get the blocks for a page/category/item.
Parameters ​
• context: PlentysystemsIntegrationContext
• params: GetBlocksParams
identifier: id of the category/item or url of immutable page. type: category/item/immutable.
Returns ​
Category facets.
Remarks ​
- Calls /rest/storefront/blocks
- Method should be used to get the blocks for a page/category/item.
Example ​
ts
const { data } = await useSdk().plentysystems.getBlocks({
identifier: 'shipping',
type: "immutable",
});