2017-06-01 33 views
1

首先,我使用的是ebaysdk。我的問題是,當我嘗試添加一個新的項目易趣給了我以下錯誤:Ebay VerifyAddItem,錯誤代碼:10009

u'VerifyAddItem: Class: RequestError, Severity: Error, Code: 10009, No exists or is specified as an empty tag. No exists or is specified as an empty tag in the request., Class: RequestError, Severity: Error, Code: 10009, No exists or is specified as an empty tag. No exists or is specified as an empty tag in the request., Class: RequestError, Severity: Error, Code: 10009, No exists or is specified as an empty tag. No exists or is specified as an empty tag in the request.'

問題是我給每一個參數,但API稱,我不是。

.... 
<Currency>USD</Currency> 
<Country>US</Country> 
<ListingDuration>GTC</ListingDuration> 
... 

回答

0

首先VerifyAddItem調用不會用於添加項目到eBay。此調用僅用於檢查您發送的數據是否有效。爲了向eBay添加項目,我們調用AddItems和AddFixedPriceItem。

即將到來的問題,您可能錯過了XML中的任何必填字段。請檢查XML結構

<?xml version="1.0" encoding="utf-8"?> 
<VerifyAddItemRequest xmlns="urn:ebay:apis:eBLBaseComponents"> 
<RequesterCredentials> 
    <eBayAuthToken>ABC...123</eBayAuthToken> 
</RequesterCredentials> 
<ErrorLanguage>en_US</ErrorLanguage> 
<WarningLevel>High</WarningLevel> 
<Item> 
    <Title>Harry Potter and the Philosopher's Stone</Title> 
    <Description> 
    This is the first book in the Harry Potter series. In excellent condition! 
    </Description> 
    <PrimaryCategory> 
    <CategoryID>377</CategoryID> 
    </PrimaryCategory> 
    <StartPrice>1.0</StartPrice> 
    <CategoryMappingAllowed>true</CategoryMappingAllowed> 
    <ConditionID>4000</ConditionID> 
    <Country>US</Country> 
    <Currency>USD</Currency> 
    <DispatchTimeMax>3</DispatchTimeMax> 
    <ListingDuration>Days_7</ListingDuration> 
    <ListingType>Chinese</ListingType> 
    <PaymentMethods>PayPal</PaymentMethods> 
    <PayPalEmailAddress>[email protected]</PayPalEmailAddress> 
    <PictureDetails> 
    <PictureURL>http://i1.sandbox.ebayimg.com/03/i/00/30/07/20_1.JPG?set_id=8800005007</PictureURL> 
    </PictureDetails> 
    <PostalCode>95125</PostalCode> 
    <Quantity>1</Quantity> 
    <ReturnPolicy> 
    <ReturnsAcceptedOption>ReturnsAccepted</ReturnsAcceptedOption> 
    <RefundOption>MoneyBack</RefundOption> 
    <ReturnsWithinOption>Days_30</ReturnsWithinOption> 
    <Description>If you are not satisfied, return the book for refund.</Description> 
    <ShippingCostPaidByOption>Buyer</ShippingCostPaidByOption> 
    </ReturnPolicy> 
    <ShippingDetails> 
    <ShippingType>Flat</ShippingType> 
    <ShippingServiceOptions> 
     <ShippingServicePriority>1</ShippingServicePriority> 
     <ShippingService>USPSMedia</ShippingService> 
     <ShippingServiceCost>2.50</ShippingServiceCost> 
    </ShippingServiceOptions> 
    </ShippingDetails> 
    <Site>US</Site> 
</Item> 
</VerifyAddItemRequest> 

檢查此鏈接http://developer.ebay.com/devzone/xml/docs/Reference/eBay/VerifyAddItem.html以檢查此調用所需的字段。