eBay API call not working for UPC/EAN

扶醉桌前 提交于 2019-12-05 08:54:46

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)

  1. http://www.ebay.com/sch/i.html?_nkw=883929106646 Here search ebay.com with valid UPC (Music category). Result : Positive

  2. http://www.upcdatabase.com/item/883929106646 UPC database has a positive hit

  3. 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

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.

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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!