eBay’s API findItemsByProduct operation would work on UPC and EAN. But unfortunately it is not working.
The below HTTP GET request for example, throws an “Invalid product ID value.” [error 41] http://svcs.ebay.com/services/search/FindingService/v1?SECURITY-APPNAME=MY-APP-ID-GOES-HERE&OPERATION-NAME=findItemsByProduct&SERVICE-VERSION=1.0.0&RESPONSE-DATA-FORMAT=XML&REST-PAYLOAD&productId.@type=EAN&productId=0016000275270&paginationInput.entriesPerPage=3
Note: Please replace the SECURITY-APPNAME’s value with your eBay’s free APP-ID. I’ve replaced it with MY-APP-ID-GOES-HERE for obvious reasons.
eBay’s API for the above function can be found here: http://developer.ebay.com/DevZone/finding/CallRef/findItemsByProduct.html#findItemsByProduct
The output is:
<findItemsByProductResponse xmlns="http://www.ebay.com/marketplace/search/v1/services">
<ack>Failure</ack>
<errorMessage>
<error>
<errorId>41</errorId>
<domain>Marketplace</domain>
<severity>Error</severity>
<category>Request</category>
<message>Invalid product ID value.</message>
<subdomain>Search</subdomain>
<parameter>0016000275270</parameter>
</error>
</errorMessage>
<version>1.12.0</version>
<timestamp>2014-03-11T18:38:13.543Z</timestamp>
</findItemsByProductResponse>
Could somebody spot any mistake with above call? Thanks.
FWIW, 0016000275270 is a valid bar code
http://www.upcdatabase.com/item/0016000275270
3
Answers
It looks like that’s not a UPC ebay knows, so the error message looks reasonable. If you do a general search on ebay with a UPC and it doesn’t come back with a product-specific results page, it’s likely not in ebay’s system.
Looking at the eBay documentation, is seems that you can only use an UPC value for products in Music (e.g., CDs), DVDs & Movies, and Video Games categories. The error message makes sense as your UPC refers to a product, General Mills Honey Nut Cheerios Cereal, that won’t be availabe in any of those categories. In addition there also appears to be a max length of 12 when specifing a UPC.
From ebay documentation belowl link you are limited to few categories only!! http://developer.ebay.com/DevZone/finding/CallRef/findItemsByProduct.html#findItemsByProduct
ISBN
The ISBN-10 or ISBN-13 value for books. If you know a book’s ISBN, you can use this instead of the eBay Reference ID to search for that book.
UPC
The UPC value for products in Music (e.g., CDs), DVD and Movie, and Video Game categories (or domains). If you know a product’s UPC number, you can use this value instead of the eBay Reference ID to search for that product.
EAN
The EAN value for books (most commonly used in European countries). If you know a book’s EAN, you can use this instead of the eBay Reference ID to search for that book.
As an example, try this sample upc = 883929106646 (Its a upccode for a movie)
http://www.ebay.com/sch/i.html?_nkw=883929106646
Here search ebay.com with valid UPC (Music category). Result : Positive
http://www.upcdatabase.com/item/883929106646
UPC database has a positive hit
http://svcs.ebay.com/services/search/FindingService/v1?SECURITY-APPNAME=MyAppID&OPERATION-NAME=findItemsByProduct&SERVICE-VERSION=1.0.0&RESPONSE-DATA-FORMAT=XML&REST-PAYLOAD&productId.@type=UPC&productId=883929106646&paginationInput.entriesPerPage=3
positive xml response [Don’t forget to change MyAppID above]
Conclusion:
Nothing wrong with your query. Just ebay doesnt have upc/ean from all categories. EBAY Limitation