Same result from{{version}}/catalog/categories/1/search every time

(Eduardo Thomas Perez) #1

I’m just starting to play with the API before writing some code, and I must be doing something wrong in one of my tests:

    "sort": "MinPrice DESC",
    "limit": 100,
    "offset": 0,
    "filters": [
    	{ "name": "SetName", "values": [ "10th Edition" ] },
    	{ "name": "Price", "values": ["1", "2"] }

I always get the same 10 items, just in different order sometimes:

    "totalItems": 41010,
    "success": true,
    "errors": [],
    "results": [

Can anybody give me any pointers of what is going on?
Thank you!

(Joshua Burdick) #2

You will need to add an offset and/or limit to get the rest of the products. Try removing the sort and changing the order like this:
“offset”: 0,
“limit”: 100,
“filters”: [
{ “name”: “SetName”, “values”: [ “10th Edition” ] },
{ “name”: “Price”, “values”: [“1”, “2”] }

Then increment offset to get the rest.

(Eduardo Thomas Perez) #3

Thank you for your answer, but it is still not working (for example, it gives me cards from Kaladesh);
also why would the order of the properties in the request change anything?

(Joshua Burdick) #4

I just tested this again and it returns only the set. The price value is searching for a specific value so if there aren’t any at that value it will limit results, without price as a filter it returns cards from 10th Edition.

“sort”: “MinPrice DESC”,
“limit”: 100,
“offset”: 0,
“filters”: [
{ “name”: “SetName”, “values”: [ “10th Edition” ] }

There is also a more in depth guide about this endpoint here:

(Eduardo Thomas Perez) #5

I keep getting the same results, even copying and pasting your example into Postman.
There has to be something wrong with my setup…
Why do I keep getting only 10 results if I have set a value of 100 for limit?

(Joshua Burdick) #6

It sounds like what’s happening is that none of the filters are being set for some reason. What does your code look like that is sending the request?

(Eduardo Thomas Perez) #7

I just discovered that I get the same response even when sending the body of the request empty.
I’m not coding anything yet, just using Postman directly:
Headers (version is 1.9.0)

I got the request collection from here:
When I signed up I only got the private and the public key, and then I was able to make a request to get the access token.
May that have anything to do?

(Eduardo Thomas Perez) #8

And the body of the request, I couldn’t attach both pictures: