Question

When I specify a condition filter in the eBay API url, it disables the price rangefilter. How can I make it so that both filters work together properly? Code is below.

<script src=http://svcs.ebay.com/services/search/FindingService/v1?SECURITY-APPNAME=*API KEY GOES HERE*&OPERATION-NAME=findItemsByKeywords&SERVICE-VERSION=1.0.0&RESPONSE-DATA-FORMAT=JSON&callback=_cb_findItemsByKeywords&REST-PAYLOAD&outputSelector=AspectHistogram&itemFilter(0).name=Condition&itemFilter(0).value(0)=New&sortOrder=PricePlusShippingLowest&itemFilter(0).name=MaxPrice&itemFilter(0).value=500.00&itemFilter(0).paramName=Currency&itemFilter(0).paramValue=USD&itemFilter(1).name=MinPrice&itemFilter(1).value=200.00&itemFilter(1).paramName=Currency&itemFilter.name=ListingType&itemFilter.value=FixedPrice&itemFilter(1).paramValue=USD&keywords=iphone%205%2016gb&paginationInput.entriesPerPage=6>
</script>
Was it helpful?

Solution

You need to clearly enumerate your itemFilters. You have at least 2 versions of itemFilter(0).name= with MaxPrice overwriting your Condition filter. You also have an itemFilter without an enumeration at all (itemFilter.value=FixedPrice), probably altering things as well. Take your time to build those filters carefully 1 at a time.

Also, while you're at it, have all the itemFilter's together in your URL, in order, and at the end of the URL (in other words, move the pagination params and sortOrder before all itemFilter params). I've seen cases where this matters.

Also get your SERVICE-VERSION= to be current -- 1.12.0 . That can only help.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top