2
votes

I'm trying to add a product to eBay using the API.

Here's a snippet of the code:

<Item>
    <Currency>GBP</Currency>
    <Country>GB</Country>
    <ListingDuration>Days_30</ListingDuration>
    <PrimaryCategory>
        <CategoryID>31413</CategoryID>
    </PrimaryCategory>
    <Location>GB</Location>
    <StartPrice>42.79</StartPrice>
    <Quantity>10</Quantity>
    <ProductListingDetails>
    <BrandMPN>
      <Brand>Nourkrin</Brand>
      <MPN>NRK-0033</MPN>
    </BrandMPN>
    <UPC>5707725100255</UPC>
    <EAN>5707725100255</EAN>
    <ListIfNoProduct>true</ListIfNoProduct>

    </ProductListingDetails>

eBay now requires the Brand, MPN, EAN and UPC however when I add these to my code, I get the error:

<ShortMessage>No product found for ProductListingDetails.&lt;EAN&gt; &lt;5707725100255&gt;. </ShortMessage>

I think this is because eBay is looking up the EAN in it's product database to see if it exits and is a known product.

If I remove the EAN I get the error:

<ShortMessage>No product found for ProductListingDetails.&lt;EAN&gt; &lt;5707725100255&gt;. </ShortMessage>

I guess because it's using the UPC, if I remove EAN and UPC I get the error:

<ShortMessage>No product found for ProductListingDetails.&lt;BrandMPN&gt; &lt;, NRK0033&gt;. </ShortMessage>

and..

<LongMessage>Required field, EAN, is missing. Please add EAN to the listing and retry.</LongMessage>

I've tried changing EAN and UPC to 'Does not apply'

<UPC>Does not apply</UPC>
<EAN>Does not apply</EAN>

but I get the error:

<ShortMessage>No product found for ProductListingDetails.&lt;UPC&gt; &lt;Does not apply&gt;. </ShortMessage>

the AddItem template on the sandbox API looks like this:

<ISBN> string </ISBN>
<UPC> string </UPC>
<EAN> string </EAN>
<BrandMPN><Brand> string </Brand>
<MPN> string </MPN>
</BrandMPN>

https://developer.ebay.com/devzone/xml/docs/Reference/ebay/AddItem.html

I've also tried removing <ListIfNoProduct>true</ListIfNoProduct> but it doesn't seem to make any difference.

I looked at this post too:

eBay SDK AddItem new ProductDetails EAN Requirements CANNOT List Or Revise

How can i get this product to list? What am I doing wrong?

1

1 Answers

0
votes

I had a lot of problems with this, but what worked for me is: if you have UPC number then you have to pass "Does not apply" for EAN (but with EAN then pass empty string to UPC).

Do not pass a number to both fields as this always result in error.

So this should do:

<Item>
<Currency>GBP</Currency>
<Country>GB</Country>
<ListingDuration>Days_30</ListingDuration>
<PrimaryCategory>
    <CategoryID>31413</CategoryID>
</PrimaryCategory>
<Location>GB</Location>
<StartPrice>42.79</StartPrice>
<Quantity>10</Quantity>
<ProductListingDetails>
  <BrandMPN>
    <Brand>Nourkrin</Brand>
    <MPN>NRK-0033</MPN>
  </BrandMPN>
  <UPC>Does not apply</UPC>
  <EAN>5707725100255</EAN>
  <ListIfNoProduct>true</ListIfNoProduct>
  ...
</ProductListingDetails>
<ItemSpecifics>
     //add brand and mpn here as well
</ItemSpecifics>

Also eBay recommends putting Brand and MPN in <ItemSpecifics> tag as well. Sorry I'm working with C# API so I can't give you exact XML representation of it.

Hope this helps.

EDITED:

Checked and 5707725100255 is an EAN number not UPC. Edited my answer.