Skip to content

Content List on Search Page

Querying the search-page endpoint using the GET method will return a product list in the search results. Including content list(s) in the search page results page can be achieved by supplying a page configuration and sending the query using the POST method.

Example

Below is an example of a query to the search-page endpoint to also include a content list.

//request-body.json
{
    "contentLists": [
        {
            "id": "all-content"
        }
    ]
} 
#!/bin/bash
curl -X POST \
"https://{cluster-id}.api.esales.apptus.cloud/api/v2/queries/search-page?market=EU&sessionKey=4b116e34-0a7a-ce5d-5591-75c62f231967&customerKey=4b116e34-0a7a-ce5d-5591-75c62f231967&touchpoint=DESKTOP&q=store" \
-H 'Content-Type: application/json' \
-d @request-body.json
const api = esales({ market: 'US', webApiId: 'clusterId', touchpoint: 'desktop' });
const results = await api.query.searchPage({ q: 'store' }, { contentLists: [{
id: 'all-content'}]});

To include certain content lists, a content filter can also be specified in the request body as shown in the example below. For more information, see Content filters.

Example

The request body below will limit the eSales response to content with the type=inspiration. The attribute type must be provided in the data feed for the filter to take effect.

{
    "contentLists": [
    {
    "id":"articles",
    "contentFilter":{
        "type":"inspiration"
        }
    }
    ]
}

Last update: June 27, 2022
×
Copyright

This online publication is intellectual property of Apptus Technologies. Its contents can be duplicated in part or whole, provided that a copyright label is visibly located on each copy and the copy is used in conjunction with the product described within this document.

All information found in these documents has been compiled with utmost attention to detail. However, this does not guarantee complete accuracy. Neither Apptus Technologies nor the authors shall be held liable for possible errors or the consequences thereof.

Software and hardware descriptions cited in these documents might be registered trademarks. All trade names are subject to copyright restrictions and may be registered trademarks. Apptus Technologies essentially adheres to the manufacturer’s spelling. Names of products and trademarks appearing in this document, with or without specific notation, are likewise subject to trademark and trade protection laws and may thus fall under copyright restrictions.

CLOSE