Product Selector

Fusion 5.9
    Fusion 5.9

    BrowseSearch Store API functions

    Table of Contents

    The browse endpoint enables developers to return all documents in the current application, sorted by relevancy. Additional sort and filter options are available.

    This function doesn’t require a value. Alternatively, pass a JSON object to include optional parameters.

    Example requests

    Required parameters
    window.getSearchStore().browse()
    Required and optional parameters
    window.getSearchStore().browse({
        page: PAGE,
        limit: LIMIT,
        sort: [{
            sortField: 'SORT_FIELD',
            sortOrder: 'SORT_ORDER'
        }],
        facets: ['FACET_1', 'FACET_2'],
        fieldList: ['FIELD_1', 'FIELD_2'],
        filters: [{
            field: 'FIELD',
            values: ['VALUE_1', 'VALUE_2']
        }],
        analyticsData: true
    })
    The preceding example demonstrates the required parameters and some optional parameters to pass with this function. For full details on all parameters and allowed values, see the Query API configuration spec.

    Demo

    The following CodePen resource demonstrates the usage of this function. Open your browser’s web console and network monitor logs and watch for activity after clicking the buttons that trigger the Search Store API function.

    Edit the function and click the corresponding button again to see the result change.