Ebay VerifyAddItem,错误代码:10009

时间:2017-06-01 18:37:19

标签: python python-2.7 ebay-api

首先,我使用ebaysdk。我的问题是,当我尝试添加新项目时,易趣给了我以下错误:

  

u' VerifyAddItem:Class:RequestError,严重性:错误,代码:10009,否    存在或被指定为空   标签。不存在或被指定为   请求中的空标记。,类:RequestError,严重性:错误,代码:   10009,不存在或被指定为   空标记。不存在或被指定为   请求中的空标记。,类:RequestError,严重性:错误,   代码:10009,不存在或    被指定为空标记。没有    存在或被指定   作为请求中的空标记。'

我的问题是我给出了所有参数,但api声称我没有。

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

1 个答案:

答案 0 :(得分: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>magicalbookseller@yahoo.com</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检查此次来电的必填字段。