@plentymarkets/shop-api / setCustomAssets
Function: setCustomAssets() ​
Defined in: api/setCustomAssets/index.ts:32
Method setCustomAssets - Used to bulk upsert custom assets.
Parameters ​
context ​
PlentysystemsIntegrationContext
assets ​
Asset[]
Returns ​
Promise with upserted custom assets data
Remarks ​
- Calls '/rest/storefront/custom-assets/bulkUpsert'
- Method inserts new custom assets or updates existing ones based on id
Example ​
ts
const { data } = await useSdk().plentysystems.setCustomAssets([
{
language: 'en',
type: 'script',
name: 'Analytics',
assetKey: 'google-analytics',
content: '<script>...</script>',
isActive: true,
placement: 'head',
order: 1
}]);