Sorting

You can alter the sequence in which products are displayed by passing the sort parameter.

Sort by a single value

&sort=price+asc
&sort=sale_price+desc
&sort=launch_date+asc
&sort=brand+asc

Sort by multiple values

#Multiple values must be comma-separated
#Sorting values are applied from left to right
&sort=reviews+desc,sale_price+desc

👍

When sorting on text fields, capital letters appear before lowercase letters. To use a field for text sorting, send all values in lowercase.

Example request

GET https://core.dxpapi.com/api/v1/core/?
account_id=<Bloomreach Provided Account ID>
&auth_key=jazzhands
&domain_key=example_com
&request_id=8830241055597
&_br_uid_2=uid=7797686432023:v=11.5:ts=1428617911187:hc=55
&ref_url=http://www.example.com/home
&url=http://www.example.com/index.html?q=dresses
&request_type=search
&rows=20
&start=0
&fl=pid,title,brand,price,sale_price,colors,sizes,thumb_image,price_range,sale_price_range
&q=dresses
&search_type=keyword
&sort=sale_price+asc

How Sort affects Ranking and Recall


Ranking: Sort overrides ranking rules (Boost, Bury, Slot rules). When you pass the sort parameter in the API requests, it overrides any ranking rules configured for the search query/category and ranks the products based on the sort parameter value.

Recall: Sort does not affect the recall set. The dashboard rules that influence the recall (Include/Exclude rules) will continue to apply.