Question

Normally I can add an item using the API's addItem call, but when trying to use a custom category it fails every time. Any ideas why?

For example, same request for addItem, works with one category, but an identical request fails with a custom category. The custom categories are returned from the getStore method and are seemingly valid! This happens in live and sandbox.

Example:

  • Working category: 3507889013 (Wallpaper) - WORKS
  • Custom category: 3507905013 (Super Fresco) - FAILS!

Fail Response:

Input data is invalid. Input data for tag is invalid or missing. Please check API documentation. 37, Error Item.PrimaryCategory.CategoryID RequestError

Thanks for help!

XML Sent:

<?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>
Was it helpful?

Solution

For anyone else that struggles with this, this answer was from eBay_DTS_Shruti on ebay https://go.developer.ebay.com/developers/ebay/forums/ebay-apis-selling/additem-fails-only-my-custom-categories#answer-332698

And fixes the issue.

R


The reason your AddFixedPriceItem fails is that you are specifying the StoreCategoryID in the wrong tag.

The PrimaryCategoryID (http://developer.ebay.com/DevZone/XML/docs/Reference/ebay/AddFixedPriceI...) should contain the eBay CategoryID and the Custom Store categoryID should be specified in the StoreCategoryID

It should look something like this in the request:

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

Note that you need to specify both the Actual eBay Category and the StoreCategory in the AddFixedPriceItem request.

Hope this helps.

Cheers!!!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top