Developers Program

Item quantity set is different than what was passed in the revise item calls

Published: January 14 2010, 11:49:00 PMยทUpdated: August 19 2022, 2:46:19 AM

Products

Question

If I change the quantity of a fixed price item, using calls such as ReviseInventoryStatus, ReviseFixedPriceItem, etc. it does not get set to what I sent. For instance, if I set the Quantity to 5 and make a GetItem call, I see the quantity is 7. However, if I go to the view item page for the item, it shows the available quantity correctly as 5. Why am I seeing this discrepancy with the APIs?

Answer

Summary

If an item has a sale, then the quantity sold is added to the quantity that is sent in the revise calls. This is done, because there is no explicit field in the API calls to indicate the quantity available. To derive the quantity available, you need to subtract the quantity sold from the Item.Quantity or Variation.Quantity.

Additional Comments
How well did this answer your question?