Skip to content

Content Search Page

https://{cluster-id}.elevate-api.cloud/api/storefront/v3/queries/content-search-page

GET

The content search page query is intended to be used on a separate part of a site, such as an FAQ or a customer service section. A content search page query will return a search result content listing with applicable sort orders and total hits.

Request

Header parameters

Name Description Example
Accept-Encoding Allows responses to be compressed using Gzip. gzip

Query parameters

Name Description Example
customerKey
Required
A key that uniquely identifies the current visitor.
Using UUIDs as keys are recommended.
0b05119e-eeb8-418a-bbfb-defa0dde417e
locale
Required
The visitor locale. Must match an available locale identifier on the current market in the data feed.
market
Required
The visitor market identifier. Must match the corresponding market identifier in the data feed. UK
q
Required
The executed search query. shipping
sessionKey
Required
A unique key, identifying the session.
Using UUIDs as keys are recommended.
0b05119e-eeb8-418a-bbfb-defa0dde417e
touchpoint
Required
The visitor's touchpoint. Supported values: DESKTOP, MOBILE. DESKTOP
limit The number of content items to list. Defaults to 60 if omitted in the query, the min value is 1 and the max value is 600. 10
notify A boolean that can be used to disable notifications and behavioural registration for the query. false
origin To correctly track and analyse search behaviour, searches that originate from autocomplete suggestions, triggered through did-you-mean, or are actual organic searches are differentiated. Supported values: ORGANIC, DID_YOU_MEAN, UNDO_AUTO_CORRECT, PHRASE_SUGGEST, RELATED_SEARCHES, RECENT_SEARCH. ORGANIC
skip The number of content items to skip. Used for pagination, defaults to 0 if omitted in the query. 10
sort The applied Sort order in the search result. Strongly recommended to omit for initial searches. Only recommended for explicit visitor interaction after initial searches. Supported values: RELEVANCE, NEWEST_FIRST. NEWEST_FIRST
viewId A parameter that is used to show the page in either production or preview mode. Can be production or preview. Defaults to production if omitted in the query. For more information, see App Integration. Supported values: PRODUCTION, PREVIEW. production
curl -i \
-X GET \
-H 'Accept-Encoding: gzip' \
"https://{cluster-id}.elevate-api.cloud/api/storefront/v3/queries/content-search-page?customerKey=0b05119e-eeb8-418a-bbfb-defa0dde417e&locale=locale&market=UK&q=shipping&sessionKey=0b05119e-eeb8-418a-bbfb-defa0dde417e&touchpoint=DESKTOP&limit=10&notify=false&origin=ORGANIC&skip=10&sort=NEWEST_FIRST&viewId=production"

Response

Response codes

Status Description
200 Query accepted, content flattened and serialised to JSON.
400 Invalid or missing required arguments.
404 Endpoint is not valid.
503 Service unavailable, no products found in the cluster.
500 Server error such as cluster unavailable or busy. The response body may contain more information about the error.

Response headers

Name Type Description Example
X-Response-Time integer Response time in milliseconds (ms) 65

Response body

Example
application/json;charset=utf-8
{
  "autoCorrect" : {
    "originalTotalHits" : 5,
    "q" : "Jeans"
  },
  "didYouMean" : [ {
    "q" : "shoes"
  } ],
  "primaryList" : {
    "items" : [ {
      "custom" : {
        "tags" : [ {
          "id" : "78",
          "label" : "Guide"
        }, {
          "id" : "223",
          "label" : "Jeans"
        } ]
      },
      "description" : "To wash or not to wash? And how?! Those are questions jeans shoppers are asking.",
      "image" : {
        "alt" : "A woman wearing a white t-shirt",
        "caption" : "The model is 176 cm tall and is wearing size S",
        "custom" : { },
        "sources" : [ {
          "url" : "https://cdn.example.com/img/j12_prod.jpg",
          "height" : 820,
          "width" : 420
        } ]
      },
      "key" : "wash_care",
      "link" : "/wash-guide",
      "releaseDate" : "2021-10-01T00:00:00Z",
      "ticket" : "Oy9mYXNoaW9uL0RFU0tUT1AvQ09OVEVOVF9TRUFSQ0hfUEFHRS9QUklNQVJZX0xJU1Q7Iztjb250ZW50X2tleTtkMDAxOyM7IzsjOyM7",
      "title" : "How to wash jeans",
      "type" : "article"
    } ],
    "sort" : {
      "options" : [ {
        "id" : null,
        "label" : "Relevance"
      } ],
      "selected" : "RELEVANCE"
    },
    "totalHits" : 0
  },
  "q" : "Jean"
}
Schema

