Find the answer to your question
Advanced Search
I am a motor vehicles seller and I need an uptodate list of bidders so that I can try and convert the bid to a sale. How can I do this? Should I call GetAllBidders for all my items at a regular interval?
Detailed Description
An efficient application design would be to make a call to
GetSellerEvents every 30 minutes with the ModTime filter set from the last time
you made the call to the current time to get a list of all the items for which a
seller event has occured. Then you iterate through each item in the list
and check if there is a change in the BidCount for the Item with the value in
your database. If there is a change, it is only then you make a call to
GetAllBidders for the Item and retrieve the list of bidders.
Here is a sample Scenario:
1. Make a GetSellerEvents call request:
<?xml version="1.0"
encoding="utf-8"?>
<GetSellerEventsRequest xmlns="urn:ebay:apis:eBLBaseComponents">
<Version>473</Version>
<RequesterCredentials>
<eBayAuthToken>*****</eBayAuthToken>
</RequesterCredentials>
<ModTimeFrom>2006-09-12T17:30:00.000Z</ModTimeFrom>
<ModTimeTo>2006-09-12T18:00:00.000Z</ModTimeTo>
</GetSellerEventsRequest>
Sample Response:
<?xml version="1.0"
encoding="utf-8"?>
<GetSellerEventsResponse
xmlns="urn:ebay:apis:eBLBaseComponents">
<Timestamp>20060912T17:40:59.370Z</Timestamp>
<Ack>Success</Ack>
<Version>477</Version>
<Build>e477_core_Bundled_3514903_R1</Build>
<TimeTo>20060918T00:00:00.000Z</TimeTo>
<ItemArray>
<Item>
<ItemID>110005777243</ItemID>
<ListingDetails>
<StartTime>20060912T17:29:59.000Z</StartTime>
<EndTime>20060917T17:29:59.000Z</EndTime>
</ListingDetails>
<SellingStatus>
<BidCount>1</BidCount>
<CurrentPrice
currencyID="USD">1.0</CurrentPrice>
<QuantitySold>0</QuantitySold>
<ListingStatus>Active</ListingStatus>
</SellingStatus>
<Site>US</Site>
<Title>title</Title>
<Currency>USD</Currency>
<BestOfferDetails>
<BestOfferEnabled>false</BestOfferEnabled>
</BestOfferDetails>
</Item>
<Item>
<ItemID>110005778741</ItemID>
<ListingDetails>
<StartTime>2006-09-12T17:59:16.000Z</StartTime>
<EndTime>2006-09-12T17:59:16.000Z</EndTime>
</ListingDetails>
<SellingStatus>
<BidCount>0</BidCount>
<CurrentPrice
currencyID="USD">1.0</CurrentPrice>
<QuantitySold>0</QuantitySold>
<ListingStatus>Ended</ListingStatus>
</SellingStatus>
<Site>US</Site>
<Title>title</Title>
<Currency>USD</Currency>
<BestOfferDetails>
<BestOfferEnabled>false</BestOfferEnabled>
</BestOfferDetails>
</Item>
</ItemArray>
</GetSellerEventsResponse>
2. Iterate through the ItemArray:
- For ItemID 110005777243, since the BidCount is greater than 0, check the value in your database. If it is 0, then you have received a new bid, so make a call to GetAllBidders for ItemID 110005777243.
- For ItemID 110005778741, since the BidCount is 0, so you can even skip the check in your database; and not make any call to GetAllBidders.
This design will significantly reduce the calls to GetAllBidders
unnecessarily and make your application scale very easily.
Given a choice, you should always try to pick those calls which are lightweight
and make the other calls only when required.
Additional Resources