@plentymarkets/shop-api / getPreviewValid
Function: getPreviewValid() ​
getPreviewValid(
context):Promise<Data<boolean>>
Defined in: api/getPreviewValid/index.ts:18
Method getPreviewValid - check if the current storefront preview session is valid
Parameters ​
context ​
PlentysystemsIntegrationContext
Returns ​
Promise<Data<boolean>>
Promise<{data: boolean}>
Remarks ​
calls /rest/storefront/preview/valid and returns whether the preview session is valid
Example ​
ts
const { data, error } = await useAsyncData(() => sdk.plentysystems.getPreviewValid());