Created
March 24, 2017 05:07
-
-
Save kurozumi/d1d4e068b780798fadd32ff67210b54e to your computer and use it in GitHub Desktop.
【Python】eBayのTrading APIを使ってeBayの注文に追跡番号を追加して発送済みにする方法
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from ebaysdk.trading import Connection as Trading | |
from ebaysdk.exception import ConnectionError | |
try: | |
api = Trading(appid="YOUR_APPID", devid="YOUR_DEVID", certid="YOUR_CERTID", token="YOUR_AUTH_TOKEN") | |
api.execute('CompleteSale', { | |
'WarningLevel': 'High', | |
'ItemID': 'ItemID', #商品ID | |
'TransactionID': 'TransactionID', # トランザクションID | |
'Shipment': | |
'ShipmentTrackingDetails': { | |
'ShipmentTrackingNumber': 'TrackingNumber', #追跡番号 | |
'ShippgingCarrierUsed': 'Carrier', #Carrier | |
}, | |
'Shipped': 'true', | |
}) | |
except ConnectionError as e: | |
print(e) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment