diff --git a/source/includes/_search.md.erb b/source/includes/_search.md.erb index ee44f823..24e43613 100644 --- a/source/includes/_search.md.erb +++ b/source/includes/_search.md.erb @@ -331,57 +331,50 @@ sdk.search({type: 'full_search', search_query: 'string', filters_search_by: 'pop ### API response -| Name | Type | Description | -|:-------------------|:-------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| brands | array | Array with information about brands. Each object has the following properties: | -| | | * name – brand name (string) | -| | | * picture – brand picture (string) | -| categories | array | Array with information about categories. Each object has the following properties: | -| | | * alias – category alias (string) | -| | | * id – category id (string) | -| | | * name – category name (string) | -| | | * parent – parent category id (string) | -| | | * url – category url (string) | -| filters | array | Array with information about filters. Each object has the following properties: | -| | | * filter – fitler object. Has the following properties: | -| | | * count – total count of products whith this parameters (number) | -| | | * values – array of values (object). Has the following properties: | -| | | * value – value label. (string) | -| | | * count – cont of products whith this parameter (number) | -| industrial_filters | array | Array with information about industrial filters. For example: colors and fashion_sizes | -| | | colors (array of objects) has the following properties: color, count | -| | | fashion_sizes (array of objects) has the following properties: size, count | -| html | string | HTML-code of the block with products. The template is customized in the <%= config[:service_name] %> personal account. | -| price_range | object | Min and max price of products. Has the following properties: | -| | | * min – min price (number) | -| | | * max – max price (number) | -| products | array | Array with information about products. Each object has the following properties: | -| | | * brand – product brand (string) | -| | | * currency – product currency (string, corresponds to the currency of the personal account in <%= config[:service_name] %>, or a custom value specified in the shop settings in the personal account) | -| | | * id – product ID (string) | -| | | * is_new – product property (boolean, default - null) | -| | | * name – product name (string) | -| | | * old_price – product old price (string, default - 0) | -| | | * picture – product's picture URL in the <%= config[:service_name] %> storage (string) | -| | | * price – product price (number) | -| | | * price_formatted – product price with currency (string) | -| | | * url – product URL (string) | -| | | * group_id - id of the group with aggregated products (string) | -| | | Additional properties. If a parameter "extended" is passed in the request | -| | | * barcode – product barcode (string) | -| | | * categories – product categories (array). Has the following properties: | -| | | * id – category id (string) | -| | | * name – category name (string) | -| | | * parent – parent category id (string) | -| | | * params – array with information about params. Each object has the following properties: | -| | | * key – param name (string) | -| | | * values – array of values (array) | -| products_total | number | Total count of products | -| search_query | string | Search query | -| book_authors | array | Reserved | -| keywords | array | Reserved | -| queries | array | Reserved | -| virtual_categories | array | Reserved | + +| Name | Type | Description | Conditions of Occurrence | +|--------------------|------------------|----------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------| +| search_query | string | The search query string. | Required field, always returned if a query is provided. | +| collections | array | List of collections to which the product belongs. | Returned if collections are specified in the database. If collections are absent, the field will not be returned. | +| products_total | integer | Total number of products matching the search query. | Always returned when there are products matching the search query. | +| products | array of objects | Array of products matching the search query. Includes the following fields: | Always returned when there are products available. | +| | | * `name` (string) | | +| | | * `url` (string) | | +| | | * `description` (string) | | +| | | * `category_ids` (array of integers) | | +| | | * `brand` (string) | | +| | | * `fashion_sizes` (array of strings) | | +| | | * `fashion_feature` (string) | | +| | | * `fashion_gender` (string) | | +| | | * `fashion_wear_type` (string) | | +| | | * `sales_rate` (integer) | | +| | | * `relative_sales_rate` (float) | | +| | | * `price_formatted` (string) | | +| | | * `price_full_formatted` (string) | | +| | | * `picture` (string) | | +| categories | array of objects | List of product categories. Includes the following fields: | Always returned if the product belongs to specific categories. | +| | | * `id` (string) | | +| | | * `url` (string) | | +| | | * `name` (string) | | +| | | * `level` (integer) | | +| | | * `url_handle` (string) | | +| price_range | object | Price range for the found products. Includes the following fields: | Returned if the product price falls within the range specified by the `price_min` and `price_max` parameters. | +| | | * `min` (float) | | +| | | * `max` (float) | | +| price_ranges | array of objects | Array of price ranges that contain products. Includes the following fields: | Returned if products fall into multiple price ranges. | +| | | * `from` (integer) | | +| | | * `count` (integer) | | +| brands | array of objects | List of product brands that match the search query. Includes the following fields: | Returned if the query includes filtering by brand or if products belong to multiple brands. | +| | | * `name` (string) | | +| | | * `count` (integer) | | +| industrial_filters | object | Filters for products based on size and other characteristics. Includes the following fields: | Returned if size or characteristic filters are applied to the products. | +| | | * `fashion_sizes` (array of objects) | | +| | | * `size` (integer) | | +| | | * `count` (integer) | | +| clarification | boolean | Flag indicating if query clarification is needed (e.g., if no exact matches are found). | Returned if clarification is required to obtain more accurate results. | +| requests_count | integer | The number of requests made to the API within the session. | Always returned. | +| html | string | HTML markup for displaying products on the page. | Returned if HTML content is required for rendering on the client side. | +