ContentSearchPageResult

The object representation of the content search page result.

Name Type Description
autoCorrect AutoCorrect Information about applied auto corrections to the search phrase. Omitted if no correction was made.
didYouMean DidYouMean[] A list of did-you-mean suggestions
primaryList PrimaryContentList A content list with the search result.
q string The search query used for the current result. May be corrected and differ from the requested query.

Example: "Jean"

POST

The content search page query is intended to be used on a separate part of a site, such as an FAQ or a customer service section. A content search page query will return a search result content listing with applicable sort orders and total hits.

Request

Header parameters

Name Description Example
Accept-Encoding Allows responses to be compressed using Gzip. gzip

Query parameters

Name Description Example
customerKey
Required
A key that uniquely identifies the current visitor.
Using UUIDs as keys are recommended.
0b05119e-eeb8-418a-bbfb-defa0dde417e
locale
Required
The visitor locale. Must match an available locale identifier on the current market in the data feed.
market
Required
The visitor market identifier. Must match the corresponding market identifier in the data feed. UK
q
Required
The executed search query. shipping
sessionKey
Required
A unique key, identifying the session.
Using UUIDs as keys are recommended.
0b05119e-eeb8-418a-bbfb-defa0dde417e
touchpoint
Required
The visitor's touchpoint. Supported values: DESKTOP, MOBILE. DESKTOP
limit The number of content items to list. Defaults to 60 if omitted in the query, the min value is 1 and the max value is 600. 10
notify A boolean that can be used to disable notifications and behavioural registration for the query. false
origin To correctly track and analyse search behaviour, searches that originate from autocomplete suggestions, triggered through did-you-mean, or are actual organic searches are differentiated. Supported values: ORGANIC, DID_YOU_MEAN, UNDO_AUTO_CORRECT, PHRASE_SUGGEST, RELATED_SEARCHES, RECENT_SEARCH. ORGANIC
skip The number of content items to skip. Used for pagination, defaults to 0 if omitted in the query. 10
sort The applied Sort order in the search result. Strongly recommended to omit for initial searches. Only recommended for explicit visitor interaction after initial searches. Supported values: RELEVANCE, NEWEST_FIRST. NEWEST_FIRST
viewId A parameter that is used to show the page in either production or preview mode. Can be production or preview. Defaults to production if omitted in the query. For more information, see App Integration. Supported values: PRODUCTION, PREVIEW. production

Supported Content-Type

  • application/json;charset=utf-8
  • text/plain;charset=utf-8

Request body

Example
application/json;charset=utf-8
{
  "primaryList" : {
    "contentFilter" : {
      "content_key" : [ "a1", "d2" ],
      "custom.ATTRIBUTE" : "abc123",
      "type" : [ "article", "designer" ]
    }
  }
}
Schema

ContentSearchPageRequestSettings

A configuration object allowing filter restrictions of the primary listing, i.e. the search results.

Name Type Description
primaryList PrimaryContentListSettings A configuration object allowing filter restrictions of the primary listing, i.e. the search results.
curl -i \
-X POST \
-H 'Accept-Encoding: gzip' \
-H 'Content-Type: application/json;charset=utf-8' \
"https://{cluster-id}.elevate-api.cloud/api/storefront/v3/queries/content-search-page?customerKey=0b05119e-eeb8-418a-bbfb-defa0dde417e&locale=locale&market=UK&q=shipping&sessionKey=0b05119e-eeb8-418a-bbfb-defa0dde417e&touchpoint=DESKTOP&limit=10&notify=false&origin=ORGANIC&skip=10&sort=NEWEST_FIRST&viewId=production" \
-T request-body.file

