2016-08-29 98 views
0

我正在爲當前項目使用eBay的Java SDK,我們需要通過eBay API執行各種任務。很多API調用工作正常。但是,GetSellingManagerSoldListings請求根本不返回銷售歷史記錄,即使呼叫響應未指示任何錯誤。下面是請求XML(我用的生產令牌eBayAuthToken)eBay交易API GetSellingManagerSoldListing請求無銷售記錄結果?

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

我試圖通過將項目ID

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

添加搜索請求限制到只有一個項目,但沒了,仍然沒有SalesRecord

此外,我想知道是否有其他調用方法檢索易趣賣出的歷史。

回答

0

好吧,我終於明白問題來自哪裏...原來,我將Archived設置爲True,並且我僅在過去15天內獲得了賣出的歷史記錄。我的問題的解決方案是根本不設置存檔選項。

來自eBay交易API文檔,它說,

請求,其中列出了超過90天的記錄。記錄在創建後的90天和120天之間歸檔爲 ,此後 只能使用此標記檢索。

我不知道如何將存檔設置爲true將導致API調用不會返回我所需要的信息,即使在我的測試用例中,我只有不到90天的銷售歷史,但至少我認爲現在就解決問題,最後可以繼續下一步!