Add or Update Images


When to Use

  • After a product is created, this is how to add or update images to a product.
  • PlacementName entity facilitates adding/updating images utilizing the following nomenclature in the Resource URL / Endpoint: ('ITEMIMAGEURL1'), ('ITEMIMAGEURL2'), ('ITEMIMAGEURL3'), ('ITEMIMAGEURL4'), ('ITEMIMAGEURL5'), ('ITEMIMAGEURL6'), etc.
  • It is not required that images are added/updated in sequential order as long as the PlacementName value reflects the expected final positioning of the image(s) upon completion.
  • Requires the Product ID (not the Sku - the ChannelAdvisor unique ID representing the product).
    • Place a GET Products request and $filter=Sku eq 'PRODUCT SKU VALUE'&$select=ID to return the ID to use in this request.

Resource URL / Endpoint

PATCH or PUT https://api.channeladvisor.com/v1/Products(ProductID)/Images('PlacementName') 

($batch request format) PATCH or PUT https://api.channeladvisor.com/v1/Images(ProductID=ProductID,PlacementName='PlacementName') 

Important and/or Required Parameters

PropertyType (Max Length)RequiredNote
ProductIDinteger (32 bit)RequiredInclude in URL. The ChannelAdvisor defined unique ID (not the Sku value) of the product.
See note above under "When to Use" about retrieving the Product ID.
PlacementNamestring (50)RequiredInclude in URL. Name that corresponds with placement of the image.
Urlstring (255)RequiredInclude in body.
Example Request
PATCH or PUT https://api.channeladvisor.com/v1/Products(22120547)/Images('ITEMIMAGEURL1')?access_token=xxxxxxxxxx
{
	"Url": "http://www.opensourcetestmanagement.com/images/body-ad.jpg"
}
Example Response (Success)
204 No Content