Retrieve Product Attributes
When to Use
- After a product is created, this is how to retrieve 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.
- For a way to retrieve attributes product retrieval, please see the page on Retrieve One or All Products & Expand Collections.
- Encode any characters in the Attribute Name that may be interpreted as operators in the URI.
Resource URL / Endpoint
GET https://api.channeladvisor.com/v1/Products(ProductID)/Attributes
GET https://api.channeladvisor.com/v1/Products(ProductID)/Attributes(‘Name’)
Important and/or Required Parameters
Property | Type (Max Length) | Required | Note |
---|---|---|---|
ProductID | integer (32 bit) | Required | Include 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. |
Name | string (32) | Conditional | Required when retrieving specific Attribute name value. Include in URL. Identifies the ChannelAdvisor account. |
Example Request
GET https://api.channeladvisor.com/v1/Products(22223456)/Attributes?access_token=xxxxxxxxxx
Example Response (Success)
200 OK
{
"@odata.context": "https://api.channeladvisor.com/v1/$metadata#AttributeValues",
"value": [
{
"ProductID": 22223456,
"ProfileID": 12345678,
"Name": "Shoe Size",
"Value": "12 M"
},
{
"ProductID": 22223456,
"ProfileID": 12345678,
"Name": "Shoe Color",
"Value": "Dark Red"
}
]
}