Skip to content

Instantly share code, notes, and snippets.

@kurozumi
Created March 24, 2017 05:07
Show Gist options
  • Save kurozumi/d1d4e068b780798fadd32ff67210b54e to your computer and use it in GitHub Desktop.
Save kurozumi/d1d4e068b780798fadd32ff67210b54e to your computer and use it in GitHub Desktop.
【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