07-09-2024 11:24 PM
I want to retrieve information about the available quantity of a product. For this purpose, I tried using two methods:
Browse API: https://developer.ebay.com/api-docs/buy/browse/resources/item/methods/getItem It returns the following information:
{
"itemId": "v1|393668457131|0",
"sellerItemRevision": "47",
"title": "Für Huawei P Smart 2021 PPA-LX2 Display Komplettes Bildschirm LCD + Touch Rahmen",
"shortDescription": "//CUT",
"price": {...},
"categoryPath": "Handys & Kommunikation|Handy-Komponenten & -Teile",
"categoryIdPath": "15032|43304",
"condition": "Neu",
"conditionId": "1000",
"itemLocation": {...},
"image": {...},
"additionalImages": {...},
"color": "Schwarz",
"brand": "Für Huawei",
"itemCreationDate": "2021-11-02T10:48:59.000Z",
"seller": "//CUT",
"estimatedAvailabilities": [{
"deliveryOptions": ["SHIP_TO_HOME"],
"availabilityThresholdType": "MORE_THAN",
"availabilityThreshold": 10,
"estimatedAvailabilityStatus": "IN_STOCK",
"estimatedSoldQuantity": 140
}],
"shippingOptions": {...},
"shipToLocations": {...},
"returnTerms": {...},
"taxes": {...},
"localizedAspects": [...],
"topRatedBuyingExperience": true,
"buyingOptions": {...},
"itemWebUrl": "https://www.ebay.de/itm/393668457131?amdata=enc%3AAQAJAAAAoHoV3kP08IDx%2BKZ9MfhVJKkCKVUQxpjKWFYKhcFzx1wMPrvyaUnSXlvZbNCayRdWQR0f4uPcJgRi%2F9kCDiO9WJrwWOARqNGiCz",
"description": "//CUT",
"paymentMethods": [...],
"enabledForGuestCheckout": false,
"eligibleForInlineCheckout": true,
"lotSize": 0,
"legacyItemId": "393668457131",
"priorityListing": true,
"adultOnly": false,
"categoryId": "43304",
"listingMarketplaceId": "EBAY_DE"
}
The only potential quantity information is in the "estimatedAvailabilities" field, which indicates more than 10 units, which is imprecise.
Legacy API: https://developer.ebay.com/Devzone/XML/docs/Reference/eBay/GetItem.html It returns the following information:
{
"AutoPay": "false",
"BuyerProtection": "ItemIneligible",
"BuyItNowPrice": "0.0",
"Country": "DE",
"Currency": "EUR",
"Description": "//CUT",
"ItemID": "393668457131",
"ListingDetails": "...",
"ListingDesigner": "77100007710",
"ListingDuration": "GTC",
"ListingType": "FixedPriceItem",
"Location": "Görlitz",
"PrimaryCategory": "43304Handys & Kommunikation:Handy-Komponenten & -Teile",
"PrivateListing": "false",
"ProductListingDetails": "Für Huaweitrue",
"Quantity": "153",
"IsItemEMSEligible": "false",
"ReservePrice": "0.0",
"ReviseStatus": "true",
"Seller": "...",
"SellingStatus": "...",
"ShippingDetails": "...",
"ShipToLocations": "PL",
"Site": "Germany",
"StartPrice": "27.95",
"Storefront": "162555290150https://www.ebay.pl/str/indivitemsde",
"TimeLeft": "P23DT3H40M30S",
"Title": "Für Huawei P Smart 2021 PPA-LX2 Display Komplettes Bildschirm LCD + Touch Rahmen",
"VATDetails": "19.0",
"LocationDefaulted": "true",
"GetItFast": "false",
"SKU": "PPA Чер СР",
"PostalCode": "02826",
"PictureDetails": "...",
"DispatchTimeMax": "0",
"ProxyItem": "false",
"BusinessSellerDetails": "Al. Bohaterów Warszawy 11BSzczecinPoland+48 78733582570-370UTS-GROUP Sp. z O. O.Viktoriya Palchuk",
"BuyerGuaranteePrice": "20000.0",
"ReturnPolicy": "...",
"ConditionID": "1000",
"ConditionDisplayName": "Neu",
"PostCheckoutExperienceEnabled": "false",
"SellerProfiles": "...",
"ShippingPackageDetails": "...",
"TopRatedListing": "true",
"RelistParentID": "393225025165",
"HideFromSearch": "false",
"OutOfStockControl": "true",
"PickupInStoreDetails": "true",
"eBayPlus": "false",
"eBayPlusEligible": "false",
"IsSecureDescription": "true"
}
The "Quantity" field shows "153". However, visiting the product page: https://www.ebay.de/itm/393668457131 shows only 13 available units.Where does this discrepancy come from and how can I retrieve the exact, accurate quantity?
08-01-2024 09:44 AM
Hi @uts_group,
Trading API GetItem call returns the item Quantity and QuantitySold fields.
Here Quantity field indicates 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 the Quantity value.