eBay API调用不适用于UPC / EAN [英] eBay API call not working for UPC/EAN

查看:313
本文介绍了eBay API调用不适用于UPC / EAN的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

eBay的API findItemsByProduct操作可用于UPC和EAN。但不幸的是,它不工作。



例如,下面的HTTP GET请求会引发无效的产品ID值。 [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



注意:请替换SECURITY -APPNAME的价值与您的eBay的免费APP-ID。我用明显的原因替换了MY-APP-ID-GOES-HERE。
上述功能的eBay API可以在这里找到: http: //developer.ebay.com/DevZone/finding/CallRef/findItemsByProduct.html#findItemsByProduct



输出结果为:

 < findItemsByProductResponse xmlns =http://www.ebay.com/marketplace/search/v1/services> 
< ack>失败< / ack>
< errorMessage>
<错误>
< errorId> 41< / errorId>
< domain> Marketplace< / domain>
<严重程度>错误< /严重程度>
< category>请求< / category>
< message>产品ID值无效。< / message>
< subdomain>搜寻< / subdomain>
< parameter> 0016000275270< / parameter>
< / error>
< / errorMessage>
< version> 1.12.0< / version>
< timestamp> 2014-03-11T18:38:13.543Z< / timestamp>
< / findItemsByProductResponse>

有人可以通过上面的调用发现任何错误吗?谢谢。

FWIW,0016000275270是一个有效的条形码
http://www.upcdatabase.com/item/0016000275270

解决方案

从以下ebay文档链接你只限于几个类别! http://developer.ebay.com/DevZone/finding/CallRef/findItemsByProduct .html#findItemsByProduct



ISBN
书籍的ISBN-10或ISBN-13值。如果您了解图书的ISBN,则可以使用此代替eBay参考ID来搜索该图书。



UPC
Music中产品的UPC值(例如CD),DVD和电影以及视频游戏类别(或域)。如果您知道产品的UPC编号,则可以使用此值而不是eBay参考编号来搜索该产品。



EAN
书籍的EAN值(在欧洲国家最常用)。如果您知道某本书的EAN,那么您可以使用此代替eBay Reference ID来搜索该书。



举个例子,试试这个例子upc = 883929106646电影的upccode)


  1. http://www.ebay.com/sch/i.html?_nkw=883929106646
    在这里搜索ebay.com有效的UPC(音乐类别)。结果:正面


  2. http:// www.upcdatabase.com/item/883929106646
    UPC数据库有一个积极的打击


  3. http://svcs.ebay.com/services/search/FindingService/v1?SECURITY-APPNAME=MyAppID&OPERATION-NAME=findItemsByProduct&serv;SERVICE -VERSION = 1.0.0& RESPONSE-DATA-FORMAT = XML& REST-PAYLOAD& productId。@ type = UPC& productId = 883929106646& paginationInput.entriesPerPage = 3


正面xml响应[不要忘记更改上面的MyAppID]



结论:
您的查询没有错。只是易趣没有从所有类别upc / ean。 EBAY限制

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

解决方案

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

这篇关于eBay API调用不适用于UPC / EAN的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