# Assets

#Available from v.3.2.0 Assets are files that can be stored in the system and referenced on products, variants, categories and global list values. Assets uploaded to the system are assigned a URL based on the assets file name. Each image asset can be auto-scaled, cropped and formatted by adding parameters to the URL of the asset. Thus, you should only upload an image once in the highest quality you will need it and the system will take care of any scaling automatically. Assets are organized in folders, which can be nested within each other.

PUT /assets Update filename and folder for a batch of assets

#Available from v.3.2.0

Request parameters

Property name Parameter type Data type Description
model body object

Models with information to update assets with

Response status OK (200)

No body message is returned

POST /assets Create new asset

#Available from v.3.2.0

Request parameters

Property name Parameter type Data type Description
folderId query string

Id of folder to place asset in

uploadedFile formData file

Upload File

Response status OK (200)

No body message is returned

DELETE /assets Delete multiple assets

#Available from v.3.2.0

Request parameters

Property name Parameter type Data type Description
ids body array : string

Ids of assets to delete

Response status OK (200)

No body message is returned

GET /assets/{id} Get an asset

#Available from v.3.2.0

Request parameters

Property name Parameter type Data type Description
id path string

Id of asset

Response status OK (200)

object : AssetModel
AssetModel
Property name Data type Description
Id string

Unique id of asset

Name string

Name of asset

Url string

Url of asset

Extension string

The file extension of the asset

FileType string

The type of file this asset is (file or image)

Type string

The type of asset (as specified in SupportedAssetTypes)

Created string

Timestamp of asset creation

LastModified string

Timestamp of last asset modification

Properties object

Properties

ParentId string

ParentId of asset. May be null.


PUT /assets/{id} Update an assets' filename and folder

#Available from v.3.2.0

Request parameters

Property name Parameter type Data type Description
id path string

Id of asset

model body object : UpdateAssetModel
UpdateAssetModel
Property name Data type Description
FolderId string

New folder id of asset

Filename string

New name of asset

Response status OK (200)

No body message is returned

DELETE /assets/{id} Delete an asset

#Available from v.3.2.0

Request parameters

Property name Parameter type Data type Description
id path string

Id of asset

Response status OK (200)

No body message is returned

PUT /assets/{id}/data Update physical file for asset

#Available from v.3.2.0

Request parameters

Property name Parameter type Data type Description
id path string

Id of asset

uploadedFile formData file

Upload File

Response status OK (200)

No body message is returned

GET /assets/{id}/references Get references to asset

#Available from v.3.2.0

Request parameters

Property name Parameter type Data type Description
id path string

Id of asset to get references for

Response status OK (200)

object : AssetReferencesModel
AssetReferencesModel
Property name Data type Description
GlobalListValueReferences array

Global list values referencing the asset

VariantReferences array

Variants referencing the asset

VariantGroupReferences array

Variant groups referencing the asset

ProductReferences array

Products referencing the asset

CategoryReferences array

Categories referencing the asset


POST /assets/batch Get a batch of assets

#Available from v.3.2.0

Request parameters

Property name Parameter type Data type Description
ids body array : string

ids of assets to get

Response status OK (200)

array : AssetModel
AssetModel
Property name Data type Description
Id string

Unique id of asset

Name string

Name of asset

Url string

Url of asset

Extension string

The file extension of the asset

FileType string

The type of file this asset is (file or image)

Type string

The type of asset (as specified in SupportedAssetTypes)

Created string

Timestamp of asset creation

LastModified string

Timestamp of last asset modification

Properties object

Properties

ParentId string

ParentId of asset. May be null.


POST /assets/batch/data Get a zip file containing the physical files of assets

#Available from v.3.7.0

Request parameters

Property name Parameter type Data type Description
ids body array : string

Ids of assets

maxWidth query integer

Max width to scale requested image assets into

maxHeight query integer

Max height to scale requested image assets into

format query string

Format to return image assets as. Valid options are jpg, jpeg, bmp, gif, png, png8, tif, tiff, webp

bgcolor query string

