Update Quantity - Choose Update Type (Multi-DC Update)


When to Use

  • To update quantity in multiple distribution centers (for a single product) in one request.
  • To set quantity at an absolute (or any other Quantity Update Type) value.
  • 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.
  • To update quantity for a single product in multiple distribution centers in a $batch request.

Resource URL / Endpoint

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

Required Parameters

Property Type (Max Length) Required Description
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.
UpdateType enum Required Include in body. Value set determines how ChannelAdvisor will interpret the quantity.
Updates [ DistributionCenterID ] integer Required  Include in body. ChannelAdvisor's Distribution Center Unique ID.
Read more about Distribution Centers and accessing DistributionCenterIDs. 
Updates [ Quantity ] integer Required  Include in body. Available Quantity for the product.
Example Request
POST https://api.channeladvisor.com/v1/Products(6658423)/UpdateQuantity?access_token=xxxxxxxxxx
{
    "Value":{
		"UpdateType": "Absolute",
		"Updates": [{
			"DistributionCenterID": 3,
			"Quantity": 12
		},
		{
			"DistributionCenterID": 1,
			"Quantity": 2
		},
		{
			"DistributionCenterID": 15,
			"Quantity": 400
		}]
	}
}
Example Response (Success)
204 No Content