Loading...
Area: Episerver Service API
Applies to versions: 1 and higher

Catalog asset linking service

Recommendations [hide]

This section describes how to work with bulk operations with the Episerver Service API. The catalog asset linking service is a bulk operation that imports catalog item asset data into the Episerver Commerce database to be used by Commerce components.

How it works

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

Prerequisites

The import/export process searches for ImageData content in the 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

Catalog asset linking import with file

episerverapi/commerce/import/links
The following catalog asset linking XML shows how to generate the XML needed for the method.

Catalog asset linking import with file upload identifier

episerverapi/commerce/import/links/{uploadId:guid}
The following Catalog asset linking XML shows how to generate the XML needed for the method. For this method to work, you need to a valid upload identifier of a asset linking XML file previously uploaded using the chunked upload methods.

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.
Do you find this information helpful? Please log in to provide feedback.

Last updated: Oct 20, 2016

Recommendations [hide]