Bestseller API

What does the Bestseller API do?

The Bestseller API returns the products that are likely to generate the most revenue. The algorithm uses a combination of RPV, ATCs and Views, combined in order to maximize revenue.

📘

The bestseller API doesn't return products according to their conversions only. If you need this behavior, then use the Search APIs and sort the results by best_seller in descending order with the sort parameter:

&sort=best_seller desc

This will return products sorted based on sitewide conversions.

If you are integrating JFY widgets on your site, then the Bestseller API provides the default content for these widgets until Bloomreach has enough information about individual site visitors to provide personalized recommendations and suggestions. For information about deploying JFY widgets, see Just for you (JFY) API.

Endpoints

Production: https://core.dxpapi.com/api/v1/core/?
Staging: https://staging-core.dxpapi.com/api/v1/core/?

Example request and response

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 #Value must be search for Bestseller API
&rows=20
&start=0
&fl=pid,title,brand,price,sale_price,colors,sizes,thumb_image,price_range,sale_price_range
&search_type=bestseller #Value must be bestseller for Bestseller API
response: {
    numFound: 93,
    start: 0,
    docs: 
    []},
    facet_counts:
    {
        facet_queries: { },
        facet_fields:
        {},
         
    },
    did_you_mean: [ ],
    category_map: { },
}

❗️

API requests should be limited to 16K Bytes. API requests above this length will throw Error Code 414.

Response fields

Parameter Name

Description

match

Container for the core response details.

numFound

The number of records (products) that the Bestseller response is based on, or the number of records that the Bestseller request retrieves.

start

The first page number of results.

docs

A container for individual documents (products) and their fields.

Native mobile app and non-JS integration

API requests for native mobile apps or non-JS environments need different values for some parameters:

  • _br_uid_2: The value should be the same as described on the Cookie page. Generate a br_uid_2 for your app user and store it in the app permanently if a br_uid_2 does not exist. This br_uid_2 should be used on the corresponding API calls for the app. If the user is on iPhone and resets their IDFA, or if the user is on an Android device and resets their advertising settings: the br_uid_2 should be erased and regenerated the next time the app is set.
  • ref_url: Leave your ref_url parameters empty.
  • url: Use a dummy value for your url parameters, such as exampledomain.app.
Language
Click Try It! to start a request and see the response here!