question

falcon_store_4u avatar image
0 Likes"
falcon_store_4u asked

How to get item Quantity Available?

My selling item has availableQuantity 24 and 37 sold GetItemCall item = new GetItemCall(apiContext); item.GetItem("121563981199"); return item.Quantity = 61 item.QuantityAvailable = 0 What's wrong? What's another way to get item.QuantityAvailable ?
quantityavailable
10 |600

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
atomsindustries avatar image
0 Likes"
atomsindustries answered
Hi, I didn't find a listing in the GetItem API reference for Item.QuantityAvailable ( http://developer.ebay.com/Devzone/XML/docs/Reference/eBay/GetItem.html). But I definitely have the property in the fetchedItem object from the GetItemCall in the SDK under the FrmGetItem.cs and it was always 0. But you can get the quantity remaining by subtracting the quantity sold from the quantity value. Or use something like this: private int QtyAvailable(eBay.Service.Core.Soap.ItemType item) { return item.Quantity - item.SellingStatus.QuantitySold; } Note that there are 3 other Quantity Sold values (eg item.SellingStatus.QuantitySoldByPickupInStore) and I don't know if the item.SellingStatus.QuantitySold is a total of these or if you must add all 4 to get the total quantity sold. I also can't guarantee that this method is going to work in all instances. But it is how I am getting the quantity remaining. I hope that helps. Kind Regards, Ben
10 |600

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.