@plentymarkets/shop-api / getInit
Function: getInit() ​
getInit(
context
):Promise
<Data
<InitResult
>>
Defined in: api/getInit/index.ts:17
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());