Offersearches
The offersearches resource family provides access to search for offers as well as facets and sort attributes resources.
Sort Attributes Selector
Retrieve the sort attribute selectors available for the store to sort the search result.
Workflow
- Start with offer-search-result
GET
the link with rel: sortattributesGET
the link with rel: choiceGET
the link with rel: chosenGET
the link with rel: offersearchresultGET
the link with rel: descriptionPOST
the choice using the link with rel: selectaction
Read Sort Attribute
Retrieve the localized display name of the sort attribute.
Workflow
- Start with sort-attribute-selector-choice
GET
the link with rel: description- Render the response
Response Fields
Type: offersearch.sort-attribute
Name | Description | Type |
---|---|---|
display-name | The display name of the attribute in the given locale. | string |
Offer Search
Retrieve offers with facets for the keywords in the search query, submitted using the form.
Workflow
- Start with searches
GET
the link with rel: offersearchform- Fill out the form
POST
the form using the link with rel: offersearchactionGET
the link with rel: element- Render the response
Read Facets
Retrieve the facets available for the search query to refine the search results.
Workflow
- Start with offer-search-result
GET
the link with rel: facets- Render the response
Read Facet
Retrieve the display name of the facet and facet value selector resource.
Workflow
- Start with facets
GET
the link with rel: element- Render the response
Response Fields
Type: offersearch.facet
Name | Description | Type |
---|---|---|
display-name | The 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
- Start with facet
GET
the link with rel: facetselectorGET
the link with rel: choiceGET
the link with rel: chosenGET
the link with rel: offersearchresultGET
the link with rel: descriptionPOST
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
- Start with facet-selector-choice
GET
the link with rel: description- Render the response
Response Fields
Type: offersearch.facet-value
Name | Description | Type |
---|---|---|
value | The facet value. | string |
count | The count of items corresponding to the selected facet value. | string |