Response

Response codes

Status Description
200 Query accepted, content flattened and serialised to JSON.
400 Invalid or missing required arguments.
404 Endpoint is not valid.
503 Service unavailable, no products found in the cluster.
500 Server error such as cluster unavailable or busy. The response body may contain more information about the error.

Response headers

Name Type Description Example
X-Response-Time integer Response time in milliseconds (ms) 65

Response body

Example
application/json;charset=utf-8
{
  "autoCorrect" : {
    "originalTotalHits" : 5,
    "q" : "Jeans"
  },
  "didYouMean" : [ {
    "q" : "shoes"
  } ],
  "primaryList" : {
    "items" : [ {
      "custom" : {
        "tags" : [ {
          "id" : "78",
          "label" : "Guide"
        }, {
          "id" : "223",
          "label" : "Jeans"
        } ]
      },
      "description" : "To wash or not to wash? And how?! Those are questions jeans shoppers are asking.",
      "image" : {
        "alt" : "A woman wearing a white t-shirt",
        "caption" : "The model is 176 cm tall and is wearing size S",
        "custom" : { },
        "sources" : [ {
          "url" : "https://cdn.example.com/img/j12_prod.jpg",
          "height" : 820,
          "width" : 420
        } ]
      },
      "key" : "wash_care",
      "link" : "/wash-guide",
      "releaseDate" : "2021-10-01T00:00:00Z",
      "ticket" : "Oy9mYXNoaW9uL0RFU0tUT1AvQ09OVEVOVF9TRUFSQ0hfUEFHRS9QUklNQVJZX0xJU1Q7Iztjb250ZW50X2tleTtkMDAxOyM7IzsjOyM7",
      "title" : "How to wash jeans",
      "type" : "article"
    } ],
    "sort" : {
      "options" : [ {
        "id" : null,
        "label" : "Relevance"
      } ],
      "selected" : "RELEVANCE"
    },
    "totalHits" : 0
  },
  "q" : "Jean"
}
Schema

ContentSearchPageResult

The object representation of the content search page result.

Name Type Description
autoCorrect AutoCorrect Information about applied auto corrections to the search phrase. Omitted if no correction was made.
didYouMean DidYouMean[] A list of did-you-mean suggestions
primaryList PrimaryContentList A content list with the search result.
q string The search query used for the current result. May be corrected and differ from the requested query.

Example: "Jean"

Inner Schemas

AutoCorrect

Name Type Description
originalTotalHits integer The number of hits for the original search phrase.

Example: 5
q string The autocorrected suggestion.

Example: "Jeans"

ContentFilter

Content filters can be applied to most content listings and are included in the request body for the target listing. Applying a filter will restrict the set of returned content and can only be string value filters e.g. not numeric. Listing multiple attributes to filter on will restrict the content to all conditions (logical AND). When listing values within one attribute, content with any of the listed properties apply (logical OR). In addition, any custom attribute can be used as a value filter, through prefixing the attribute to be filtered with custom., for example custom.season. The following example filters on content having both a specific designer and one or both seasons listed: {"custom.designer": "Langdon","type": "article", "custom.season": ["Winter", "Spring"]} Here is a brief description of the filters available:

Name Type Description
content_key string[] The key(s) of the content items you wish to filter.

Example: ["a1","d2"]
custom.ATTRIBUTE string The custom attribute as the name and then the values you wish to filter on. Note that ATTRIBUTE should be replaced with a custom attribute in the data feed.

Example: "abc123"
type string[] The type(s) of the content items you wish to filter.

Example: ["article","designer"]

ContentItem

Object representation of the content item.

Name Type Description
custom <string, CustomAttribute[]> Custom attributes of the content item, represented as key-value pairs.

Example: {"tags":[{"id":"78","label":"Guide"},{"id":"223","label":"Jeans"}]}
description string Description of the content item. Undefined if omitted during import.

