We are getting the following error when calling the eBay AddItemRequest
API
The item specific Type is missing. Add Type to this listing, enter a valid value, and then try again.21919303
<?xml version="1.0" encoding="utf-8"?>
<AddItemRequest xmlns="urn:ebay:apis:eBLBaseComponents">
<RequesterCredentials>
<eBayAuthToken>XXXXXXXXXXX</eBayAuthToken>
</RequesterCredentials>
<ErrorLanguage>en_US</ErrorLanguage>
<WarningLevel>High</WarningLevel>
<Item>
<Title>test-800</Title>
<Description>test 800</Description>
<PrimaryCategory>
<CategoryID>176971</CategoryID>
</PrimaryCategory>
<StartPrice>200</StartPrice>
<CategoryMappingAllowed>true</CategoryMappingAllowed>
<ConditionID>1000</ConditionID>
<Country>US</Country>
<Currency>USD</Currency>
<DispatchTimeMax>3</DispatchTimeMax>
<ListingDuration>GTC</ListingDuration>
<ListingType>FixedPriceItem</ListingType>
<PictureDetails>
<GalleryType>Gallery</GalleryType>
<PictureURL>https://eznetcrm.net/img/eZnetLogo.png</PictureURL>
</PictureDetails>
<PostalCode>32746</PostalCode>
<ProductListingDetails>
<UPC></UPC>
<BrandMPN>
<Brand>HP</Brand>
<MPN>845418-B21</MPN>
</BrandMPN>
<IncludeStockPhotoURL>true</IncludeStockPhotoURL>
<IncludePrefilledItemInformation>true</IncludePrefilledItemInformation>
<UseFirstProduct>true</UseFirstProduct>
<UseStockPhotoURLAsGallery>true</UseStockPhotoURLAsGallery>
<ReturnSearchResultOnDuplicates>true</ReturnSearchResultOnDuplicates>
</ProductListingDetails>
<Quantity>5</Quantity>
<ItemSpecifics>
<NameValueList>
<Name>Brand</Name>
<Value>HP</Value>
</NameValueList>
<NameValueList>
<Name>MPN</Name>
<Value>845418-B21</Value>
</NameValueList>
</ItemSpecifics>
<ReturnPolicy>
<ReturnsAcceptedOption>ReturnsAccepted</ReturnsAcceptedOption>
<RefundOption>MoneyBack</RefundOption>
<ReturnsWithinOption>Days_30</ReturnsWithinOption>
<ShippingCostPaidByOption>Buyer</ShippingCostPaidByOption>
</ReturnPolicy>
<ShippingDetails>
<ShippingType>Flat</ShippingType>
<ShippingServiceOptions>
<ShippingServicePriority>1</ShippingServicePriority>
<ShippingService>USPSMedia</ShippingService>
<ShippingServiceAdditionalCost>0</ShippingServiceAdditionalCost>
<ShippingServiceCost>0</ShippingServiceCost>
</ShippingServiceOptions>
</ShippingDetails>
<Site>US</Site>
</Item>
</AddItemRequest>
We are trying to add an item using the above XML through eBay APIs but are unable to do so. What we are doing wrong in XML format? Also, we have added specific data as we got an error.
When adding ItemSpecifics
, you will need to check if there are any ItemSpecific
entries that are mandatory for your CategoryID
. This can be checked from the GetCategorySpecifics API.
In your case, the category ID is 176971
and in the XML payload, there are two existing ItemSpecifics
: Brand
and MPN
. As suggested by the error message you are getting and confirming from the GetCategorySpecifics
API on eBay, it is evident that you need to add an ItemSpecific with the name Type
within your ItemSpecifics. After doing that, your ItemSpecifics
should look like this:
<ItemSpecifics>
<NameValueList>
<Name>Brand</Name>
<Value>HP</Value>
</NameValueList>
<NameValueList>
<Name>Type</Name>
<Value>CustomTypeNameHere</Value>
</NameValueList>
<NameValueList>
<Name>MPN</Name>
<Value>845418-B21</Value>
</NameValueList>
</ItemSpecifics>
You can verify the call using the VerifyAddItemResponse
API once you add the Type
ItemSpecific.
In general, to figure out what ItemSpecifics are needed for a given CategoryId
, you can refer to the following documentation (Listing with Required Item Specifics. However, very briefly, to determine which item specifics are required, call GetCategorySpecifics
to retrieve the item specifics recommendations for the category you're listing in. In the response, look for these fields for each recommendation:
Recommendations.NameRecommendation.ValidationRules.MinValues
Recommendations.NameRecommendation.ValidationRules.SelectionMode=SelectionOnly