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/storefront/v3/queries/search-page?market=US&locale=en-US&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({ clusterId: 'w00000000', market: 'US', locale: 'en-US', 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 Elevate 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"
      }
    }
  ]
}
×
Copyright

This online publication is intellectual property of Voyado Lund AB. 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 Voyado Lund AB 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. Voyado Lund AB 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