是的,我可以正常使用API添加项目,但是当尝试使用自定义类别时,它每次都会失败。有什么想法吗?我正在使用addItem?
因此,例如,addItem的相同请求适用于一个类别,但相同的请求会因自定义类别而失败。自定义类别从getStore方法返回,看似有效!这发生在实时和沙盒中。
实施例: 工作类别:3507889013(壁纸) - 作品 自定义类别: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>
答案 0 :(得分:0)
对于其他任何挣扎于此的人,这个答案来自eBay_DTS_Shruti 在易趣上https://go.developer.ebay.com/developers/ebay/forums/ebay-apis-selling/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。
希望这有帮助。