@plentymarkets/shop-api / getSession
Function: getSession() ​
getSession(
context
):Promise
<Data
<SessionResult
>>
Method getSession - get client session based on cookie
Parameters ​
• context: PlentysystemsIntegrationContext
Returns ​
Promise
<Data
<SessionResult
>>
Promise<{data: SessionResult}>
Remarks ​
calls /rest/storefront/session/ and returns user session and cart
Example ​
ts
const { data, error } = await useAsyncData(() => sdk.plentysystems.getSession());