> ## Documentation Index
> Fetch the complete documentation index at: https://product-discovery.developer.voyado.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Recommendation lists on landing pages

> Add recommendation lists on landing pages using the HTTPS API or the JavaScript library.

A landing page, such as the homepage or a category page, can include a primary list, recommendation list(s), or both. Including recommendation list(s) can be achieved by supplying a [page configuration](/elevate/docs/integration/category-page-imports) in the request body and sending a `POST` request to the `landing-page` endpoint, or by configuring [recommendation lists](https://help.elevate.voyado.com/hc/en-gb/articles/27610562213660-Recommendations-lists) <Icon icon="external-link" size={12} /> and sending a `GET` or `POST` request to the `landing-page` endpoint. For more information, see the [Landing page query specification](/elevate/docs/api/storefront/v3/queries/landing-page).

## Example

Below is an example of how to include recommendation lists on a landing page. The example is for a homepage where two recommendation lists are presented: one to present the `TOP_PRODUCTS` recommendation and another to present the `NEWEST_PRODUCTS` recommendation with products that have prices up to \$500. For more information about restricting a product selection in a query, see [Product rules](/elevate/docs/integration/category-page-imports#product-rules). The `id: homepage-1` and `id: homepage-2` values refer to the identifiers of the sections or [recommendation lists](https://help.elevate.voyado.com/hc/en-gb/articles/27610562213660-Recommendations-lists) <Icon icon="external-link" size={12} /> for that page.

<Tabs>
  <Tab title="REST API">
    ```json title="Contents of request-body.json" icon="code" expandable theme={null}
    {
      "recommendationLists": [
        {
            "id": "homepage-1",
            "algorithm": "TOP_PRODUCTS"
        },
        {
            "id": "homepage-2",
            "algorithm": "NEWEST_PRODUCTS",
            "productRules":  "rule incl price [0.00, 500.01]"
        }
      ]
    }
    ```

    ```bash icon="terminal" theme={null}
    curl -X POST \
    "https://{cluster-id}.elevate-api.cloud/api/storefront/v3/queries/landing-page?market=US&locale=en-US&customerKey=d9528030-509c-4e0f-b585-7168f1e9feca&sessionKey=d9528030-509c-4e0f-b585-7168f1e9feca&touchpoint=DESKTOP&pageReference=/" \
    -H 'Content-Type: application/json' \
    -d @request-body.json
    ```
  </Tab>

  <Tab title="JS Library">
    ```javascript icon="js" expandable theme={null}
    const api = esales({ clusterId: 'w00000000', market: 'US', locale: 'en-US', touchpoint: 'desktop' });
    const results = await api.query.landingPage(
      { pageReference: '/' },
      {
        recommendationLists: [
          {
            id: 'homepage-1',
            algorithm: 'TOP_PRODUCTS'
          },
          {
            id: 'homepage-2',
            algorithm: 'NEWEST_PRODUCTS',
            productRules: 'rule incl price [0.00, 500.01]'
          }
        ]
      }
    );
    ```
  </Tab>
</Tabs>
