Home > @poq/sdk-sfcc > IProductSearchClient > getProductSearchAvailability
Provides keyword and refinement search functionality for products. Only returns the product id, link, name and availability information in the product search hit. This resource does not return detailed information about variation products. If a variation product matches the query, basic information for the parent master product is returned. Use the products resource to retrieve more details about a variation product.
Signature:
getProductSearchAvailability(q?: string, refine?: Array<string>, sort?: string, start?: number, count?: number, locale?: string, options?: RequestOptions): Promise<PoqResponse<ProductSearchResult>>;
Parameter | Type | Description |
---|---|---|
q | string | (Optional) The query phrase to search for. |
refine | Array<string> | (Optional) Parameter that represents a refinement attribute/value(s) pair. Refinement attribute id and value(s) are separated by '='. Multiple values are supported by a sub-set of refinement attributes and can be provided by separating them using a pipe (URL encoded = "|"). Value ranges can be specified like this: refine=price=(100..500) Multiple refine parameters can be provided by adding an underscore in combination with an integer counter right behind the parameter name and a counter range 1..9. I.e. refine_1=c_refinementColor=red|green|blue. The following system refinement attribute ids are supported: cgid: Allows to refine per single category id. Multiple category ids are not supported. price: Allows to refine per single price range. Multiple price ranges are not supported. pmid: Allows to refine per promotion id(s). orderable_only: Unavailable products will be excluded from the search results if true is set. Multiple refinement values are not supported. |
sort | string | (Optional) The id of the sorting option to sort the search hits. |
start | number | (Optional) The result set index to return the first instance for. Default value is 0. |
count | number | (Optional) The maximum number of instances per request. Default value is 25. |
locale | string | (Optional) The locale context. |
options | RequestOptions | (Optional) Override http request option. |
Returns:
Promise<PoqResponse<ProductSearchResult>>