Retrieve Labels


When to Use

  • To retrieve a list of products and labels that are applied across all authorized profiles.
  • To retrieve a list of all labels applied to a single product.
  • To retrieve the value of a specific label applied to a single 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 that may be interpreted as operators in the URI.

Resource URL / Endpoint

GET https://api.channeladvisor.com/v1/ProductLabels
GET https://api.channeladvisor.com/v1/Products(ProductID)/Labels
GET https://api.channeladvisor.com/v1/Products(ProductID)/Labels('Name')

Required Parameters

PropertyType (Max Length)RequiredNote
ProductIDinteger (32 bit)ConditionalRequired to retrieve labels for a specific product.
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.
Namestring (32)ConditionalInclude in the URL. The name of the attribute. Required to retrieve the specific value of the label.
Example Request
GET https://api.channeladvisor.com/v1/Products(22223456)/Labels?access_token=xxxxxxxxxx
Example Response (Success)
200 OK
{
  "@odata.context": "https://api.channeladvisor.com/v1/$metadata#ProductLabels",
  "value": [
    {
      "ProductID": 22223456,
      "ProfileID": 12344678,
      "Name": "All Inventory"
    },
    {
      "ProductID": 22223456,
      "ProfileID": 12344678,
      "Name": "Shoes"
    }
  ]
}