HomeDev GuideAPI Reference
Dev GuideAPI ReferenceUser GuideGitHubNuGetDev CommunityDoc feedbackLog In
GitHubNuGetDev CommunityDoc feedback


The catalog asset linking service is an operation that imports catalog item asset data into the Optimizely Commerce database to be used by Commerce components.

The Service API allows for bulk importing of catalog item asset linking into Optimizely Commerce. A catalog item asset can be for example an image associated with a node/category, product or variant in Optimizely Commerce.

Prerequisites

The import/export process searches for ImageData content in the Optimizely Content Management System (CMS) database. Any asset to be associated with catalog items must be present in the CMS database before running import/export.

## Catalog asset linking methods

### Bulk import with file

The following catalog asset linking XML shows how to generate the XML needed for the method.

post/episerverapi/commerce/import/links



Response



### Bulk import with file upload identifier

For this method to work, you need to a valid **upload identifier** for an asset linking XML file previously uploaded using the chunked upload methods, see [Chunk upload of large files](🔗).

Column Title
Column Title
Column Title
POSTpost/episerverapi/commerce/import/catalog/{uploadId}The following Catalog asset linking XML shows how to generate the XML needed for the method.


Response



## Catalog asset linking XML

The following example shows what a catalog item asset export looks like.


  • CatalogItemAssetCollection – Adds catalog asset links to the catalog.

    • TotalCount – Required. Number of assets to be linked

    • CatalogItemAssets – Adds catalog asset links to the catalog.

    • CatalogItemAsset – Element to add or update catalog item asset. - CatalogItemType – Required. The item type (node, entry). - CatalogItemCode – Required. The code of the entry or node. - AssetPath – The path to the asset from the global asset root. - AssetName – Required. The filename of the asset, including extension. - AssetType – Required. The type of asset: - Image – episerver.core.icontentimage. - Other – episerver.core.icontentmedia. - GroupName – Way to group assets together for node or entry, (for example, _Additional Images_). - SortOrder – Required. The order in which associations are returned.