cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

GetItem - returns incorrect quantity for VariationSKU

Hello,

 

I'm sending the following GetItem request:

 

$call_name = 'GetItem';

 

$xml_request = "<?xml version=\"1.0\" encoding=\"utf-8\" ?>
<".$call_name."Request xmlns=\"urn:ebay:apis:eBLBaseComponents\">
<RequesterCredentials>
<eBayAuthToken>" . $auth_token . "</eBayAuthToken>
</RequesterCredentials>" .
"<ItemID>" . $item_id . "</ItemID>" .
"<VariationSKU>" . $SKU . "</VariationSKU>";

$xml_request .= "</".$call_name."Request>";

 

and instead of returning the number of unsold items for a Variation SKU, it returns the sum of sold and unsold items. I have sold 18 pieces and have 7 unsold pieces. The request returns 25 for the quantity field.

 

Could this be a software bug?

 

thanks

 

Message 1 of 3
latest reply
1 BEST ANSWER

Accepted Solutions

GetItem - returns incorrect quantity for VariationSKU

Hi @imagoscape,

 

 Variation.Quantity value indicates the total quantity associated with the variation, including the quantity available and the quantity sold. To calculate the quantity available for sale, subtract SellingStatus.QuantitySold from this value.

 

Also, see the Knowledge Base article "Determine live quantity of stock on eBay"  for the detailed information.

Best Regards,
eBay Developer Support

View Best Answer in original post

Message 3 of 3
latest reply
2 REPLIES 2

GetItem - returns incorrect quantity for VariationSKU

I've just looked at the API for the GetItem and for Item.Quantity field :

 

For GetItem and related calls: This is the total of the number of items available for sale plus the quantity already sold. To determine the number of items available, subtract SellingStatus.QuantitySold from this value.

 

So, I had to subtract SellingStatus.QuantitySold (18) from Item.Quantity (25) to get the correct answer 7.

 

All good!

😀

Message 2 of 3
latest reply

GetItem - returns incorrect quantity for VariationSKU

Hi @imagoscape,

 

 Variation.Quantity value indicates the total quantity associated with the variation, including the quantity available and the quantity sold. To calculate the quantity available for sale, subtract SellingStatus.QuantitySold from this value.

 

Also, see the Knowledge Base article "Determine live quantity of stock on eBay"  for the detailed information.

Best Regards,
eBay Developer Support
Message 3 of 3
latest reply