Example: "To wash or not to wash? And how?! Those are questions jeans shoppers are asking."
image Image Image information. Undefined if omitted during import.
key string Content identifier

Example: "wash_care"
link string Link to the page representing this content item.

Example: "/wash-guide"
releaseDate string Release date of the content item. Undefined if omitted during import.

Example: "2021-10-01T00:00:00Z"
ticket string Used in notification calls to register visitor interaction.

Example: "Oy9mYXNoaW9uL0RFU0tUT1AvQ09OVEVOVF9TRUFSQ0hfUEFHRS9QUklNQVJZX0xJU1Q7Iztjb250ZW50X2tleTtkMDAxOyM7IzsjOyM7"
title string Title of the content item.

Example: "How to wash jeans"
type string Type of the content item.

Example: "article"

ContentSortOrder

Name Type Description
options SortOption[] The available sort order options
selected string The chosen sort order Supported values: RELEVANCE, NEWEST_FIRST.

Example: "RELEVANCE"

CustomAttribute

Name Type Description
id string Id of the attribute (the actual value).

Example: "summer"
label string The label of the attribute (the name attribute in the feed - currently not available for content items).

Example: "Summer"

DidYouMean

Name Type Description
q string A suggested correction of the original query. Never returned simultaneously as an applied autocorrection.

Example: "shoes"

Image

The object representation of an image.

Name Type Description
alt string Element of image specifying the alt text of an image. The alt text should describe the image. Always returned along with the image.

Example: "A woman wearing a white t-shirt"
caption string Element of image specifying the caption for the image, only returned on the product page (or content information for content).

Example: "The model is 176 cm tall and is wearing size S"
custom <string, string> Custom attributes of the image.
sources Source[]

PrimaryContentList

The object representation of the primary content list.

Name Type Description
items ContentItem[] A list of the result of the search.
sort ContentSortOrder How the content is sorted and the available sort options.
totalHits integer The total number of content item hits.

PrimaryContentListSettings

A configuration object allowing filter restrictions of the primary listing, i.e. the search results.

Name Type Description
contentFilter ContentFilter

Example: {"custom.designer":"Langdon","type":"article","custom.season":["Winter","Spring"]}

SortOption

Name Type Description
id SortOrderV2 Identifier for the SortOption.

Example: "RELEVANCE"
label string The presentation text for the SortOption.

Example: "Relevance"

Source

Name Type Description
url
Required
string The URL of the image source.

Example: "https://cdn.example.com/img/j12_prod.jpg"
height integer The height of the image. Undefined if height was not specified.

Example: 820
width integer The width of the image. Undefined if width was not specified and hasn't yet been assessed by the image service.

Example: 420

SortOrderV2 (enum)

Name Description
RELEVANCE Sort for the most relevant product in the current context, based on set business goals. Default for all primary listings.
NEWEST_FIRST The newest product first, determined by release date provided in the product feed. The first import date will be used for a product if no release date is provided in the product feed.
PRICE_ASCENDING Ordered by the selling price of the least expensive variant of a product, low to high.
PRICE_DESCENDING Ordered by the selling price of the most expensive variant of a product, high to low.
DISCOUNT Ordered by the discount percentage of the most discounted variant of a product, high to low.
RATING Ordered by the rating of a product, high to low. Only applicable if rating is supplied in the product feed.
NAME Ordered by the name of the products. Only applicable if name is supplied in the product feed.
LENGTH_INCREASING Sort by smallest length.
LENGTH_DECREASING Sort by largest length.
WIDTH_INCREASING Sort by smallest width.
WIDTH_DECREASING Sort by largest width.
HEIGHT_INCREASING Sort by smallest height.
HEIGHT_DECREASING Sort by largest height.
DEPTH_INCREASING Sort by smallest depth.
DEPTH_DECREASING Sort by largest depth.
VOLUME_INCREASING Sort by smallest volume.
VOLUME_DECREASING Sort by largest volume.
WEIGHT_INCREASING Sort by smallest weight.
WEIGHT_DECREASING Sort by largest weight.
TITLE Ordered by the title of the products. Only applicable if title is supplied in the product feed.
×
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