我想创建一个机器人来自动化eBay.in上的列表程序。我正在测试各种调用来为我的机器人开发一个模板,它将从我的数据库中获取数据并将其发送到eBay。我一直在尝试在eBay提供的沙盒中列出一个新产品。
这是我的xml
<?xml version="1.0" encoding="utf-8"?>
<AddFixedPriceItemRequest xmlns="urn:ebay:apis:eBLBaseComponents">
<RequesterCredentials>
<eBayAuthToken>Token Already Inserted Here</eBayAuthToken>
</RequesterCredentials>
<!-- Call-specific Input Fields -->
<Item>
<ConditionID>1000</ConditionID>
<Country>IN</Country>
<Currency>INR</Currency>
<Description>This Is Description</Description>
<InventoryTrackingMethod>SKU</InventoryTrackingMethod>
<DispatchTimeMax>3</DispatchTimeMax>
<ListingDuration>Days_7</ListingDuration>
<ListingType>FixedPriceItem</ListingType>
<OutOfStockControl>true</OutOfStockControl>
<PaymentMethods>CreditCard</PaymentMethods>
<PaymentMethods>DirectDebit</PaymentMethods>
<PictureDetails>
<GalleryURL>http://cdn3.purplle.com/static/img/cache/product/PPLB121HD110/250x250_1.jpg?1390916568</GalleryURL>
</PictureDetails>
<PostalCode>400086</PostalCode>
<PrimaryCategory>
<CategoryID>11858</CategoryID>
</PrimaryCategory>
<Quantity>1</Quantity>
<ShippingDetails>
<ShippingType>Flat</ShippingType>
<ShippingServiceOptions>
<ShippingService>In_Courier</ShippingService>
<ShippingServiceCost>49.0</ShippingServiceCost>
</ShippingServiceOptions>
</ShippingDetails>
<ShipToLocations>IN</ShipToLocations>
<!--more ShipToLocations values allowed here-->
<Site>India</Site>
<SKU>PPLB121HD110</SKU>
<StartPrice>2258.00</StartPrice>
<!--SubTitle> string </SubTitle-->
<Title>Braun Satin Hair 1 Dryer HD 110 Hair Dryer</Title>
</Item>
<!-- Standard Input Fields -->
<ErrorLanguage>en_US</ErrorLanguage>
<!--MessageID> string </MessageID>
<Version> string </Version-->
<WarningLevel>High</WarningLevel>
</AddFixedPriceItemRequest>
现在在xml请求中做了很多修改后,上面的一个是最新的。每次提交上述请求时都会收到以下错误响应。
<?xml version="1.0" encoding="UTF-8"?>
<AddFixedPriceItemResponse xmlns="urn:ebay:apis:eBLBaseComponents">
<Timestamp>2014-06-24T07:19:29.784Z</Timestamp>
<Ack>Failure</Ack>
<Errors>
<ShortMessage>Input data is invalid.</ShortMessage>
<LongMessage>Input data for tag <Item.ShippingDetails> is invalid or missing. Please check API documentation.</LongMessage>
<ErrorCode>37</ErrorCode>
<SeverityCode>Error</SeverityCode>
<ErrorParameters ParamID="0">
<Value>Item.ShippingDetails</Value>
</ErrorParameters>
<ErrorClassification>RequestError</ErrorClassification>
</Errors>
<Version>873</Version>
<Build>E873_UNI_API5_16868630_R1</Build>
</AddFixedPriceItemResponse>
我已经完成了所有的谷歌搜索,经历了所有的api,试图复制示例代码,但我仍然得到相同的错误。 我想知道他们是否在xml或其他任何我可能遗漏的错误。
答案 0 :(得分:1)
ShippingService
的值区分大小写,我认为您必须使用&#34; IN_Courier&#34;用大写&#34; N&#34;。
您在此处找到ShippingService
的有效选项列表:
http://developer.ebay.com/DevZone/XML/docs/Reference/ebay/types/ShippingServiceCodeType.html