skip to Main Content

I am listing an item to ebay where my listing condition is

All listings should be:
1. Private (so the item sold is not displayed on my feedback) 
2. Buy It Now only 
3. All listing duration is ‘Good till cancelled’ 
4. Postage is ‘Other 24 hour’ dispatch in 1 working day 
5. Express postage available at £7.99 extra

I am getting these error

i. Input data for tag is invalid or missing. Please check API documentation. [Value] => Item.PrimaryCategory.CategoryID and

ii. The duration “GTC” days(s) is not available for this listing type, or invalid for category “309”.

If anyone has idea, please help. Here is my code.

    $requestXmlBody  = '<?xml version="1.0" encoding="utf-8" ?>';
    $requestXmlBody .= '<AddItemRequest xmlns="urn:ebay:apis:eBLBaseComponents">';
    $requestXmlBody .= "<RequesterCredentials><eBayAuthToken>$userToken</eBayAuthToken></RequesterCredentials>";
    $requestXmlBody .= '<ErrorLanguage>en_US</ErrorLanguage>';
    $requestXmlBody .= '<WarningLevel>High</WarningLevel>';
    $requestXmlBody .= '<Item>';
    $requestXmlBody .= "<Title><![CDATA[$Title]]></Title>";
    $requestXmlBody .= '<Description><![CDATA[Seller assumes all responsibility for this listing.]]></Description>';
    $requestXmlBody .= '<PrimaryCategory><CategoryID>$primaryCategory</CategoryID></PrimaryCategory>';
    $requestXmlBody .= "<StartPrice currencyID='GBP'>$FinalPrice</StartPrice>";
    //$requestXmlBody .= '<BuyItNowPrice currencyID="GBP">$FinalPrice</BuyItNowPrice>';
    $requestXmlBody .= '<ConditionID>1000</ConditionID>';
    $requestXmlBody .= '<CategoryMappingAllowed>true</CategoryMappingAllowed>';
    $requestXmlBody .= '<Country>GB</Country>';
    $requestXmlBody .= '<Currency>GBP</Currency>';
    $requestXmlBody .= '<ListingDuration>GTC</ListingDuration>';
    $requestXmlBody .= '<ListingType>FixedPriceItem</ListingType>';
    $requestXmlBody .= '<PaymentMethods>PayPal</PaymentMethods>';
    $requestXmlBody .= '<PayPalEmailAddress>[email protected]</PayPalEmailAddress>';
    $requestXmlBody .= "<PictureDetails><PictureURL>" . $addPicture . "</PictureURL></PictureDetails>";
    //$requestXmlBody .= "<PostalCode>95125</PostalCode>";
    $requestXmlBody .= "<Quantity>10</Quantity>";
    $requestXmlBody .= "<ReturnPolicy>";
    $requestXmlBody .= "<ReturnsAcceptedOption>ReturnsAccepted</ReturnsAcceptedOption>";
    //$requestXmlBody .= "<RefundOption>MoneyBack</RefundOption>";
    $requestXmlBody .= "<ReturnsWithinOption>Days_30</ReturnsWithinOption>";
    $requestXmlBody .= "<Description>If you are not satisfied, return the item for refund.</Description>";
    $requestXmlBody .= "<ShippingCostPaidByOption>Buyer</ShippingCostPaidByOption>";
    $requestXmlBody .= "</ReturnPolicy>";
    $requestXmlBody .= "<ShippingDetails>";
    $requestXmlBody .= "<ShippingType>Flat</ShippingType>";
    $requestXmlBody .= "<ShippingServiceOptions>";
    $requestXmlBody .= "<ShippingServicePriority>1</ShippingServicePriority>";
    $requestXmlBody .= "<ShippingService>USPSMedia</ShippingService>";
    $requestXmlBody .= "<ShippingServiceCost>2.50</ShippingServiceCost>";
    $requestXmlBody .= "</ShippingServiceOptions>";
    $requestXmlBody .= "</ShippingDetails>";
    $requestXmlBody .= "<Site>UK</Site>";
    $requestXmlBody .= "<!-- Change the UUID for each item you list. It needs to be unique. -->";
    //$requestXmlBody .= "<UUID>ccefc1e08ac811ddad8b0800200c9a68</UUID>";
    $requestXmlBody .= "</Item>";
    $requestXmlBody .= "</AddItemRequest>";

2

Answers


  1. if you look into the API docs regarding this call you will find a notices on the listduration field: http://developer.ebay.com/DevZone/XML/docs/Reference/eBay/AddItem.html#Request.Item.ListingDuration

    “The valid choice of values depends on the listing format (see Item.ListingType). For a list of valid values, call GetCategoryFeatures with DetailLevel set to ReturnAll and look for ListingDurations information. To set a duration of 1 day, the seller must have a Feedback score of at least 10.”

    if i call the API for your CatId 309 ( example for testing can be executed here: https://ebay-sdk.intradesys.com/s/44f683a84163b3523afe57c2e008bc8c it returns:

    ....
    <Category>
        <CategoryID>309</CategoryID>
        <ListingDuration type="Chinese">1</ListingDuration>
        <ListingDuration type="Dutch">1</ListingDuration>
        <ListingDuration type="Live">1</ListingDuration>
        <ListingDuration type="AdType">2</ListingDuration>
        <ListingDuration type="StoresFixedPrice">31</ListingDuration>
        <ListingDuration type="PersonalOffer">1</ListingDuration>
        <ListingDuration type="FixedPriceItem">8</ListingDuration>
        <ListingDuration type="LeadGeneration">19</ListingDuration>
        <BestOfferEnabled>true</BestOfferEnabled>
    ....
    

    important for you is this line:

       <ListingDuration type="FixedPriceItem">8</ListingDuration>
    

    that tells you which Set of Duration is available for this listing type… further down within the API response you will see:

     <ListingDuration durationSetID="1">
      <Duration>Days_3</Duration>
      <Duration>Days_5</Duration>
      <Duration>Days_7</Duration>
      <Duration>Days_10</Duration>
     </ListingDuration>
     <ListingDuration durationSetID="2">
      <Duration>Days_30</Duration>
      <Duration>Days_90</Duration>
     </ListingDuration>
     <ListingDuration durationSetID="19">
      <Duration>Days_28</Duration>
     </ListingDuration>
     <ListingDuration durationSetID="8">
      <Duration>Days_3</Duration>
      <Duration>Days_5</Duration>
      <Duration>Days_7</Duration>
      <Duration>Days_10</Duration>
      <Duration>Days_30</Duration>
     </ListingDuration>
     <ListingDuration durationSetID="31">
      <Duration>Days_3</Duration>
      <Duration>Days_5</Duration>
      <Duration>Days_7</Duration>
      <Duration>Days_10</Duration>
      <Duration>Days_30</Duration>
      <Duration>GTC</Duration>
     </ListingDuration>
    

    if you now look into the durationSetId=8 you will see that GTC is not allowed for this listing type GTC seems only available for the set with id 31 in this case “StoresFixedPrice”

    Login or Signup to reply.
  2. Just a side note: Use business Policies, they will make you life a lot easier when listing via API it will take care of 4 and 5 on your list.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search