@plentymarkets/shop-api / doAddShopLogs
Function: doAddShopLogs() ​
doAddShopLogs(
context,params):Promise<Data<null>>
Defined in: api/doAddShopLogs/index.ts:36
Method doAddShopLogs - Used to add shop log events.
Parameters ​
context ​
PlentysystemsIntegrationContext
params ​
Array of ShopLogEvent objects, each containing: name: string, loggableType: string, loggableId: string, payload: JsonObject, triggeredAt: ISODateString
Returns ​
Promise<Data<null>>
type: null, value: null
Remarks ​
- Calls /rest/storefront/logs
- Method should be used to submit one or more log events from the storefront.
Example ​
ts
await useSdk().plentysystems.doAddShopLogs([
{
name: 'checkout.started',
loggableType: 'order',
loggableId: '123',
payload: { basketId: 456 },
triggeredAt: '2024-01-01T00:00:00.000Z' as ISODateString,
},
]);