Skip to main content
Version: 8.8.x

Offersearches

The offersearches resource family provides access to search for offers as well as facets and sort attributes resources.

Retrieve offers with facets matching the keywords in the search query, submitted using the form.

Workflow​

  1. Start with searches
  2. GET the link with rel: offersearchform
  3. Fill out the form
  4. POST the form using the link with rel: offersearchaction

Request Fields​

Type: offersearch.search-offer​

NameDescriptionType
keywordsSearch keywords.string
page-sizeDefines the number of search results to list per page. This field is optional. If the field is not specified, Cortex API’s default page-size value is used, which can differ depending on your implementation.integer

Read Facets​

Retrieve the facets available for the search query to refine the search results.

Workflow​

  1. Start with offer-search-result
  2. GET the link with rel: facets
  3. Render the response

Read Facet​

Retrieve the display name of the facet and facet value selector resource.

Workflow​

  1. Start with facets
  2. GET the link with rel: element
  3. Render the response

Response Fields​

Type: offersearch.facet​

NameDescriptionType
display-nameThe display name of the selected facet in the API.string

Facet Selector​

Retrieve the facet values available for the selected facet and the facet selector resource to select the required facet values. You can refine the search results by selecting the required choices in multiple facets and retrieve the updated results using the offer search result resource.

Workflow​

  1. Start with facet
  2. GET the link with rel: facetselector
  3. GET the link with rel: choice
  4. GET the link with rel: chosen
  5. GET the link with rel: offersearchresult
  6. GET the link with rel: description
  7. POST the choice using the link with rel: selectaction

Read Facet Value​

Retrieve the facet value and the number of offers corresponding to the facet value selection.

Workflow​

  1. Start with facet-selector-choice
  2. GET the link with rel: description
  3. Render the response

Response Fields​

Type: offersearch.facet-value​

NameDescriptionType
valueThe facet value.string
countThe count of items corresponding to the selected facet value.string

Sort Attributes Selector​

Retrieve the sort attribute selectors available for the store to sort the search result.

Workflow​

  1. Start with offer-search-result
  2. GET the link with rel: sortattributes
  3. GET the link with rel: choice
  4. GET the link with rel: chosen
  5. GET the link with rel: offersearchresult
  6. GET the link with rel: description
  7. POST the choice using the link with rel: selectaction

Read Sort Attribute​

Retrieve the localized display name of the sort attribute.

Workflow​

  1. Start with sort-attribute-selector-choice
  2. GET the link with rel: description
  3. Render the response

Response Fields​

Type: offersearch.sort-attribute​

NameDescriptionType
display-nameThe display name of the attribute in the given locale.string