@plentymarkets/shop-api / getInit
Function: getInit() ​
getInit(
context
):Promise
<Data
<InitResult
>>
Method getInit - get current session and the category tree
Parameters ​
• context: PlentysystemsIntegrationContext
Returns ​
Promise
<Data
<InitResult
>>
Promise<{data: InitResult}>
Remarks ​
- calls /rest/storefront/init and returns user session and the category tree
Example ​
ts
const { data, error } = await useAsyncData(() => sdk.plentysystems.getInit());