Skip to main content
This API endpoint allows a merchant to manage product media such as images.

Methods


Entity Properties


product_media.list

product_media.list (string $sku) Retrieve list of product images

Parameters

sku
string
Product SKU.

Return Value

An array of objects. Each object will contain Image Data.

Example Request

Get product images by product SKU:
Request

Example Response

Response

Error Codes


product_media.types

product_media.types (number $setId) Retrieve product image types

Parameters

setId
integer
Attribute set id.

Return Value

An array of objects. Each object will contain Image Type Properties.

Example Request

Request

Example Response

Response

product_media.create

product_media.create (string $sku, object $data) Upload new product image

Parameters

sku
string
Product SKU.
data
object
Image data.

Return Value

Image file name (e.g., “/i/m/image.png”)

Example Request

Request

Example Response

Response

Error Codes


product_media.update

product_media.update (string $sku, string $file, object $data) Update product image

Parameters

sku
string
Product SKU.
file
string
Image file name.
data
object
Image data.

Return Value

true, if the image has been uploaded

Example Request

Request

Example Response

Response

Error Codes


product_media.remove

product_media.remove (string $sku, string $file) Remove product image

Parameters

sku
string
Product SKU.
file
string
Image file.

Return Value

true, if the image has been removed

Example Request

Request

Example Response

Response

Error Codes

Entity Properties

Image Type Properties

Image Mime Type

Image Data