0

我正在为我当前的项目使用 eBay 的 Java SDK,我们需要通过 eBay API 完成各种任务。很多 API 调用都运行良好。但是,该GetSellingManagerSoldListings请求根本没有返回已售出的历史记录,即使调用响应没有指示任何错误。下面是请求 XML(我正在使用生产令牌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>

响应 XML 是:

<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>

我在这里做错了吗?SalesRecord为什么响应中没有?

我尝试添加Search以将请求限制为仅一项,方法是将itemID

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

但是没有,还是没有SalesRecord

另外,我想知道是否有其他调用方法来检索 eBay 销售历史记录。

4

1 回答 1

0

好的,我终于明白问题出在哪里了……原来我将 Archived 设置为 True 并且我只获得了过去 15 天的销售历史记录。我的问题的解决方案是根本不设置存档选项。

从 eBay Trading API 文档中,它说

请求列出超过 90 天的记录。记录在创建后 90 到 120 天之间存档,此后只能使用此标签检索。

我不知道将 Archived 设置为 true 将如何导致 API 调用不返回我需要的信息,即使在我的测试用例中我只获得了不到 90 天的销售历史记录,但至少我现在发现了问题并且可以终于进入下一步了!

于 2016-08-29T09:50:49.517 回答