V1 Sneakers

FREEMIUM
Door TG4 Solutions | Bijgewerkt hace 24 días | Data
Populariteit

9.1 / 10

Latency

2,341ms

Serviceniveau

99%

Health Check

N/A

Terug naar alle discussies

The sort parameter

Rapid account: Professor AO
ProfessorAO
hace un año

How do I use the sort Parameter? What is an example input?

Rapid account: Vincent Sanders
vincent.sanders Commented hace un año

The above is for filtering but here is the entire documentation for both filtering and sorting:

Filtering
The following example retrieves all Jordan sneakers that were released in 2019 or after.

https://api.thesneakerdatabase.com/v2/sneakers?limit=10&brand=jordan&releaseYear=gte:2019

Date Filtering Considerations
When filtering on date and using the less than and equal to operator, please be aware that sneakers missing a release date may be returned in the results. Currently, these sneakers have a release year of 0. This may require you to add some additional logic to filter out these sneakers.Please remember that dates must be in the YYYY-MM-DD format.

As of this release the following operations are available:
lt – less than
gt – greater than
lte – less than or equal to
gte – greater than or equal to
lte – less than or equal to

Sorting
The default sort order for queries is descending by release date. Filtering is required in order to ignore unreleased sneakers as they will be returned first.

The following request will return all vans sneakers by retail price in descending order. Please notice the “:” between the sort field and the sort order.

https://api.thesneakerdatabase.com/v2/sneakers?limit=10&brand=vans&sort=retailPrice:desc

To sort in ascending order replace “desc” with “asc”.

https://api.thesneakerdatabase.com/v2/sneakers?limit=10&brand=vans&sort=retailPrice:asc

Sort order is ignored when searching by name, as our interest is returning the most relevant sneakers first.

Doe mee aan de discussie - voeg hieronder een opmerking toe

Log in / Schrij u in om nieuwe opmerkingen te plaatsen