Add or Update Bundle Component Quantity


When to Use

  • After a bundle product and its components are created, this is how to update the quantity of the component items.
    • Not to be confused with updating available quantity for purchase, this value represents the quantity of this component that should be included in the bundle.
  • Requires the Product ID (these values are not the Sku value for their respective products - they are the ChannelAdvisor unique ID representing the product).
    • Place a GET Products request and $filter=Sku eq 'BUNDLE SKU VALUE'&$select=ID to return the ID of the bundle SKU to be used in the "ProductID" property.
  • Requires the Component ID (not the Component Sku) - which is the ChannelAdvisor Product ID of this product.
    • See examples of Bundle retrievals to get this value OR
    • Place a GET Products request and $filter=Sku eq 'COMPONENT SKU VALUE'&$select=ID to return the ID of the bundle SKU to be used in the "ComponentID" property.

Resource URL / Endpoint

PATCH or PUT https://api.channeladvisor.com/v1/Products(ProductID)/BundleComponents(ComponentID)

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

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 bundle product.
See note above under "When to Use" about retrieving the Product ID.
ComponentIDinteger (32 bit)RequiredInclude in URL. The ChannelAdvisor defined Product ID (not the Sku value) of the component item in this bundle.
See note above under "When to Use" about retrieving the Component ID.
Quantityinteger (32 bit)RequiredInclude in body. Quantity of this component that is purchased with the bundle.
Example Request
PATCH or PUT https://api.channeladvisor.com/v1/Products(22120547)/BundleComponents(25030556)?access_token=xxxxxxxxxx
{
	"Quantity": 5
}
Example Response (Success)
204 No Content