Poq.SDK.Node

Home > @poq/sdk-sfcc > ProductSearchClient > getProductSearchAvailability

ProductSearchClient.getProductSearchAvailability() method

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>>;

Parameters

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 &#39;&#x3D;&#39;. Multiple values are supported by a sub-set of refinement attributes and can be provided by separating them using a pipe (URL encoded &#x3D; &quot;|&quot;). Value ranges can be specified like this: refine&#x3D;price&#x3D;(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&#x3D;c_refinementColor&#x3D;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>>