2

eBay API ドキュメントを掘り下げるのに数え切れないほどの時間を費やしましたが、何も見つかりませんでした。

販売者のアカウントで、ステータスが「発送待ち」または「未発送」のすべての注文のリストを取得する必要があります。したがって、現在「未発送」のすべての注文の XML レポートを、顧客に関する完全な詳細 (配送先住所、使用された郵便方法など) とともに取得できます。

GetOrdersは、未発送の注文のフィルターを提供しません。
GetSellingManagerSoldListingsにはそのような機能がありますが、顧客の配送の詳細に関する詳細は提供されません。

誰もそのような問題を抱えていましたか?

前もって感謝します。

4

6 に答える 6

3

GetOrders は未発送の注文のフィルターを提供しません..しかし、GetOrders リクエストの応答に [ShippedTime] のオブジェクトがある場合、それは注文が未発送のアイテムのために発送されたことを意味します。[ShippedTime] のオブジェクトを取得しません ...未発送の注文を照会できるベース

于 2013-12-12T14:05:55.543 に答える
0

私もかなりの時間を割いて、この質問の解決策を探していました。これは本当に古い質問ですが、もっと直接的な答えがあればいいのにと思います。何時間も節約できました。@Moazamは正しい考えを持っていましたが、実際には具体性が欠けていたので、ここに行きます. 次の回答は、 eBay の Apiに基づいて/使用して、python で書かれています。(これは、見つけたり実行したりするのがはるかに簡単だと思うでしょう)

from ebaysdk.trading import Connection as Trading
from ebaysdk.exception import ConnectionError
import bs4 as bs # beautifulsoup import for parsing xml

try:
    api = Trading(config_file="ebay.yaml") #put ur eBay dev API credentials in yaml file
    response = api.execute('GetSellerTransactions', {}) # dictionary response
    dommy = response.content 

except ConnectionError as e: # spit error if can't connect (ie: wrong api credz)
    print(e)
    print(e.response.dict())

soup = bs.BeautifulSoup(dommy, 'lxml') # parse the API response as xml
tArray = soup.transactionarray 

with open('fullSoldLogXML.xml', 'w+') as xml: # Log file, not required.
    xml.write(str(soup)) # write entire ebay response to log file.

with open('singleTransactions.xml', 'w+') as tranXml: # Another log. Personal reference.
    tranXml.write(str(tArray)) # parse all transactions from transactionarray in xml 

for each in tArray: # tArray is every transaction, in transactionarray)
    print each.shippedtime # print shipped time, if None then hasn't been shipped.

次のような出力が必要です。

<shippedtime>2016-12-18T15:12:22.000Z</shippedtime>
<shippedtime>2016-12-20T00:35:43.000Z</shippedtime>
<shippedtime>2016-12-20T01:50:37.000Z</shippedtime>
None

この情報を使用して、try/except各トランザクションをループできます。If shippedtime == None、次に、注文を分析して、などの有用な情報を取得できprint each.shippingaddress, each.orderlineitemid, each.paidtimeます...

于 2016-12-20T20:29:48.087 に答える