0
votes

I am using eBay's Java SDK for my current project and we need to do various tasks via eBay API. A lot of the API calls are working fine. However, the GetSellingManagerSoldListings request is not returning sold histories at all, even though the call response does not indicates any error. Below is the request XML (I am using production token for eBayAuthToken)

<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
    <S:Header>
      <ebl:RequesterCredentials xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ebl="urn:ebay:apis:eBLBaseComponents" SOAP-ENV:mustUnderstand="0">
       <ebl:eBayAuthToken>MY_AUTH_TOKEN</ebl:eBayAuthToken>
      </ebl:RequesterCredentials>
     </S:Header>
     <S:Body>
      <GetSellingManagerSoldListingsRequest xmlns="urn:ebay:apis:eBLBaseComponents">
       <Version>967</Version>
       <Archived>true</Archived>
       <Pagination>
        <EntriesPerPage>200</EntriesPerPage>
        <PageNumber>1</PageNumber>
       </Pagination>
       <SaleDateRange>
        <TimeFrom>2016-08-14T00:00:00.124+08:00</TimeFrom>
        <TimeTo>2016-08-29T11:50:07.125+08:00</TimeTo>
       </SaleDateRange>
      </GetSellingManagerSoldListingsRequest>
     </S:Body>
</S:Envelope>

and the response XML is:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 <soapenv:Header/>
 <soapenv:Body>
  <GetSellingManagerSoldListingsResponse xmlns="urn:ebay:apis:eBLBaseComponents">
   <Timestamp>2016-08-29T03:50:12.672Z</Timestamp>
   <Ack>Success</Ack>
   <Version>967</Version>
   <Build>E967_CORE_APISELLING_17965876_R1</Build>
  </GetSellingManagerSoldListingsResponse>
 </soapenv:Body>
</soapenv:Envelope>

Am I doing something wrong here? Why is there no SalesRecord in the response?

I tried to add Search to limit the request to only one item by putting the itemID

<Search>
    <SearchType>ItemID</SearchType>
    <SearchValue>MY_ITEM_ID</SearchValue>
</Search>

But nope, still no SalesRecord

Also, I am wondering if there is other call methods to retrieve eBay sold history.

1

1 Answers

0
votes

Ok I finally understand where the problem comes from... turns out that I set Archived to True and I am only getting sold histories for the past 15 days. The solution for my issue is to not set the Archived option at all.

From eBay Trading API documentation, it says that

Requests listing records that are more than 90 days old. Records are archived between 90 and 120 days after being created, and thereafter can only be retrieved using this tag.

I have no idea how setting Archived to true will causes the API call to not return the information I need even though in my test case I am only getting sold histories for less than 90 days, but at least I figured out the problem now and can finally move on to the next step!