Reputation: 103
Does anyone know how to retrieve a full listing of items by Site (ebay.us, ebay.fr ..) using ebay API? I am using the Large Merchant Service because I manage thousands of items on each site (about 100k). https://developer.ebay.com/devzone/large-merchant-services/concepts/lms_apiguide.html
1st solution i have tried (Active Inventory Report) According the doc : Retrieving an Active Inventory Report
The ActiveInventoryReportRequest allows you to download a description of all of your active listings by SKU. The SKU details include ItemID, Price, Quantity, SKU, and SiteID.
I have checked with premium support and there is a mistake, SiteID
is never included in response.
2nd solution (GetSellerList)
https://developer.ebay.com/devzone/xml/docs/reference/ebay/GetSellerList.html
According to the docs:
GetSellerList returns a maximum of 5,000 items per call (this is possible if you do not specify a Detail Level, and thus return the smallest set of data for each item). However, if you specify any DetailLevel value (and thus increase the fields returned for each item), you might need to use Pagination values to obtain the complete result set. If you use a DetailLevel, the response can contain no more than 200 items per call.
So can not use this one because of limitation to 5000 items and I do not know when items have been added, a few years ago for a bunch of them.
Any ideas?
Regards
Upvotes: 1
Views: 2133
Reputation: 61
You can get lots more than 5,000 results with GetSellerList, but you are right you can only get 200 at a time. The code below is part of a loop iterating through until HasMoreItems is false. The code is written in Perl and uses Net::eBay to connect.
my $result = $eBay->submitRequest( "GetSellerList",
{
UserID => "$ebay_settings{'ebay_account'}",
GranularityLevel => 'Medium',
EndTimeFrom => "$start_time",
EndTimeTo => "$end_time",
Pagination => {
EntriesPerPage => 200,
PageNumber => $page_number
}
}
);
if( ref $result ) {
$result->{HasMoreItems} eq "false" and $done = "Y";
}
Upvotes: 0