【问题标题】:Retrieve ISBN from eBay listing via Shopping API通过 Shopping API 从 eBay 列表中检索 ISBN
【发布时间】:2015-06-07 20:24:39
【问题描述】:

我正在尝试使用 eBay 购物 API 来尝试从图书列表中检索 ISBN。我已经有我感兴趣的列表的 eBay ID。很可能大多数将包含在列表的项目详细信息中的 ISBN(有些不会,这些可以忽略)。 因此,人们会假设从 API 中检索项目详细信息会将 ISBN 作为一个值,但看起来输出几乎提供了 ISBN 之外的所有内容除了。例如,除了 ISBN 本身之外,以下 API 请求提供了有关列表的许多有趣细节:

http://open.api.ebay.com/shopping?callname=GetSingleItem&responseencoding=XML&appid=MYAPPID&siteid=1&version=897&ItemID=EBAYID&IncludeSelector=ItemSpecifics

我没有很高兴在 API 文档中搜索从列表中获取此特定元素的解决方案 - 有人对此有解决方案吗?或者,如果根本不可能通过 API 干净地获取 ISBN,是否有替代方法? (这是非常小规模的个人使用。)

【问题讨论】:

    标签: ebay-api isbn


    【解决方案1】:

    ISBN、UPC、EAN 等属于productID 字段。

    使用IncludeSelectorDetails 值返回此字段。所以你想要的网址是:

    http://open.api.ebay.com/shopping?callname=GetSingleItem&responseencoding=XML&appid=MYAPPID&siteid=1&version=897&ItemID=EBAYID&IncludeSelector=Details
    

    http://developer.ebay.com/devzone/shopping/docs/CallRef/GetSingleItem.html#Response.Item.ProductID

    编辑

    要从目录产品中获取 ISBN,您需要使用 productID 值向 Product API 发出请求。

    您需要使用输入调用getProductDetails

     <productDetailsRequest>
        <productIdentifier>
           <ePID>91515717</ePID>
        </productIdentifier>
        <datasetPropertyName>ISBN</datasetPropertyName>
     </productDetailsRequest>
    

    您可以使用ISBN10ISBN13 作为datasetPropertyName 的值,具体取决于您想要的。

    http://svcs.ebay.com/services/marketplacecatalog/ProductService/v1?OPERATION-NAME=getProductDetails&SECURITY-APPNAME=APPID&SERVICE-VERSION=1.3.0&productDetailsRequest.productIdentifier.ePID=REFERENCE&productDetailsRequest.datasetPropertyName=ISBN
    

    http://developer.ebay.com/DevZone/product/CallRef/getProductDetails.html

    【讨论】:

    • 这个好像是默认返回productID字段的ReferenceID,能不能重写返回ISBN?
    • 编辑中描述的方法似乎运行良好 - 谢谢。
    猜你喜欢
    • 2016-11-13
    • 1970-01-01
    • 2017-07-29
    • 1970-01-01
    • 1970-01-01
    • 2017-11-26
    • 2018-10-29
    • 1970-01-01
    • 2014-07-12
    相关资源
    最近更新 更多