> ## 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.

# Optional query parameters

> Examples of optional query parameters for the HTTPS API and JavaScript library.

There are a number of optional parameters that can be provided when sending queries to Elevate. The following sections provide examples of how to work with some of these parameters.

## Stores and channels

Retailers can provide online and physical store stock numbers in the catalog imports. For more information, see [Stores and channels](/elevate/docs/integration/site-integration/query-integration/query-parameters#stores-and-channels).

If `STORE` is explicitly declared in the `channel` parameter, then value(s) for the `store` parameter must be supplied with the relevant store keys. The following example shows a query to the `search-page` endpoint to include the stock level from both online and physical stores, particularly for stores with the store keys `soho` and `tribeca`.

### Example

<Tabs>
  <Tab title="REST API">
    ```bash icon="terminal" theme={null}
    curl -X GET \
    'https://{cluster-id}.elevate-api.cloud/api/storefront/v3/queries/search-page?market=US&locale=en-US&customerKey=b65f78d4-23f0-4043-bd5e-fea24b5837d3&sessionKey=cc6772fd-65e2-4392-a1ee-24977c99fd2e&touchpoint=desktop&limit=60&skip=0&viewId=production&q=blue%20shirt&channels=ONLINE%7CSTORE&stores=soho%7Ctribeca'
    ```
  </Tab>

  <Tab title="JS Library">
    ```javascript icon="js" theme={null}
    const api = esales({ clusterId: 'w00000000', market:'US', locale: 'en-US', touchpoint:'desktop' });
    const results = await api.query.searchPage({
      q: 'blue shirt',
      channels: 'ONLINE|STORE',
      stores:'soho|tribeca'
    });
    ```
  </Tab>
</Tabs>

## Notify

If large scale testing is done to simulate visitor behavior during development and testing, it is recommended to ensure that `notify=false` is applied. For more information, see the [query parameters reference](/elevate/docs/integration/site-integration/query-integration/query-parameters).

### Example

The following is an example of how to work with the `notify` parameter.

<Tabs>
  <Tab title="REST API">
    ```bash icon="terminal" theme={null}
    curl -X GET \
    'https://{cluster-id}.elevate-api.cloud/api/storefront/v3/queries/autocomplete?market=US&locale=en-US&customerKey=b65f78d4-23f0-4043-bd5e-fea24b5837d3&sessionKey=cc6772fd-65e2-4392-a1ee-24977c99fd2e&touchpoint=desktop&q=shir&notify=false'
    ```
  </Tab>

  <Tab title="JS Library">
    ```javascript icon="js" theme={null}
    const api = esales({ clusterId: 'w00000000', market: 'US', locale: 'en-US', touchpoint: 'desktop' });
    const results = await api.query.autocomplete({ q: 'shir', notify: false });
    ```
  </Tab>
</Tabs>

## Templates and custom attributes

By default, Elevate returns the predefined product attributes in the query response. To include custom attributes in the query response, one of two methods can be used:

* The first option is to supply a `templateId` parameter, corresponding to the ID of an imported [template](/elevate/docs/api/admin/v4/import/templates). All attributes defined in the template will be returned in the query response.
* The second option is to supply all requested custom parameters as pipe-separated values in the `presentCustom` parameter. Custom attributes on a variant can be requested by prefixing the name with `variant.`, for example `variant.grip`. Custom typed attributes can be requested by prefixing the name with the type, for example `length.diameter` or `variant.number.package_count`.

Note that these options are mutually exclusive: you can only use one of them in each request. In general, we suggest using templates to reduce the size of query requests and, in particular, query responses, as templates let you fine-tune what data you want.

### Example

Below is an example of how to include custom attributes in a query response.

<Tabs>
  <Tab title="templateId - HTTPS API">
    Multiple custom attributes can be requested by specifying them using URL-encoded pipe separators, for example `presentCustom=category%7Cseason`.

    ```bash icon="terminal" theme={null}
    curl -X GET \
    'https://{cluster-id}.elevate-api.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=silk&templateId=default'
    ```
  </Tab>

  <Tab title="templateId - API Library">
    Multiple custom attributes can be requested by specifying them as an array of strings, for example `presentCustom:['category', 'season']`.

    ```javascript icon="js" theme={null}
    const api = esales({ clusterId: 'w00000000', market: 'US', locale: 'en-US', touchpoint: 'desktop' });
    const results = await api.query.searchPage({
      q: 'silk',
      templateId: 'default'
    });
    ```
  </Tab>

  <Tab title="presentCustom - HTTPS API">
    Multiple custom attributes can be requested by specifying them using URL-encoded pipe separators, for example `presentCustom=category%7Cseason`.

    ```bash icon="terminal" theme={null}
    curl -X GET \
    'https://{cluster-id}.elevate-api.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=silk&presentCustom=season'
    ```
  </Tab>

  <Tab title="presentCustom - API Library">
    Multiple custom attributes can be requested by specifying them as an array of strings, for example `presentCustom:['category', 'season']`.

    ```javascript icon="js" theme={null}
    const api = esales({ clusterId: 'w00000000', market: 'US', locale: 'en-US', touchpoint: 'desktop' });
    const results = await api.query.searchPage({
      q: 'silk',
      presentCustom:['season']
    });
    ```
  </Tab>
</Tabs>

## Present prices

Retailers can choose to simultaneously [present multiple prices for products](/elevate/docs/changelog/changelog#2022) on the site, for example member price versus non-member price. To include these custom prices in the query response, they must be specified in the `presentPrices` parameter.

### Example

The value(s) supplied in the `presentPrices` parameter must match price identifiers defined in the catalog import, see [Custom prices in the Format specification](/elevate/docs/integration/catalog-imports/format-overview#custom-prices). Below is an example of how to include custom prices in a query response.

<Tabs>
  <Tab title="REST API">
    Multiple custom prices can be requested by specifying them using URL-encoded pipe separators, for example `presentPrices=VIP%7CNON_VIP`.

    ```bash icon="terminal" theme={null}
    curl -X GET \
    'https://{cluster-id}.elevate-api.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=silk&presentPrices=VIP%7CNON_VIP'
    ```
  </Tab>

  <Tab title="JS Library">
    Multiple custom prices can be requested by specifying them as an array of strings, for example `presentPrices:['VIP', 'NON_VIP']`.

    ```javascript icon="js" theme={null}
    const api = esales({ clusterId: 'w00000000', market: 'US', locale: 'en-US', touchpoint: 'desktop' });
    const results = await api.query.searchPage({
      q: 'silk',
      presentPrices:['VIP','NON_VIP']
    });
    ```
  </Tab>
</Tabs>
