我正在使用eBay的API进行一些尝试,并尝试获取除新书之外所有带有关键字“ tolkien”的书籍清单。不知何故我没有列表,但出现错误。
这是我正在尝试的网址:
https://svcs.ebay.com/services/search/FindingService/v1
?OPERATION-NAME=findItemsAdvanced
&SERVICE-VERSION=1.0.0
&SECURITY-APPNAME=XXXXXXXXX
&RESPONSE-DATA-FORMAT=JSON
&REST-PAYLOAD=true
&keywords=tolkien
&GLOBAL-ID=EBAY-DE
&itemFilter(0).name=ListingType
&itemFilter(0).value=FixedPrice
&categoryId=267
&itemFilter(1).name=Condition
&itemFilter(1).value(0)=2000
&itemFilter(1).value(1)=2500
&itemFilter(1).value(2)=3000
&itemFilter(1).value(3)=4000
&itemFilter(1).value(4)=5000
&itemFilter(1).value(5)=6000
这就是我得到的:
{
"findItemsAdvancedResponse": [
{
"ack": [
"Failure"
],
"errorMessage": [
{
"error": [
{
"errorId": [
"46"
],
"domain": [
"Marketplace"
],
"severity": [
"Error"
],
"category": [
"Request"
],
"message": [
"Value is required for item filter, CONDITION."
],
"subdomain": [
"Search"
],
"parameter": [
"CONDITION"
]
}
]
}
],
"version": [
"1.13.0"
],
"timestamp": [
"2019-07-03T22:12:21.645Z"
]
}
]
}
答案 0 :(得分:0)
好,我将类别过滤器移到另一个过滤器之前解决了这个问题。
https://svcs.ebay.com/services/search/FindingService/v1
?OPERATION-NAME=findItemsAdvanced
&SERVICE-VERSION=1.0.0
&SECURITY-APPNAME=XXXXXXXXX
&RESPONSE-DATA-FORMAT=JSON
&REST-PAYLOAD=true
&keywords=tolkien
&GLOBAL-ID=EBAY-DE
&categoryId=267
&itemFilter(0).name=ListingType
&itemFilter(0).value=FixedPrice
&itemFilter(1).name=Condition
&itemFilter(1).value(0)=2000
&itemFilter(1).value(1)=2500
&itemFilter(1).value(2)=3000
&itemFilter(1).value(3)=4000
&itemFilter(1).value(4)=5000
&itemFilter(1).value(5)=6000