0

通常我可以使用 API 的addItem调用添加一个项目,但是当尝试使用自定义类别时,它每次都会失败。任何想法为什么?

例如,对 ,的相同请求适用addItem于一个类别,但对于自定义类别,相同的请求会失败。自定义类别是从该getStore方法返回的,并且看似有效!这发生在实时和沙盒中。

例子:

  • 工作类别:3507889013(壁纸) - WORKS
  • 自定义类别:3507905013(超级壁画)-失败!

失败响应:

输入数据无效。标签的输入数据无效或缺失。请查看 API 文档。37、错误Item.PrimaryCategory.CategoryID RequestError

感谢帮助!

XML 发送:

<?xml version="1.0" encoding="utf-8"?>
<AddItemRequest xmlns="urn:ebay:apis:eBLBaseComponents">
<RequesterCredentials>
<eBayAuthToken>[my token in here]</eBayAuthToken>
</RequesterCredentials>
<Item>
<Title>* TEST ITEM * Please do not click, or buy this item5</Title>
<Description>[some text]</Description>
<PrimaryCategory>
<CategoryID>3507905013</CategoryID>
</PrimaryCategory>
<CategoryMappingAllowed>true</CategoryMappingAllowed>
<PictureDetails>
<PictureURL>[image url]</PictureURL>
</PictureDetails>
<StartPrice>49.99</StartPrice>
<ConditionID>1000</ConditionID>
<Country>GB</Country>
<Currency>GBP</Currency>
<DispatchTimeMax>1</DispatchTimeMax>
<ListingDuration>GTC</ListingDuration>
<ListingType>FixedPriceItem</ListingType>
<PaymentMethods>PayPal</PaymentMethods>
<PayPalEmailAddress>[email]</PayPalEmailAddress>
<Location>Lancashire</Location>
<ProductListingDetails>
<UPC>3700166628625</UPC>
<IncludeStockPhotoURL>true</IncludeStockPhotoURL>
<IncludePrefilledItemInformation>true</IncludePrefilledItemInformation>
</ProductListingDetails>
<Quantity>30</Quantity>
<ReturnPolicy>
<ReturnsAcceptedOption>ReturnsAccepted</ReturnsAcceptedOption>
<ReturnsWithinOption>Days_14</ReturnsWithinOption>
<Description>[some text]</Description>
</ReturnPolicy>
<ShippingDetails>
<ShippingType>Flat</ShippingType>
<ShippingServiceOptions>
<ShippingServicePriority>1</ShippingServicePriority>
<ShippingService>UK_RoyalMailFirstClassStandard</ShippingService>
<ShippingServiceCost>0</ShippingServiceCost>
<ShippingServiceAdditionalCost>0</ShippingServiceAdditionalCost>
</ShippingServiceOptions>
<InternationalShippingServiceOption>
<ShippingService>UK_IntlTrackedPostage</ShippingService>
<ShippingServiceAdditionalCost currencyID="GBP">0</ShippingServiceAdditionalCost>
<ShippingServiceCost currencyID="GBP">0</ShippingServiceCost>
<ShippingServicePriority>1</ShippingServicePriority>
<ShipToLocation>IE</ShipToLocation>
</InternationalShippingServiceOption>
</ShippingDetails>
<Site>UK</Site>
</Item>
</AddItemRequest>
4

1 回答 1

0

对于其他为此苦苦挣扎的人,这个答案来自 ebay 上的 eBay_DTS_Shruti https://go.developer.ebay.com/developers/ebay/forums/ebay-apis- sell/additem-fails-only-my-custom-categories #answer-332698

并解决问题。

R


您的 AddFixedPriceItem 失败的原因是您在错误的标签中指定了 StoreCategoryID。

PrimaryCategoryID ( http://developer.ebay.com/DevZone/XML/docs/Reference/ebay/AddFixedPriceI.. ) 应包含 eBay CategoryID,并且应在 StoreCategoryID 中指定自定义商店 categoryID

它在请求中应该看起来像这样:

<Storefront>
<StoreCategoryID>2328253017</StoreCategoryID>
<StoreCategory2ID>0</StoreCategory2ID>
</Storefront>

请注意,您需要在 AddFixedPriceItem 请求中同时指定 Actual eBay Category 和 StoreCategory。

希望这可以帮助。

干杯!!!

于 2013-11-18T12:28:14.010 回答