Try our conversational search powered by Generative AI!

Importing assets via ServiceApi and specifying AssetKey


We have recently upgraded a customer project to CMS 12 and Commerce 14 and we are at the same time replacing the old PIM system integration with a new architecture that requires the use of ServiceApi for updating Optimizely Commerce content.

I now need to upload assets using ServiceApi and this appears to be possible with the /episerverapi/commerce/import/assets endpoint. But, in our old system we specified the AssetKey explicitely for ease of mapping an asset from the source PIM system to the asset in Optimizely.

I do realize this is likely not a recommended way of working, but is there any way I specify this AssetKey in the call to /episerverapi/commerce/import/assets that is not immediately obvious?

Thanks in advance for any input here!

Nov 22, 2023 10:51

For what its worth, I'll post a brief answer to this post in case someone else asks a similar question.

Important to note is that the asset import endpoint referenced above is an entry point to the Media service: 

In brief, the endpoint can upload multiple assets in a single upload and should include and XML file defining how and what to import. Within this XML you can specify the IntegrationId property to indicate the id used in the source system. The XML definition can be seen here:

Also discussed in thread:

Jan 17, 2024 8:06
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.