Advanced Search Example
Chances are if you've arrived at this page you've already completed the steps in the Getting Started Quick page and you want to see what a more complicated search looks like. This page will show such a search.
Let's say that you want to search for all SNES games in bharding's booth on Bonanza, with 100 results per page. Per the API call docs, the filter to do this would be:
{ "keywords" => "SNES", "paginationInput" => { "entriesPerPage" => 100 }, "itemFilter" => { "boothName" => "bharding" }}
Escaping the quotes when translating that hash to JSON yields the following string:
"{\"itemFilter\":{\"boothName\":\"bharding\"},\"paginationInput\":{\"entriesPerPage\":100},\"keywords\":\"SNES\"}"
So, your HTTP post will look something like this:
"http://api.bonanza.com/api_requests/standard_request?findItemsByKeywordsRequest={\"itemFilter\":{\"boothName\":\"bharding\"},\"paginationInput\":{\"entriesPerPage\":100},\"keywords\":\"SNES\"}"
Of course, for this to work, you'd have to include the correct headers (with your dev id) and you'd need to post this, which means the parameters wouldn't actually be part of the URL.
If submitted properly, this will return all results from bharding's booth that have the word SNES in the title in JSON format. As of time of writing (October 2009), that is three items. So that 100 results per page was rather pointless.