Skip to main content
Published: October 30 2007, 12:51:00 PMUpdated: November 28 2020, 1:28:52 PM

For a given seller, how can I get all the items in a particular store category? For example, how do I get just those items listed in "Other Items" as with the following url on the site:
http://stores.sandbox.ebay.com/The-Store_Other_W0QQcolZ4QQdirZ1QQfsubZ1QQftidZ2QQtZkm

Summary

Unlike the site, the API does not allow you to return a list of items in a particular store category.  You can use GetSellerList with a GranularityLevel of Coarse and get a list of all the items, including the store category for each of the items.  You can then filter on the client side and get items that are listed in a particular store category.
 


Detailed Description

Let's say we want to find all the items for the Sandbox user dts1 that are in the store categoryID 1.  We can make a call to GetSellerList with the end time filter set to a few seconds from the current time to 60 days in the future to get all the active items.  We also use the GranularityLevel of Coarse to get limited information as below:
 

<?xml version="1.0" encoding="utf-8"?>

<GetSellerListRequest xmlns="urn:ebay:apis:eBLBaseComponents">

  <GranularityLevel>Coarse</GranularityLevel>

  <Version>535</Version>

  <EndTimeFrom>2007-10-29T23:36:38.000Z</EndTimeFrom>

  <EndTimeTo>2007-12-29T23:36:38.000Z</EndTimeTo>

  <Pagination>

    <PageNumber>1</PageNumber>

    <EntriesPerPage>200</EntriesPerPage>

  </Pagination>

  <RequesterCredentials>

    <eBayAuthToken>*****</eBayAuthToken>

  </RequesterCredentials>

</GetSellerListRequest>


Here is a sample response:

<?xml version="1.0" encoding="utf-8"?>

<GetSellerListResponse xmlns="urn:ebay:apis:eBLBaseComponents">

  <Timestamp>2007-10-29T23:47:53.179Z</Timestamp>

  <Ack>Success</Ack>

  <Version>535</Version>

  <Build>e535_core_Bundled_5537638_R1</Build>

  <PaginationResult>

    <TotalNumberOfPages>1</TotalNumberOfPages>

    <TotalNumberOfEntries>14</TotalNumberOfEntries>

  </PaginationResult>

  <HasMoreItems>false</HasMoreItems>

  <ItemArray>

    <Item>

      <AutoPay>false</AutoPay>

      <BuyerProtection>ItemIneligible</BuyerProtection>

      <Country>US</Country>

      <Currency>USD</Currency>

      <GiftIcon>0</GiftIcon>

      <HitCounter>NoHitCounter</HitCounter>

      <ItemID>110017116452</ItemID>

      <ListingDetails>

        <StartTime>2007-03-05T20:38:51.000Z</StartTime>

        <EndTime>2007-10-31T20:38:51.000Z</EndTime>

        <ViewItemURL>http://cgi.sandbox.ebay.com/ws/eBayISAPI.dll?ViewItem&item=110017116452&category=30120</ViewItemURL>

        <HasUnansweredQuestions>false</HasUnansweredQuestions>

        <HasPublicMessages>false</HasPublicMessages>

        <ExpressListing>false</ExpressListing>

      </ListingDetails>

      <ListingDuration>GTC</ListingDuration>

      <Location>Staten Island, New York</Location>

      <PrimaryCategory>

        <CategoryID>30120</CategoryID>

        <CategoryName>Everything Else:Test Auctions:eBay Use Only</CategoryName>

      </PrimaryCategory>

      <Quantity>7</Quantity>

      <ReviseStatus>

        <ItemRevised>false</ItemRevised>

      </ReviseStatus>

      <SellingStatus>
     
...

      </SellingStatus>

      <ShippingDetails>

        <TaxTable/>

      </ShippingDetails>

      <ShipToLocations>Worldwide</ShipToLocations>

      <Site>US</Site>

      <Storefront>

        <StoreCategoryID>1</StoreCategoryID>

        <StoreCategory2ID>0</StoreCategory2ID>

        <StoreURL>http://www.stores.sandbox.ebay.com/id=434417</StoreURL>

      </Storefront>

      <TimeLeft>P1DT20H50M58S</TimeLeft>

      <Title>test - do not bid</Title>

      <LocationDefaulted>true</LocationDefaulted>

      <PostalCode>10301</PostalCode>

      <PictureDetails>

        <PhotoDisplay>None</PhotoDisplay>

      </PictureDetails>

      <ProxyItem>false</ProxyItem>

    </Item>

    ...

  </ItemArray>

  <ItemsPerPage>200</ItemsPerPage>

  <PageNumber>1</PageNumber>

  <ReturnedItemCountActual>14</ReturnedItemCountActual>

</GetSellerListResponse>

On the client side, we check for Item.Storefront.StoreCategoryID - if it is 1 then it is an item of interest, otherwise we ignore it.  If the HasMoreItems is true, then we increase the PageNumber by 1 and make the call again and do the filtering on the client side.  We continue making the call till there are no more items to retrieve, that is, when HasMoreItems is false.
 


Version Info

The code example above was based on the versions specified below:

API Schema Version 535


Additional Resources

How well did this answer your question?
Answers others found helpful