Add or Update Single or Multiple Attributes


When to Use

  • After a product is created, this is how to add or update attributes and attribute values for a product.
  • 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.
  • Encode any characters in the Attribute Name that may be interpreted as operators in the URI.
  • Optional: use this endpoint in $batch requests.

Resource URL / Endpoint

POST https://api.channeladvisor.com/v1/Products(ProductID)/UpdateAttributes

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.
Namestring (32)RequiredInclude in body. The name of the attribute.
Valuestring (32,000)RequiredInclude in body. The value that corresponds with the name given.
Example Request
POST https://api.channeladvisor.com/v1/Products(12345678)/UpdateAttributes?access_token=xxxxxxxxxx
{
	"Value":
	{
		"Attributes":
			[{
				"Name": "Men's Shoe Size (US)",
				"Value": "12 M"
			},
			{
				"Name": "US Color",
				"Value": "Dark Blue"
			},
			{
				"Name": "UK Colour",
				"Value": "Dark Blue"
			}]
	}
}
Example Response (Success)
204 No Content