Browse Queries
- Shell
- JavaScript
- Python
- Java
- iOS
- Android
- C#
curl -X GET -H "Content-Type: application/json" \
"https://ac.cnstrc.com/browse/[filter_name]/[filter_value]?key=[your API key]"
Browse Spring Break Sale collection
curl -X GET -H "Content-Type: application/json" \
"https://ac.cnstrc.com/browse/collection_id/spring_break_sale?key=pAFl6rReRSI0uXckcxZS"
Browse categories for dogs, show 2 results per page and the 3rd page of results.
curl -X GET -H "Content-Type: application/json" \
"https://ac.cnstrc.com/browse/group_id/dogs?key=pAFl6rReRSI0uXckcxZS&num_results_per_page=2&page=3"
// Client side Javascript
// Please refer to https://Krestor-io.github.io/Krestorio-client-javascript/module-browse.html#~getBrowseResults
// Node
// Please refer to https://Krestor-io.github.io/Krestorio-node/module-browse.html#~getBrowseResults
# Please refer to https://Krestor-io.github.io/Krestorio-python/Krestor_io.modules.html#module-Krestor_io.modules.browse
// Please refer to https://Krestor-io.github.io/Krestorio-java/io/Krestor/client/KrestorIO.html
// Please refer to https://Krestor-io.github.io/Krestorio-client-swift/
// Please refer to https://Krestor-io.github.io/Krestorio-client-android/library/io.Krestor.core/-Krestor-io/index.html#%5Bio.Krestor.core%2FKrestorIo%2FgetBrowseResults%2F%23kotlin.String%23kotlin.String%23kotlin.collections.List%5Bkotlin.Pair%5Bkotlin.String%2Ckotlin.collections.List%5Bkotlin.String%5D%5D%5D%3F%23kotlin.Int%3F%23kotlin.Int%3F%23kotlin.Int%3F%23kotlin.String%3F%23kotlin.String%3F%23kotlin.String%3F%23kotlin.collections.List%5Bkotlin.String%5D%3F%23kotlin.collections.List%5Bkotlin.String%5D%3F%2FPointingToDeclaration%2F%5D%2FFunctions%2F-1632692142
// This method is not currently supported.
HTTP Request
GET https://ac.cnstrc.com/browse/[filter_name]/[filter_value]?key=[your API key]&filters[Color]=Brown&filters[Color]=White&filters[Price]=100-200&fmt_options[groups_start]=current&fmt_options[groups_max_depth]=1
URL Parameters
Option | Default | Description |
---|---|---|
page | 1 | The page number of the results. Can't be used together with 'offset' |
offset | 0 | The number of results to skip from the beginning. Can't be used together with 'page' |
num_results_per_page | 20 | The number of results per page to return. The maximum value is 100. |
filters[filter_name]=filter_value | n/a | Any number of criteria by which you'd like to narrow the result set. This might be by color, size, or category (group) an item belongs to. Facets (uploaded through the Add an Item API) and group ids can be used as filters. Filters with the same key are OR ed together, while filters with different keys are AND ed together by default. If filter_value has the form <min>-<max> , it's interpreted as a range (e.g: filters[Price]=100-200 will match all items with Price from 100 to 200 ). |
pre_filter_expression | n/a | Faceting expression to scope browse results, it is applied before other filters and doesn't affect facet counts. |
fmt_options[groups_start] | current | Either current or top . Specifies the top-level group that should be returned in the response. If a group_id is provided in filters and the value for this option is current , we'll return groups starting from the currently selected one. If the value is top , we will always start returning groups from the root category in the hierarchy, regardless of which one is selected |
fmt_options[groups_max_depth] | 1 | Maximum depth of the group hierarchy that should be included in the response. |
fmt_options[show_protected_facets] | False | Flag whether to return all facets configured as protected in response facets section. Requires authentication. |
fmt_options[show_hidden_facets] | False | Flag whether to return all facets configured as hidden in response facets section. |
fmt_options[hidden_facets] | n/a | List of hidden facets to return in response facets section. Unlike `fmt_options[show_hidden_facets], this parameter allows one to control the list of normally hidden facets to be returned. This can be useful to show inventory for a particular store stored in a facet (as when a user is interested in local availability). |
fmt_options[hidden_fields] | n/a | List of hidden metadata fields to return in response. |
sort_by | relevance | The criteria by which browse results should be sorted. The default value relevance sorts by Krestor's relevance & personalization algorithms and is reserved. Please reach out to support@Krestor to define alternate sort criteria. |
sort_order | descending | Either descending or ascending . The sort order by which browse results should be sorted. Only valid in conjunction with sort_by . |
us | None | User segment is a client context value (such as platform, location, etc.) that is used to evaluate redirect and refined tag rules. You can supply multiple segments by passing multiple us arguments. |
now | n/a | Unix epoch timestamp, which will be used as current moment in time when applying filtering by product age. Using that parameter you can emulate "past/future" requests. |
variations_map | n/a | Mapping configuration to return item variations data in a specific format. It is a JSON string where you can list the only attributes of item variation you need. It's also possible to group variations and aggregate their fields in some way. For example, you can ask for min and max prices across all item variations, return only the first image URL instead of all variation pictures, or get only a list of all possible colors and no other data. The feature can be useful to build item swatches right in your browse results view or reduce response size to speed up render of the results. More details, including the exact schema for this value can be found here |
System Status
To check the health of the system that serves all /browse
requests (items
, groups
, etc...), you can issue a GET /status/product/browse
, as shown below:
- Shell
- JavaScript
- Python
- Java
- iOS
- Android
- C#
Check if the 'browse' system is healthy
curl -X GET "https://ac.cnstrc.com/status/product/browse"
// This method is not currently supported.
# This method is not currently supported.
// This method is not currently supported.
// This method is not currently supported.
// This method is not currently supported.
// This method is not currently supported.
A healthy system will reply with {"message": "OK"}