Add or Update Single Product Attribute Method #1

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.
  • The 'Name' of the attribute cannot have forward or backslashes, or other URL incompatible values.
  • For a way to create attributes during product creation, please see the pages on Creating Products.
  • Encode any characters in the Attribute Name that may be interpreted as operators in the URI.
  • Note: there are two other endpoints that can be used to add or update attribute data in $batch requests:

Resource URL / Endpoint

PATCH or PUT'Name')

($batch request format) PATCH or PUT, Name='Name')

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 URL. The name of the attribute.
Valuestring (32,000)RequiredInclude in body. The value that corresponds with the name given.
Example Request
PATCH or PUT'Men's Shoe Size (US)')?access_token=xxxxxxxxxx
    "Value": "12 M"
Example Response (Success)
204 No Content