In the schema, a request to GetMyeBayBuying allows you to specify which nodes you want returned in the response and customize the response list. The specific elements you can customize in the list vary by the node you want returned. Refer to the GetMyeBayBuying reference documentation for complete information.
For example, to return a WatchList node to display the items a user is watching, issue the following GetMyeBayBuying request:
<?xml version="1.0" encoding="UTF-8"?> <GetMyeBayBuyingRequest xmlns="urn:ebay:apis:eBLBaseComponents"> <RequesterCredentials> <eBayAuthToken>ABC...123</eBayAuthToken> </RequesterCredentials> <Version>425</Version> <DetailLevel>ReturnAll</DetailLevel> <WatchList> <Sort>TimeLeft</Sort> <IncludeNotes>true</IncludeNotes> <Pagination> <EntriesPerPage>10</EntriesPerPage> <PageNumber>1</PageNumber> </Pagination> </WatchList> </GetMyeBayBuyingRequest>
In the GetMyeBayBuying response, the WatchList, BidList, WonList, and LostList nodes are each based on the complex type ItemListCustomizationType, which provides pagination via its Pagination element. It is recommended that you use pagination, as the result list can be quite long.
The WatchList node returned by GetMyeBayBuying is an array similar to that shown below:
<WatchList> <ItemArray> <Item> <BuyItNowPrice currencyID="USD">4.0</BuyItNowPrice> <ItemID>7*******9</ItemID> <ListingDetails> <StartTime>2023-08-08T17:29:07.000Z</StartTime> <EndTime>2023-08-09T04:29:07.000Z</EndTime> </ListingDetails> <Seller> <UserID>a*****7</UserID> </Seller> <SellingStatus> <CurrentPrice currencyID="USD">4.0</CurrentPrice> </SellingStatus> <TimeLeft>PT0S</TimeLeft> <Title>Test Domains</Title> <QuantityAvailable>4</QuantityAvailable> </Item> ... more Item nodes ... </ItemArray> </WatchList> <PaginationResult> <TotalNumberOfPages>1</TotalNumberOfPages> <TotalNumberOfEntries>5</TotalNumberOfEntries> </PaginationResult>
Most of the other nodes returned by GetMyeBayBuying work in a similar way, allowing you to customize the node on the request and returning an array. However, FavoriteSearches and FavoriteSellers simply return a group of nodes without structuring them into an array, as shown in the following example:
<FavoriteSearches> <TotalAvailable>3</TotalAvailable> <FavoriteSearch> <SearchName>Database systems</SearchName> <SearchQuery>https://search-desc.qa.ebay.com/ws/search/SaleSearch?basicsearch=&from=R10&ht=1&sacategory=267&saregion=0&satitle=Database+systems&sorecordsperpage=50&sosortorder=1&sosortproperty=1&sotextsearched=2</SearchQuery> </FavoriteSearch> <FavoriteSearch> <SearchName>oreilly</SearchName> <SearchQuery>https://search-desc.qa.ebay.com/ws/search/SaleSearch?basicsearch=&from=R10&ht=1&saregion=0&satitle=oreilly&sorecordsperpage=50&sosortorder=1&sosortproperty=1&sotextsearched=2</SearchQuery> </FavoriteSearch> <FavoriteSearch> <SearchName>Unnamed Search</SearchName> <SearchQuery>https://motors.search.qa.ebay.com/ws/search/SaleSearch?catref=C6&fisc=c6024&from=R9&sacategory=6024&samet=2&socolumnlayout=3&sofindtype=22&sorecordsperpage=50&sosortorder=1&sosortproperty=1&sotrtype=1&sotrvalue=1</SearchQuery> </FavoriteSearch> </FavoriteSearches> <FavoriteSellers> <TotalAvailable>2</TotalAvailable> <FavoriteSeller> <UserID>sampleuser</UserID> <StoreName>p*********e</StoreName> </FavoriteSeller> <FavoriteSeller> <UserID>sampleuser</UserID> <StoreName>e****************e</StoreName> </FavoriteSeller> </FavoriteSellers>
The <SearchQuery>text</SearchQuery>
strings shown above are HTML-encoded URL strings that many applications can use directly.