Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
【Python】eBayのTrading APIを使ってeBayの注文に追跡番号を追加して発送済みにする方法
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