Background color to use when expanding canvas

Response status OK (200)

file

PUT /assets/folders Update folders

#Available from v.3.2.0

Request parameters

Property name Parameter type Data type Description
model body object

Model with asset information to update

Response status OK (200)

No body message is returned

POST /assets/folders Create new folders

#Available from v.3.2.0 Returns dictionary with filename of asset and the assigned id of the asset

Request parameters

Property name Parameter type Data type Description
models body array : CreateFolderModel

Models with information on folders to create

CreateFolderModel
Property name Data type Description
ParentId string

Id of parent to put this folder in (null if this folder shall be placed at root level)

Name string

Name of folder

Response status OK (200)

object

DELETE /assets/folders Delete multiple folders

#Available from v.3.2.0

Request parameters

Property name Parameter type Data type Description
ids body array : string

Ids of folders to delete

Response status OK (200)

No body message is returned

GET /assets/folders/{id} Get folder

#Available from v.3.2.0

Request parameters

Property name Parameter type Data type Description
id path string

Id of folder

Response status OK (200)

object : FolderModel
FolderModel
Property name Data type Description
Id string

Unique id of folder

ParentId string

Id of parent folder (null if folder is at root level)

Name string

Name of folder


PUT /assets/folders/{id} Update a folder

#Available from v.3.2.0

Request parameters

Property name Parameter type Data type Description
id path string

Id of folder

model body object : UpdateFolderModel

Model with folder information to update

UpdateFolderModel
Property name Data type Description
ParentId string

New parent of folder

Name string

New name of folder

Response status OK (200)

No body message is returned

DELETE /assets/folders/{id} Delete a folder

#Available from v.3.2.0

Request parameters

Property name Parameter type Data type Description
id path string

Id of folder

Response status OK (200)

No body message is returned

GET /assets/folders/{id}/assets Get assets in folder

#Available from v.3.2.0 Use "root" as id to get assets in the root directory of the media archive

Request parameters

Property name Parameter type Data type Description
id path string

Id of folder to get assets for

Response status OK (200)

array : AssetModel
AssetModel
Property name Data type Description
Id string

Unique id of asset

Name string

Name of asset

Url string

Url of asset

Extension string

The file extension of the asset

FileType string

The type of file this asset is (file or image)

Type string

The type of asset (as specified in SupportedAssetTypes)

Created string

Timestamp of asset creation

LastModified string

Timestamp of last asset modification

Properties object

Properties

ParentId string

ParentId of asset. May be null.


GET /assets/folders/{id}/assets/{filename} Get an asset in a folder by its name

#Available from v.3.2.0

Request parameters

Property name Parameter type Data type Description
id path string

Id of folder to search within

filename path string

Filename to search for

Response status OK (200)

object : AssetModel
AssetModel
Property name Data type Description
Id string

Unique id of asset

Name string

Name of asset

Url string

Url of asset

Extension string

The file extension of the asset

FileType string

The type of file this asset is (file or image)

Type string

The type of asset (as specified in SupportedAssetTypes)

Created string

Timestamp of asset creation

LastModified string

Timestamp of last asset modification

Properties object

Properties

ParentId string

ParentId of asset. May be null.


GET /assets/folders/{id}/subfolders Get child folders

#Available from v.3.2.0 Use "root" as id to get folders in the root directory of the media archive

Request parameters

Property name Parameter type Data type Description
id path string

Id of folder to get children for

Response status OK (200)

array : FolderModel
FolderModel
Property name Data type Description
Id string

Unique id of folder

ParentId string

Id of parent folder (null if folder is at root level)

Name string

Name of folder


POST /assets/folders/batch Get a batch of folders

#Available from v.3.2.0

Request parameters

Property name Parameter type Data type Description
ids body array : string

Ids of folders to return

Response status OK (200)

array : FolderModel
FolderModel
Property name Data type Description
Id string

Unique id of folder

ParentId string

Id of parent folder (null if folder is at root level)

Name string

Name of folder


GET /assets/ids Get ids of all assets in the system

Response status OK (200)

array : string