openapi: 3.0.0
info:
  title: AI Search - Synerise Public API
  version: 1.2.2
servers:
  - description: Microsoft Azure EU
    url: https://api.synerise.com
  - description: Microsoft Azure USA
    url: https://api.azu.synerise.com
  - description: Google Cloud Platform
    url: https://api.geb.synerise.com
tags:
  - name: Search
  - name: Visual Search
  - name: Listing
  - name: Synonyms
  - name: Search Configuration
  - name: Suggestions Configuration
  - name: Query Rules
  - name: Search Stats
x-tagGroups:
  - name: AI Search
    tags:
      - Search
      - Visual Search
      - Listing
      - Synonyms
      - Search Configuration
      - Suggestions Configuration
      - Query Rules
      - Search Stats
paths:
  /search/v2/indices/{indexId}/stats/queries/summary:
    get:
      summary: Get queries stats summary
      description: |
        Retrieves the statistics of all queries or a single query defined in the request.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `AI_STATS_READ`

        **User role permission required:** `assets_search: read`
      operationId: GetQueriesSummary
      tags:
        - Search Stats
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/ai-stats-indexId"
        - $ref: "#/components/parameters/ai-stats-dateFrom"
        - $ref: "#/components/parameters/ai-stats-dateTo"
        - $ref: "#/components/parameters/ai-stats-query"
        - $ref: "#/components/parameters/ai-stats-searchType"
        - $ref: "#/components/parameters/ai-stats-searchGroupBy"
      responses:
        "200":
          description: Statistics returned
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ai-stats-QueriesSummarySchema"
        "500":
          description: Service error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ai-stats-Error"
        4xx:
          description: Incorrect request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ai-stats-Error"
      x-snr-doc-urls:
        - /api-reference/ai-search#tag/Search-Stats/operation/GetQueriesSummary
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/search/v2/indices/4add1a1fa877c1651906bb22c9dfd37a1618852272/stats/queries/summary?dateFrom=SOME_STRING_VALUE&dateTo=SOME_STRING_VALUE&query=SOME_STRING_VALUE&searchType=SOME_STRING_VALUE&groupBy=SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("GET", "/search/v2/indices/4add1a1fa877c1651906bb22c9dfd37a1618852272/stats/queries/summary?dateFrom=SOME_STRING_VALUE&dateTo=SOME_STRING_VALUE&query=SOME_STRING_VALUE&searchType=SOME_STRING_VALUE&groupBy=SOME_STRING_VALUE", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("GET", "https://api.synerise.com/search/v2/indices/4add1a1fa877c1651906bb22c9dfd37a1618852272/stats/queries/summary?dateFrom=SOME_STRING_VALUE&dateTo=SOME_STRING_VALUE&query=SOME_STRING_VALUE&searchType=SOME_STRING_VALUE&groupBy=SOME_STRING_VALUE");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/search/v2/indices/4add1a1fa877c1651906bb22c9dfd37a1618852272/stats/queries/summary?dateFrom=SOME_STRING_VALUE&dateTo=SOME_STRING_VALUE&query=SOME_STRING_VALUE&searchType=SOME_STRING_VALUE&groupBy=SOME_STRING_VALUE",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/search/v2/indices/4add1a1fa877c1651906bb22c9dfd37a1618852272/stats/queries/summary');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'dateFrom' => 'SOME_STRING_VALUE',
              'dateTo' => 'SOME_STRING_VALUE',
              'query' => 'SOME_STRING_VALUE',
              'searchType' => 'SOME_STRING_VALUE',
              'groupBy' => 'SOME_STRING_VALUE'
            ]);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/search/v2/indices/4add1a1fa877c1651906bb22c9dfd37a1618852272/stats/queries/summary?dateFrom=SOME_STRING_VALUE&dateTo=SOME_STRING_VALUE&query=SOME_STRING_VALUE&searchType=SOME_STRING_VALUE&groupBy=SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /search/v2/indices/{indexId}/stats/queries/top:
    get:
      summary: Get top query statistics
      description: |
        Retrieves the 1000 most popular queries. 

        <strong>IMPORTANT</strong>: Don't use this endpoint for displaying most popular queries to end users when they're searching. Instead, use [`search/v2/indices/{indexId}/list`](https://developers.synerise.com/AISearch/AISearch.html#operation/ListingGet), where `indexId` is a suggestion index.


        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>, <span title="Deprecated">AI API key (legacy)</span>

        **API key permission required:** `AI_STATS_READ`

        **User role permission required:** `assets_search: read`
      operationId: GetQueriesTop
      tags:
        - Search Stats
      security:
        - JWT: []
        - TrackerKey: []
      parameters:
        - $ref: "#/components/parameters/ai-stats-indexId"
        - $ref: "#/components/parameters/ai-stats-dateFrom"
        - $ref: "#/components/parameters/ai-stats-dateTo"
        - $ref: "#/components/parameters/ai-stats-query"
        - $ref: "#/components/parameters/ai-stats-searchType"
        - $ref: "#/components/parameters/ai-stats-queryFilter"
        - $ref: "#/components/parameters/ai-stats-searchGroupBy"
        - $ref: "#/components/parameters/ai-stats-withFilters"
        - $ref: "#/components/parameters/ai-stats-searchSortBy"
        - $ref: "#/components/parameters/ai-stats-searchOrdering"
      responses:
        "200":
          description: Statistics returned
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ai-stats-QueriesTopSchema"
        "500":
          description: Service error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ai-stats-Error"
        4xx:
          description: Incorrect request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ai-stats-Error"
      x-snr-doc-urls:
        - /api-reference/ai-search#tag/Search-Stats/operation/GetQueriesTop
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/search/v2/indices/4add1a1fa877c1651906bb22c9dfd37a1618852272/stats/queries/top?dateFrom=SOME_STRING_VALUE&dateTo=SOME_STRING_VALUE&query=SOME_STRING_VALUE&searchType=SOME_STRING_VALUE&queryFilter=SOME_STRING_VALUE&groupBy=SOME_STRING_VALUE&withFilters=SOME_STRING_VALUE&SortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("GET", "/search/v2/indices/4add1a1fa877c1651906bb22c9dfd37a1618852272/stats/queries/top?dateFrom=SOME_STRING_VALUE&dateTo=SOME_STRING_VALUE&query=SOME_STRING_VALUE&searchType=SOME_STRING_VALUE&queryFilter=SOME_STRING_VALUE&groupBy=SOME_STRING_VALUE&withFilters=SOME_STRING_VALUE&SortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("GET", "https://api.synerise.com/search/v2/indices/4add1a1fa877c1651906bb22c9dfd37a1618852272/stats/queries/top?dateFrom=SOME_STRING_VALUE&dateTo=SOME_STRING_VALUE&query=SOME_STRING_VALUE&searchType=SOME_STRING_VALUE&queryFilter=SOME_STRING_VALUE&groupBy=SOME_STRING_VALUE&withFilters=SOME_STRING_VALUE&SortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/search/v2/indices/4add1a1fa877c1651906bb22c9dfd37a1618852272/stats/queries/top?dateFrom=SOME_STRING_VALUE&dateTo=SOME_STRING_VALUE&query=SOME_STRING_VALUE&searchType=SOME_STRING_VALUE&queryFilter=SOME_STRING_VALUE&groupBy=SOME_STRING_VALUE&withFilters=SOME_STRING_VALUE&SortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/search/v2/indices/4add1a1fa877c1651906bb22c9dfd37a1618852272/stats/queries/top');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'dateFrom' => 'SOME_STRING_VALUE',
              'dateTo' => 'SOME_STRING_VALUE',
              'query' => 'SOME_STRING_VALUE',
              'searchType' => 'SOME_STRING_VALUE',
              'queryFilter' => 'SOME_STRING_VALUE',
              'groupBy' => 'SOME_STRING_VALUE',
              'withFilters' => 'SOME_STRING_VALUE',
              'SortBy' => 'SOME_STRING_VALUE',
              'ordering' => 'SOME_STRING_VALUE'
            ]);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/search/v2/indices/4add1a1fa877c1651906bb22c9dfd37a1618852272/stats/queries/top?dateFrom=SOME_STRING_VALUE&dateTo=SOME_STRING_VALUE&query=SOME_STRING_VALUE&searchType=SOME_STRING_VALUE&queryFilter=SOME_STRING_VALUE&groupBy=SOME_STRING_VALUE&withFilters=SOME_STRING_VALUE&SortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /search/v2/indices/{indexId}/stats/filters/summary:
    get:
      summary: Get filters stats
      description: |
        Retrieves the statistics of filters used in searches.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `AI_STATS_READ`

        **User role permission required:** `assets_search: read`
      operationId: GetFiltersSummary
      tags:
        - Search Stats
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/ai-stats-indexId"
        - $ref: "#/components/parameters/ai-stats-filterName"
        - $ref: "#/components/parameters/ai-stats-dateFrom"
        - $ref: "#/components/parameters/ai-stats-dateTo"
        - $ref: "#/components/parameters/ai-stats-searchGroupBy"
        - $ref: "#/components/parameters/ai-stats-searchOrdering"
      responses:
        "200":
          description: Statistics returned
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ai-stats-FiltersSummarySchema"
        "500":
          description: Service error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ai-stats-Error"
        4xx:
          description: Incorrect request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ai-stats-Error"
      x-snr-doc-urls:
        - /api-reference/ai-search#tag/Search-Stats/operation/GetFiltersSummary
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/search/v2/indices/4add1a1fa877c1651906bb22c9dfd37a1618852272/stats/filters/summary?filterName=brand&dateFrom=SOME_STRING_VALUE&dateTo=SOME_STRING_VALUE&groupBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("GET", "/search/v2/indices/4add1a1fa877c1651906bb22c9dfd37a1618852272/stats/filters/summary?filterName=brand&dateFrom=SOME_STRING_VALUE&dateTo=SOME_STRING_VALUE&groupBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("GET", "https://api.synerise.com/search/v2/indices/4add1a1fa877c1651906bb22c9dfd37a1618852272/stats/filters/summary?filterName=brand&dateFrom=SOME_STRING_VALUE&dateTo=SOME_STRING_VALUE&groupBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/search/v2/indices/4add1a1fa877c1651906bb22c9dfd37a1618852272/stats/filters/summary?filterName=brand&dateFrom=SOME_STRING_VALUE&dateTo=SOME_STRING_VALUE&groupBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/search/v2/indices/4add1a1fa877c1651906bb22c9dfd37a1618852272/stats/filters/summary');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'filterName' => 'brand',
              'dateFrom' => 'SOME_STRING_VALUE',
              'dateTo' => 'SOME_STRING_VALUE',
              'groupBy' => 'SOME_STRING_VALUE',
              'ordering' => 'SOME_STRING_VALUE'
            ]);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/search/v2/indices/4add1a1fa877c1651906bb22c9dfd37a1618852272/stats/filters/summary?filterName=brand&dateFrom=SOME_STRING_VALUE&dateTo=SOME_STRING_VALUE&groupBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /search/v2/indices/{indexId}/stats/rules/summary:
    get:
      summary: Get rules stats
      description: |
        Retrieves the statistics of applied rules.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `AI_STATS_READ`

        **User role permission required:** `assets_search: read`
      operationId: GetRulesSummary
      tags:
        - Search Stats
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/ai-stats-indexId"
        - $ref: "#/components/parameters/ai-stats-dateFrom"
        - $ref: "#/components/parameters/ai-stats-dateTo"
        - $ref: "#/components/parameters/ai-stats-searchGroupBy"
      responses:
        "200":
          description: Statistics returned
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ai-stats-RulesSummarySchema"
        "500":
          description: Service error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ai-stats-Error"
        4xx:
          description: Incorrect request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ai-stats-Error"
      x-snr-doc-urls:
        - /api-reference/ai-search#tag/Search-Stats/operation/GetRulesSummary
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/search/v2/indices/4add1a1fa877c1651906bb22c9dfd37a1618852272/stats/rules/summary?dateFrom=SOME_STRING_VALUE&dateTo=SOME_STRING_VALUE&groupBy=SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("GET", "/search/v2/indices/4add1a1fa877c1651906bb22c9dfd37a1618852272/stats/rules/summary?dateFrom=SOME_STRING_VALUE&dateTo=SOME_STRING_VALUE&groupBy=SOME_STRING_VALUE", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("GET", "https://api.synerise.com/search/v2/indices/4add1a1fa877c1651906bb22c9dfd37a1618852272/stats/rules/summary?dateFrom=SOME_STRING_VALUE&dateTo=SOME_STRING_VALUE&groupBy=SOME_STRING_VALUE");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/search/v2/indices/4add1a1fa877c1651906bb22c9dfd37a1618852272/stats/rules/summary?dateFrom=SOME_STRING_VALUE&dateTo=SOME_STRING_VALUE&groupBy=SOME_STRING_VALUE",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/search/v2/indices/4add1a1fa877c1651906bb22c9dfd37a1618852272/stats/rules/summary');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'dateFrom' => 'SOME_STRING_VALUE',
              'dateTo' => 'SOME_STRING_VALUE',
              'groupBy' => 'SOME_STRING_VALUE'
            ]);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/search/v2/indices/4add1a1fa877c1651906bb22c9dfd37a1618852272/stats/rules/summary?dateFrom=SOME_STRING_VALUE&dateTo=SOME_STRING_VALUE&groupBy=SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /search/v2/indices/stats/queries/summary:
    get:
      summary: Get queries summary for multiple indices
      description: |
        Retrieves the statistics of all queries or a single query defined in the request for multiple indices.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `AI_STATS_READ`

        **User role permission required:** `assets_search: read`
      operationId: GetQueriesSummaryMultipleIndices
      tags:
        - Search Stats
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/ai-stats-indexIdArray"
        - $ref: "#/components/parameters/ai-stats-dateFrom"
        - $ref: "#/components/parameters/ai-stats-dateTo"
        - $ref: "#/components/parameters/ai-stats-query"
        - $ref: "#/components/parameters/ai-stats-searchType"
        - $ref: "#/components/parameters/ai-stats-searchGroupBy"
      responses:
        "200":
          description: Statistics returned
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ai-stats-QueriesSummaryMultipleIndicesSchema"
        "500":
          description: Service error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ai-stats-Error"
        4xx:
          description: Incorrect request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ai-stats-Error"
      x-snr-doc-urls:
        - /api-reference/ai-search#tag/Search-Stats/operation/GetQueriesSummaryMultipleIndices
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/search/v2/indices/stats/queries/summary?indexId=SOME_ARRAY_VALUE&dateFrom=SOME_STRING_VALUE&dateTo=SOME_STRING_VALUE&query=SOME_STRING_VALUE&searchType=SOME_STRING_VALUE&groupBy=SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("GET", "/search/v2/indices/stats/queries/summary?indexId=SOME_ARRAY_VALUE&dateFrom=SOME_STRING_VALUE&dateTo=SOME_STRING_VALUE&query=SOME_STRING_VALUE&searchType=SOME_STRING_VALUE&groupBy=SOME_STRING_VALUE", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("GET", "https://api.synerise.com/search/v2/indices/stats/queries/summary?indexId=SOME_ARRAY_VALUE&dateFrom=SOME_STRING_VALUE&dateTo=SOME_STRING_VALUE&query=SOME_STRING_VALUE&searchType=SOME_STRING_VALUE&groupBy=SOME_STRING_VALUE");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/search/v2/indices/stats/queries/summary?indexId=SOME_ARRAY_VALUE&dateFrom=SOME_STRING_VALUE&dateTo=SOME_STRING_VALUE&query=SOME_STRING_VALUE&searchType=SOME_STRING_VALUE&groupBy=SOME_STRING_VALUE",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/search/v2/indices/stats/queries/summary');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'indexId' => 'SOME_ARRAY_VALUE',
              'dateFrom' => 'SOME_STRING_VALUE',
              'dateTo' => 'SOME_STRING_VALUE',
              'query' => 'SOME_STRING_VALUE',
              'searchType' => 'SOME_STRING_VALUE',
              'groupBy' => 'SOME_STRING_VALUE'
            ]);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/search/v2/indices/stats/queries/summary?indexId=SOME_ARRAY_VALUE&dateFrom=SOME_STRING_VALUE&dateTo=SOME_STRING_VALUE&query=SOME_STRING_VALUE&searchType=SOME_STRING_VALUE&groupBy=SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /search/v2/indices/{indexId}/visual:
    get:
      summary: Visual items search
      description: |
        Retrieves items that match an image. The results can be filtered and sorted.

        ---

        **API consumers:** <span title="Deprecated">AI API key (legacy)</span>, <a href="/docs/settings/tool/tracking_codes" target="_blank" rel="noopener" title="Pass your tracker key in the request header">Web SDK Tracker</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>

        **API key permission required:** `ITEMS_SEARCH_SEARCH_READ`
      operationId: SearchVisualGet
      tags:
        - Visual Search
      security:
        - TrackerKey: []
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/items-search-imageUrl"
        - $ref: "#/components/parameters/items-search-inPathIndexId"
        - $ref: "#/components/parameters/items-search-clientUUID"
        - $ref: "#/components/parameters/items-search-personalize"
        - $ref: "#/components/parameters/items-search-correlationId"
        - $ref: "#/components/parameters/items-search-searchId"
        - $ref: "#/components/parameters/items-search-sortByMetric"
        - $ref: "#/components/parameters/items-search-sortByGeoPoint"
        - $ref: "#/components/parameters/items-search-filterGeoPoints"
        - $ref: "#/components/parameters/items-search-filterAroundRadius"
        - $ref: "#/components/parameters/items-search-filterAnchor"
        - $ref: "#/components/parameters/items-search-filters"
        - $ref: "#/components/parameters/items-search-facets"
        - $ref: "#/components/parameters/items-search-facetsSize"
        - $ref: "#/components/parameters/items-search-maxValuesPerFacet"
        - $ref: "#/components/parameters/items-search-caseSensitiveFacetValues"
        - $ref: "#/components/parameters/items-search-displayAttributes"
        - $ref: "#/components/parameters/items-search-context"
        - $ref: "#/components/parameters/items-search-includeFacets"
        - $ref: "#/components/parameters/items-search-facetsOrderBy"
        - $ref: "#/components/parameters/items-search-paginationPage"
        - $ref: "#/components/parameters/items-search-paginationLimit"
        - $ref: "#/components/parameters/items-search-paginationSortBy"
        - $ref: "#/components/parameters/items-search-paginationOrdering"
        - $ref: "#/components/parameters/items-search-paginationIncludeMeta"
        - $ref: "#/components/parameters/items-search-ignoreQueryRules"
        - $ref: "#/components/parameters/items-search-excludeQueryRules"
        - $ref: "#/components/parameters/items-search-params"
      responses:
        "200":
          description: Search response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/items-search-VisualSearchResponse"
        "500":
          description: Service not available
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/items-search-Error"
      x-snr-doc-urls:
        - /api-reference/ai-search#tag/Visual-Search/operation/SearchVisualGet
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/search/v2/indices/%7BindexId%7D/visual?url=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&personalize=SOME_BOOLEAN_VALUE&correlationId=SOME_STRING_VALUE&searchId=SOME_STRING_VALUE&sortByMetric=SOME_STRING_VALUE&sortByGeoPoint=34.052235%2C-118.243685&filterGeoPoints=34.052235%2C-118.243685&filterGeoPoints=15.0%2C65.0&filterAroundRadius=5000&filterAnchor=0.2%2C0.8&filters=SOME_STRING_VALUE&facets=SOME_ARRAY_VALUE&facetsSize=SOME_INTEGER_VALUE&maxValuesPerFacet=SOME_INTEGER_VALUE&caseSensitiveFacetValues=SOME_BOOLEAN_VALUE&displayAttributes=title&displayAttributes=price&context=mobile&context=listing&includeFacets=SOME_STRING_VALUE&facetsOrderBy=SOME_STRING_VALUE&page=4&limit=10&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&ignoreQueryRules=SOME_BOOLEAN_VALUE&excludeQueryRules=2&excludeQueryRules=5&params=source%3Amobile' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("GET", "/search/v2/indices/%7BindexId%7D/visual?url=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&personalize=SOME_BOOLEAN_VALUE&correlationId=SOME_STRING_VALUE&searchId=SOME_STRING_VALUE&sortByMetric=SOME_STRING_VALUE&sortByGeoPoint=34.052235%2C-118.243685&filterGeoPoints=34.052235%2C-118.243685&filterGeoPoints=15.0%2C65.0&filterAroundRadius=5000&filterAnchor=0.2%2C0.8&filters=SOME_STRING_VALUE&facets=SOME_ARRAY_VALUE&facetsSize=SOME_INTEGER_VALUE&maxValuesPerFacet=SOME_INTEGER_VALUE&caseSensitiveFacetValues=SOME_BOOLEAN_VALUE&displayAttributes=title&displayAttributes=price&context=mobile&context=listing&includeFacets=SOME_STRING_VALUE&facetsOrderBy=SOME_STRING_VALUE&page=4&limit=10&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&ignoreQueryRules=SOME_BOOLEAN_VALUE&excludeQueryRules=2&excludeQueryRules=5&params=source%3Amobile", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("GET", "https://api.synerise.com/search/v2/indices/%7BindexId%7D/visual?url=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&personalize=SOME_BOOLEAN_VALUE&correlationId=SOME_STRING_VALUE&searchId=SOME_STRING_VALUE&sortByMetric=SOME_STRING_VALUE&sortByGeoPoint=34.052235%2C-118.243685&filterGeoPoints=34.052235%2C-118.243685&filterGeoPoints=15.0%2C65.0&filterAroundRadius=5000&filterAnchor=0.2%2C0.8&filters=SOME_STRING_VALUE&facets=SOME_ARRAY_VALUE&facetsSize=SOME_INTEGER_VALUE&maxValuesPerFacet=SOME_INTEGER_VALUE&caseSensitiveFacetValues=SOME_BOOLEAN_VALUE&displayAttributes=title&displayAttributes=price&context=mobile&context=listing&includeFacets=SOME_STRING_VALUE&facetsOrderBy=SOME_STRING_VALUE&page=4&limit=10&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&ignoreQueryRules=SOME_BOOLEAN_VALUE&excludeQueryRules=2&excludeQueryRules=5&params=source%3Amobile");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/search/v2/indices/%7BindexId%7D/visual?url=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&personalize=SOME_BOOLEAN_VALUE&correlationId=SOME_STRING_VALUE&searchId=SOME_STRING_VALUE&sortByMetric=SOME_STRING_VALUE&sortByGeoPoint=34.052235%2C-118.243685&filterGeoPoints=34.052235%2C-118.243685&filterGeoPoints=15.0%2C65.0&filterAroundRadius=5000&filterAnchor=0.2%2C0.8&filters=SOME_STRING_VALUE&facets=SOME_ARRAY_VALUE&facetsSize=SOME_INTEGER_VALUE&maxValuesPerFacet=SOME_INTEGER_VALUE&caseSensitiveFacetValues=SOME_BOOLEAN_VALUE&displayAttributes=title&displayAttributes=price&context=mobile&context=listing&includeFacets=SOME_STRING_VALUE&facetsOrderBy=SOME_STRING_VALUE&page=4&limit=10&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&ignoreQueryRules=SOME_BOOLEAN_VALUE&excludeQueryRules=2&excludeQueryRules=5&params=source%3Amobile",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/search/v2/indices/%7BindexId%7D/visual');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'url' => 'SOME_STRING_VALUE',
              'clientUUID' => 'SOME_STRING_VALUE',
              'personalize' => 'SOME_BOOLEAN_VALUE',
              'correlationId' => 'SOME_STRING_VALUE',
              'searchId' => 'SOME_STRING_VALUE',
              'sortByMetric' => 'SOME_STRING_VALUE',
              'sortByGeoPoint' => '34.052235,-118.243685',
              'filterGeoPoints' => [
                '34.052235,-118.243685',
                '15.0,65.0'
              ],
              'filterAroundRadius' => '5000',
              'filterAnchor' => '0.2,0.8',
              'filters' => 'SOME_STRING_VALUE',
              'facets' => 'SOME_ARRAY_VALUE',
              'facetsSize' => 'SOME_INTEGER_VALUE',
              'maxValuesPerFacet' => 'SOME_INTEGER_VALUE',
              'caseSensitiveFacetValues' => 'SOME_BOOLEAN_VALUE',
              'displayAttributes' => [
                'title',
                'price'
              ],
              'context' => [
                'mobile',
                'listing'
              ],
              'includeFacets' => 'SOME_STRING_VALUE',
              'facetsOrderBy' => 'SOME_STRING_VALUE',
              'page' => '4',
              'limit' => '10',
              'sortBy' => 'SOME_STRING_VALUE',
              'ordering' => 'SOME_STRING_VALUE',
              'includeMeta' => 'SOME_BOOLEAN_VALUE',
              'ignoreQueryRules' => 'SOME_BOOLEAN_VALUE',
              'excludeQueryRules' => [
                '2',
                '5'
              ],
              'params' => 'source:mobile'
            ]);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/search/v2/indices/%7BindexId%7D/visual?url=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&personalize=SOME_BOOLEAN_VALUE&correlationId=SOME_STRING_VALUE&searchId=SOME_STRING_VALUE&sortByMetric=SOME_STRING_VALUE&sortByGeoPoint=34.052235%2C-118.243685&filterGeoPoints=34.052235%2C-118.243685&filterGeoPoints=15.0%2C65.0&filterAroundRadius=5000&filterAnchor=0.2%2C0.8&filters=SOME_STRING_VALUE&facets=SOME_ARRAY_VALUE&facetsSize=SOME_INTEGER_VALUE&maxValuesPerFacet=SOME_INTEGER_VALUE&caseSensitiveFacetValues=SOME_BOOLEAN_VALUE&displayAttributes=title&displayAttributes=price&context=mobile&context=listing&includeFacets=SOME_STRING_VALUE&facetsOrderBy=SOME_STRING_VALUE&page=4&limit=10&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&ignoreQueryRules=SOME_BOOLEAN_VALUE&excludeQueryRules=2&excludeQueryRules=5&params=source%3Amobile")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    post:
      summary: Visual items search
      description: |
        Retrieves items that match an image. The results can be filtered and sorted.

        ---

        **API consumers:** <span title="Deprecated">AI API key (legacy)</span>, <a href="/docs/settings/tool/tracking_codes" target="_blank" rel="noopener" title="Pass your tracker key in the request header">Web SDK Tracker</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>

        **API key permission required:** `ITEMS_SEARCH_SEARCH_READ`
      operationId: SearchVisualPost
      tags:
        - Visual Search
      security:
        - TrackerKey: []
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/items-search-inPathIndexId"
      requestBody:
        description: Request for performing visual search
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/items-search-VisualSearchRequest"
          multipart/form-data:
            schema:
              type: object
              properties:
                image:
                  type: string
                  format: binary
                  description: Uploaded image to be used in the visual search
                params:
                  type: object
                  description: Parameters of the search
                  properties:
                    page:
                      $ref: "#/components/schemas/items-search-PaginationPage"
                    limit:
                      $ref: "#/components/schemas/items-search-PaginationLimit"
                    sortBy:
                      $ref: "#/components/schemas/items-search-PaginationSortBy"
                    ordering:
                      $ref: "#/components/schemas/items-search-PaginationOrdering"
                    includeMeta:
                      $ref: "#/components/schemas/items-search-PaginationIncludeMeta"
                    clientUUID:
                      $ref: "#/components/schemas/items-search-ClientUUID"
                    correlationId:
                      $ref: "#/components/schemas/items-search-CorrelationId"
                    searchId:
                      $ref: "#/components/schemas/items-search-SearchId"
                    sortByMetric:
                      $ref: "#/components/schemas/items-search-SortByMetric"
                    sortByGeoPoints:
                      $ref: "#/components/schemas/items-search-SortByGeoPoint"
                    filterGeoPoints:
                      $ref: "#/components/schemas/items-search-FilterGeoPoints"
                    filterAroundRadius:
                      $ref: "#/components/schemas/items-search-FilterAroundRadius"
                    filterAnchor:
                      $ref: "#/components/schemas/items-search-FilterAnchor"
                    filters:
                      $ref: "#/components/schemas/items-search-Filters"
                    facets:
                      $ref: "#/components/schemas/items-search-Facets"
                    facetsSize:
                      $ref: "#/components/schemas/items-search-FacetsSize"
                    maxValuesPerFacet:
                      $ref: "#/components/schemas/items-search-MaxValuesPerFacet"
                    caseSensitiveFacetValues:
                      $ref: "#/components/schemas/items-search-CaseSensitiveFacetValues"
                    includeFacets:
                      $ref: "#/components/schemas/items-search-IncludeFacets"
                    facetsOrderBy:
                      $ref: "#/components/schemas/items-search-FacetsOrdering"
                    context:
                      $ref: "#/components/schemas/items-search-Context"
                    displayAttributes:
                      $ref: "#/components/schemas/items-search-DisplayAttributes"
                    ignoreQueryRules:
                      $ref: "#/components/schemas/items-search-IgnoreQueryRules"
                    excludeQueryRules:
                      $ref: "#/components/schemas/items-search-ExcludeQueryRules"
                    params:
                      $ref: "#/components/schemas/items-search-Params"
      responses:
        "200":
          description: Search response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/items-search-VisualSearchResponse"
        "500":
          description: Service not available
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/items-search-Error"
      x-snr-doc-urls:
        - /api-reference/ai-search#tag/Visual-Search/operation/SearchVisualPost
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/search/v2/indices/%7BindexId%7D/visual \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"url":"string","page":0,"limit":10,"sortBy":"string","ordering":"desc","includeMeta":true,"clientUUID":"string","personalize":true,"correlationId":"string","searchId":"string","sortByMetric":"TransactionsPopularity","sortByGeoPoints":"34.052235,-118.243685","filterGeoPoints":["34.052235,-118.243685","15.0,65.0"],"filterAroundRadius":2000,"filterAnchor":"0.2,0.8","filters":"string","facets":["string"],"customFilteredFacets":{"brand":"price > 100","price":"brand == foo"},"facetsSize":2000,"maxValuesPerFacet":50,"caseSensitiveFacetValues":false,"includeFacets":"all","facetsOrderBy":"coverage","context":["mobile","listing"],"displayAttributes":["title","price"],"ignoreQueryRules":false,"excludeQueryRules":[2,5],"params":{"source":"mobile"}}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"url\":\"string\",\"page\":0,\"limit\":10,\"sortBy\":\"string\",\"ordering\":\"desc\",\"includeMeta\":true,\"clientUUID\":\"string\",\"personalize\":true,\"correlationId\":\"string\",\"searchId\":\"string\",\"sortByMetric\":\"TransactionsPopularity\",\"sortByGeoPoints\":\"34.052235,-118.243685\",\"filterGeoPoints\":[\"34.052235,-118.243685\",\"15.0,65.0\"],\"filterAroundRadius\":2000,\"filterAnchor\":\"0.2,0.8\",\"filters\":\"string\",\"facets\":[\"string\"],\"customFilteredFacets\":{\"brand\":\"price > 100\",\"price\":\"brand == foo\"},\"facetsSize\":2000,\"maxValuesPerFacet\":50,\"caseSensitiveFacetValues\":false,\"includeFacets\":\"all\",\"facetsOrderBy\":\"coverage\",\"context\":[\"mobile\",\"listing\"],\"displayAttributes\":[\"title\",\"price\"],\"ignoreQueryRules\":false,\"excludeQueryRules\":[2,5],\"params\":{\"source\":\"mobile\"}}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/search/v2/indices/%7BindexId%7D/visual", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "url": "string",
              "page": 0,
              "limit": 10,
              "sortBy": "string",
              "ordering": "desc",
              "includeMeta": true,
              "clientUUID": "string",
              "personalize": true,
              "correlationId": "string",
              "searchId": "string",
              "sortByMetric": "TransactionsPopularity",
              "sortByGeoPoints": "34.052235,-118.243685",
              "filterGeoPoints": [
                "34.052235,-118.243685",
                "15.0,65.0"
              ],
              "filterAroundRadius": 2000,
              "filterAnchor": "0.2,0.8",
              "filters": "string",
              "facets": [
                "string"
              ],
              "customFilteredFacets": {
                "brand": "price > 100",
                "price": "brand == foo"
              },
              "facetsSize": 2000,
              "maxValuesPerFacet": 50,
              "caseSensitiveFacetValues": false,
              "includeFacets": "all",
              "facetsOrderBy": "coverage",
              "context": [
                "mobile",
                "listing"
              ],
              "displayAttributes": [
                "title",
                "price"
              ],
              "ignoreQueryRules": false,
              "excludeQueryRules": [
                2,
                5
              ],
              "params": {
                "source": "mobile"
              }
            });

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("POST", "https://api.synerise.com/search/v2/indices/%7BindexId%7D/visual");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/search/v2/indices/%7BindexId%7D/visual",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify({
              url: 'string',
              page: 0,
              limit: 10,
              sortBy: 'string',
              ordering: 'desc',
              includeMeta: true,
              clientUUID: 'string',
              personalize: true,
              correlationId: 'string',
              searchId: 'string',
              sortByMetric: 'TransactionsPopularity',
              sortByGeoPoints: '34.052235,-118.243685',
              filterGeoPoints: ['34.052235,-118.243685', '15.0,65.0'],
              filterAroundRadius: 2000,
              filterAnchor: '0.2,0.8',
              filters: 'string',
              facets: ['string'],
              customFilteredFacets: {brand: 'price > 100', price: 'brand == foo'},
              facetsSize: 2000,
              maxValuesPerFacet: 50,
              caseSensitiveFacetValues: false,
              includeFacets: 'all',
              facetsOrderBy: 'coverage',
              context: ['mobile', 'listing'],
              displayAttributes: ['title', 'price'],
              ignoreQueryRules: false,
              excludeQueryRules: [2, 5],
              params: {source: 'mobile'}
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/search/v2/indices/%7BindexId%7D/visual');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"url":"string","page":0,"limit":10,"sortBy":"string","ordering":"desc","includeMeta":true,"clientUUID":"string","personalize":true,"correlationId":"string","searchId":"string","sortByMetric":"TransactionsPopularity","sortByGeoPoints":"34.052235,-118.243685","filterGeoPoints":["34.052235,-118.243685","15.0,65.0"],"filterAroundRadius":2000,"filterAnchor":"0.2,0.8","filters":"string","facets":["string"],"customFilteredFacets":{"brand":"price > 100","price":"brand == foo"},"facetsSize":2000,"maxValuesPerFacet":50,"caseSensitiveFacetValues":false,"includeFacets":"all","facetsOrderBy":"coverage","context":["mobile","listing"],"displayAttributes":["title","price"],"ignoreQueryRules":false,"excludeQueryRules":[2,5],"params":{"source":"mobile"}}');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/search/v2/indices/%7BindexId%7D/visual")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"url\":\"string\",\"page\":0,\"limit\":10,\"sortBy\":\"string\",\"ordering\":\"desc\",\"includeMeta\":true,\"clientUUID\":\"string\",\"personalize\":true,\"correlationId\":\"string\",\"searchId\":\"string\",\"sortByMetric\":\"TransactionsPopularity\",\"sortByGeoPoints\":\"34.052235,-118.243685\",\"filterGeoPoints\":[\"34.052235,-118.243685\",\"15.0,65.0\"],\"filterAroundRadius\":2000,\"filterAnchor\":\"0.2,0.8\",\"filters\":\"string\",\"facets\":[\"string\"],\"customFilteredFacets\":{\"brand\":\"price > 100\",\"price\":\"brand == foo\"},\"facetsSize\":2000,\"maxValuesPerFacet\":50,\"caseSensitiveFacetValues\":false,\"includeFacets\":\"all\",\"facetsOrderBy\":\"coverage\",\"context\":[\"mobile\",\"listing\"],\"displayAttributes\":[\"title\",\"price\"],\"ignoreQueryRules\":false,\"excludeQueryRules\":[2,5],\"params\":{\"source\":\"mobile\"}}")
              .asString();
        - lang: shell_curl
          label: Shell + Curl
          source: |-
            curl --request POST \
              --url https://api.synerise.com/search/v2/indices/%7BindexId%7D/visual \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: multipart/form-data' \
              --form image=string \
              --form 'params={"page":0,"limit":10,"sortBy":"string","ordering":"desc","includeMeta":true,"clientUUID":"string","correlationId":"string","searchId":"string","sortByMetric":"TransactionsPopularity","sortByGeoPoints":"34.052235,-118.243685","filterGeoPoints":["34.052235,-118.243685","15.0,65.0"],"filterAroundRadius":2000,"filterAnchor":"0.2,0.8","filters":"string","facets":["string"],"facetsSize":2000,"maxValuesPerFacet":50,"caseSensitiveFacetValues":false,"includeFacets":"all","facetsOrderBy":"coverage","context":["mobile","listing"],"displayAttributes":["title","price"],"ignoreQueryRules":false,"excludeQueryRules":[2,5],"params":{"source":"mobile"}}'
        - lang: python_python3
          label: Python + Python3
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"image\"\r\n\r\nstring\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"params\"\r\n\r\n{\"page\":0,\"limit\":10,\"sortBy\":\"string\",\"ordering\":\"desc\",\"includeMeta\":true,\"clientUUID\":\"string\",\"correlationId\":\"string\",\"searchId\":\"string\",\"sortByMetric\":\"TransactionsPopularity\",\"sortByGeoPoints\":\"34.052235,-118.243685\",\"filterGeoPoints\":[\"34.052235,-118.243685\",\"15.0,65.0\"],\"filterAroundRadius\":2000,\"filterAnchor\":\"0.2,0.8\",\"filters\":\"string\",\"facets\":[\"string\"],\"facetsSize\":2000,\"maxValuesPerFacet\":50,\"caseSensitiveFacetValues\":false,\"includeFacets\":\"all\",\"facetsOrderBy\":\"coverage\",\"context\":[\"mobile\",\"listing\"],\"displayAttributes\":[\"title\",\"price\"],\"ignoreQueryRules\":false,\"excludeQueryRules\":[2,5],\"params\":{\"source\":\"mobile\"}}\r\n-----011000010111000001101001--\r\n"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "multipart/form-data"
                }

            conn.request("POST", "/search/v2/indices/%7BindexId%7D/visual", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: javascript_xhr
          label: Javascript + Xhr
          source: |-
            const data = new FormData();
            data.append("image", "string");
            data.append("params", "{\"page\":0,\"limit\":10,\"sortBy\":\"string\",\"ordering\":\"desc\",\"includeMeta\":true,\"clientUUID\":\"string\",\"correlationId\":\"string\",\"searchId\":\"string\",\"sortByMetric\":\"TransactionsPopularity\",\"sortByGeoPoints\":\"34.052235,-118.243685\",\"filterGeoPoints\":[\"34.052235,-118.243685\",\"15.0,65.0\"],\"filterAroundRadius\":2000,\"filterAnchor\":\"0.2,0.8\",\"filters\":\"string\",\"facets\":[\"string\"],\"facetsSize\":2000,\"maxValuesPerFacet\":50,\"caseSensitiveFacetValues\":false,\"includeFacets\":\"all\",\"facetsOrderBy\":\"coverage\",\"context\":[\"mobile\",\"listing\"],\"displayAttributes\":[\"title\",\"price\"],\"ignoreQueryRules\":false,\"excludeQueryRules\":[2,5],\"params\":{\"source\":\"mobile\"}}");

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("POST", "https://api.synerise.com/search/v2/indices/%7BindexId%7D/visual");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: node_native
          label: Node + Native
          source: |-
            const http = require("https");

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/search/v2/indices/%7BindexId%7D/visual",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"image\"\r\n\r\nstring\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"params\"\r\n\r\n{\"page\":0,\"limit\":10,\"sortBy\":\"string\",\"ordering\":\"desc\",\"includeMeta\":true,\"clientUUID\":\"string\",\"correlationId\":\"string\",\"searchId\":\"string\",\"sortByMetric\":\"TransactionsPopularity\",\"sortByGeoPoints\":\"34.052235,-118.243685\",\"filterGeoPoints\":[\"34.052235,-118.243685\",\"15.0,65.0\"],\"filterAroundRadius\":2000,\"filterAnchor\":\"0.2,0.8\",\"filters\":\"string\",\"facets\":[\"string\"],\"facetsSize\":2000,\"maxValuesPerFacet\":50,\"caseSensitiveFacetValues\":false,\"includeFacets\":\"all\",\"facetsOrderBy\":\"coverage\",\"context\":[\"mobile\",\"listing\"],\"displayAttributes\":[\"title\",\"price\"],\"ignoreQueryRules\":false,\"excludeQueryRules\":[2,5],\"params\":{\"source\":\"mobile\"}}\r\n-----011000010111000001101001--\r\n");
            req.end();
        - lang: php_http1
          label: Php + Http1
          source: "<?php


            $request = new HttpRequest();

            $request->setUrl('https://api.synerise.com/search/v2/indices/%7BindexId%7D/visual');

            $request->setMethod(HTTP_METH_POST);


            $request->setHeaders([

            \  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',

            \  'content-type' => 'multipart/form-data'

            ]);


            $request->setBody('-----011000010111000001101001\r

            Content-Disposition: form-data; name=\"image\"\r

            \r

            string\r

            -----011000010111000001101001\r

            Content-Disposition: form-data; name=\"params\"\r

            \r

            {\"page\":0,\"limit\":10,\"sortBy\":\"string\",\"ordering\":\"desc\",\"includeMeta\":true,\"clientUUID\":\"string\",\"correlationId\":\"string\",\"searchId\":\"string\",\"sortByMetric\":\"TransactionsPopularity\",\"sortByGeoPoints\":\"34.052235,-118.243685\",\"filterGeoPoints\":[\"34.052235,-118.243685\",\"15.0,65.0\"],\"filterAroundRadius\":2000,\"filterAnchor\":\"0.2,0.8\",\"filters\":\"string\",\"facets\":[\"string\"],\"facetsSize\":2000,\"maxValuesPerFacet\":50,\"caseSensitiveFacetValues\":false,\"includeFacets\":\"all\",\"facetsOrderBy\":\"coverage\",\"context\":[\"mobile\",\"listing\"],\"displayAttributes\":[\"title\",\"price\"],\"ignoreQueryRules\":false,\"excludeQueryRules\":[2,5],\"params\":{\"source\":\"mobile\"}}\r

            -----011000010111000001101001--\r

            ');


            try {

            \  $response = $request->send();


            \  echo $response->getBody();

            } catch (HttpException $ex) {

            \  echo $ex;

            }"
        - lang: java_unirest
          label: Java + Unirest
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/search/v2/indices/%7BindexId%7D/visual")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"image\"\r\n\r\nstring\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"params\"\r\n\r\n{\"page\":0,\"limit\":10,\"sortBy\":\"string\",\"ordering\":\"desc\",\"includeMeta\":true,\"clientUUID\":\"string\",\"correlationId\":\"string\",\"searchId\":\"string\",\"sortByMetric\":\"TransactionsPopularity\",\"sortByGeoPoints\":\"34.052235,-118.243685\",\"filterGeoPoints\":[\"34.052235,-118.243685\",\"15.0,65.0\"],\"filterAroundRadius\":2000,\"filterAnchor\":\"0.2,0.8\",\"filters\":\"string\",\"facets\":[\"string\"],\"facetsSize\":2000,\"maxValuesPerFacet\":50,\"caseSensitiveFacetValues\":false,\"includeFacets\":\"all\",\"facetsOrderBy\":\"coverage\",\"context\":[\"mobile\",\"listing\"],\"displayAttributes\":[\"title\",\"price\"],\"ignoreQueryRules\":false,\"excludeQueryRules\":[2,5],\"params\":{\"source\":\"mobile\"}}\r\n-----011000010111000001101001--\r\n")
              .asString();
  /search/v2/indices/{indexId}/visual/explain:
    get:
      summary: Explained visual items search
      description: |
        Retrieves items that match an image. The results can be filtered and sorted. The response contains an explanation of the factors that influenced the result.

        ---

        **API consumers:** <span title="Deprecated">AI API key (legacy)</span>, <a href="/docs/settings/tool/tracking_codes" target="_blank" rel="noopener" title="Pass your tracker key in the request header">Web SDK Tracker</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>

        **API key permission required:** `ITEMS_SEARCH_SEARCH_READ`
      operationId: SearchVisualGetWithExplanation
      tags:
        - Visual Search
      security:
        - TrackerKey: []
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/items-search-imageUrl"
        - $ref: "#/components/parameters/items-search-inPathIndexId"
        - $ref: "#/components/parameters/items-search-clientUUID"
        - $ref: "#/components/parameters/items-search-personalize"
        - $ref: "#/components/parameters/items-search-correlationId"
        - $ref: "#/components/parameters/items-search-searchId"
        - $ref: "#/components/parameters/items-search-sortByMetric"
        - $ref: "#/components/parameters/items-search-sortByGeoPoint"
        - $ref: "#/components/parameters/items-search-filterGeoPoints"
        - $ref: "#/components/parameters/items-search-filterAroundRadius"
        - $ref: "#/components/parameters/items-search-filterAnchor"
        - $ref: "#/components/parameters/items-search-filters"
        - $ref: "#/components/parameters/items-search-facets"
        - $ref: "#/components/parameters/items-search-facetsSize"
        - $ref: "#/components/parameters/items-search-maxValuesPerFacet"
        - $ref: "#/components/parameters/items-search-caseSensitiveFacetValues"
        - $ref: "#/components/parameters/items-search-displayAttributes"
        - $ref: "#/components/parameters/items-search-context"
        - $ref: "#/components/parameters/items-search-includeFacets"
        - $ref: "#/components/parameters/items-search-facetsOrderBy"
        - $ref: "#/components/parameters/items-search-paginationPage"
        - $ref: "#/components/parameters/items-search-paginationLimit"
        - $ref: "#/components/parameters/items-search-paginationSortBy"
        - $ref: "#/components/parameters/items-search-paginationOrdering"
        - $ref: "#/components/parameters/items-search-paginationIncludeMeta"
        - $ref: "#/components/parameters/items-search-ignoreQueryRules"
        - $ref: "#/components/parameters/items-search-excludeQueryRules"
        - $ref: "#/components/parameters/items-search-crossWorkspaceModeEnabled"
        - $ref: "#/components/parameters/items-search-params"
      responses:
        "200":
          description: Search response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/items-search-VisualSearchResponseWithExplanation"
        "500":
          description: Service not available
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/items-search-Error"
      x-snr-doc-urls:
        - /api-reference/ai-search#tag/Visual-Search/operation/SearchVisualGetWithExplanation
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/search/v2/indices/%7BindexId%7D/visual/explain?url=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&personalize=SOME_BOOLEAN_VALUE&correlationId=SOME_STRING_VALUE&searchId=SOME_STRING_VALUE&sortByMetric=SOME_STRING_VALUE&sortByGeoPoint=34.052235%2C-118.243685&filterGeoPoints=34.052235%2C-118.243685&filterGeoPoints=15.0%2C65.0&filterAroundRadius=5000&filterAnchor=0.2%2C0.8&filters=SOME_STRING_VALUE&facets=SOME_ARRAY_VALUE&facetsSize=SOME_INTEGER_VALUE&maxValuesPerFacet=SOME_INTEGER_VALUE&caseSensitiveFacetValues=SOME_BOOLEAN_VALUE&displayAttributes=title&displayAttributes=price&context=mobile&context=listing&includeFacets=SOME_STRING_VALUE&facetsOrderBy=SOME_STRING_VALUE&page=4&limit=10&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&ignoreQueryRules=SOME_BOOLEAN_VALUE&excludeQueryRules=2&excludeQueryRules=5&crossWorkspaceModeEnabled=SOME_BOOLEAN_VALUE&params=source%3Amobile' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("GET", "/search/v2/indices/%7BindexId%7D/visual/explain?url=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&personalize=SOME_BOOLEAN_VALUE&correlationId=SOME_STRING_VALUE&searchId=SOME_STRING_VALUE&sortByMetric=SOME_STRING_VALUE&sortByGeoPoint=34.052235%2C-118.243685&filterGeoPoints=34.052235%2C-118.243685&filterGeoPoints=15.0%2C65.0&filterAroundRadius=5000&filterAnchor=0.2%2C0.8&filters=SOME_STRING_VALUE&facets=SOME_ARRAY_VALUE&facetsSize=SOME_INTEGER_VALUE&maxValuesPerFacet=SOME_INTEGER_VALUE&caseSensitiveFacetValues=SOME_BOOLEAN_VALUE&displayAttributes=title&displayAttributes=price&context=mobile&context=listing&includeFacets=SOME_STRING_VALUE&facetsOrderBy=SOME_STRING_VALUE&page=4&limit=10&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&ignoreQueryRules=SOME_BOOLEAN_VALUE&excludeQueryRules=2&excludeQueryRules=5&crossWorkspaceModeEnabled=SOME_BOOLEAN_VALUE&params=source%3Amobile", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("GET", "https://api.synerise.com/search/v2/indices/%7BindexId%7D/visual/explain?url=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&personalize=SOME_BOOLEAN_VALUE&correlationId=SOME_STRING_VALUE&searchId=SOME_STRING_VALUE&sortByMetric=SOME_STRING_VALUE&sortByGeoPoint=34.052235%2C-118.243685&filterGeoPoints=34.052235%2C-118.243685&filterGeoPoints=15.0%2C65.0&filterAroundRadius=5000&filterAnchor=0.2%2C0.8&filters=SOME_STRING_VALUE&facets=SOME_ARRAY_VALUE&facetsSize=SOME_INTEGER_VALUE&maxValuesPerFacet=SOME_INTEGER_VALUE&caseSensitiveFacetValues=SOME_BOOLEAN_VALUE&displayAttributes=title&displayAttributes=price&context=mobile&context=listing&includeFacets=SOME_STRING_VALUE&facetsOrderBy=SOME_STRING_VALUE&page=4&limit=10&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&ignoreQueryRules=SOME_BOOLEAN_VALUE&excludeQueryRules=2&excludeQueryRules=5&crossWorkspaceModeEnabled=SOME_BOOLEAN_VALUE&params=source%3Amobile");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/search/v2/indices/%7BindexId%7D/visual/explain?url=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&personalize=SOME_BOOLEAN_VALUE&correlationId=SOME_STRING_VALUE&searchId=SOME_STRING_VALUE&sortByMetric=SOME_STRING_VALUE&sortByGeoPoint=34.052235%2C-118.243685&filterGeoPoints=34.052235%2C-118.243685&filterGeoPoints=15.0%2C65.0&filterAroundRadius=5000&filterAnchor=0.2%2C0.8&filters=SOME_STRING_VALUE&facets=SOME_ARRAY_VALUE&facetsSize=SOME_INTEGER_VALUE&maxValuesPerFacet=SOME_INTEGER_VALUE&caseSensitiveFacetValues=SOME_BOOLEAN_VALUE&displayAttributes=title&displayAttributes=price&context=mobile&context=listing&includeFacets=SOME_STRING_VALUE&facetsOrderBy=SOME_STRING_VALUE&page=4&limit=10&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&ignoreQueryRules=SOME_BOOLEAN_VALUE&excludeQueryRules=2&excludeQueryRules=5&crossWorkspaceModeEnabled=SOME_BOOLEAN_VALUE&params=source%3Amobile",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/search/v2/indices/%7BindexId%7D/visual/explain');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'url' => 'SOME_STRING_VALUE',
              'clientUUID' => 'SOME_STRING_VALUE',
              'personalize' => 'SOME_BOOLEAN_VALUE',
              'correlationId' => 'SOME_STRING_VALUE',
              'searchId' => 'SOME_STRING_VALUE',
              'sortByMetric' => 'SOME_STRING_VALUE',
              'sortByGeoPoint' => '34.052235,-118.243685',
              'filterGeoPoints' => [
                '34.052235,-118.243685',
                '15.0,65.0'
              ],
              'filterAroundRadius' => '5000',
              'filterAnchor' => '0.2,0.8',
              'filters' => 'SOME_STRING_VALUE',
              'facets' => 'SOME_ARRAY_VALUE',
              'facetsSize' => 'SOME_INTEGER_VALUE',
              'maxValuesPerFacet' => 'SOME_INTEGER_VALUE',
              'caseSensitiveFacetValues' => 'SOME_BOOLEAN_VALUE',
              'displayAttributes' => [
                'title',
                'price'
              ],
              'context' => [
                'mobile',
                'listing'
              ],
              'includeFacets' => 'SOME_STRING_VALUE',
              'facetsOrderBy' => 'SOME_STRING_VALUE',
              'page' => '4',
              'limit' => '10',
              'sortBy' => 'SOME_STRING_VALUE',
              'ordering' => 'SOME_STRING_VALUE',
              'includeMeta' => 'SOME_BOOLEAN_VALUE',
              'ignoreQueryRules' => 'SOME_BOOLEAN_VALUE',
              'excludeQueryRules' => [
                '2',
                '5'
              ],
              'crossWorkspaceModeEnabled' => 'SOME_BOOLEAN_VALUE',
              'params' => 'source:mobile'
            ]);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/search/v2/indices/%7BindexId%7D/visual/explain?url=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&personalize=SOME_BOOLEAN_VALUE&correlationId=SOME_STRING_VALUE&searchId=SOME_STRING_VALUE&sortByMetric=SOME_STRING_VALUE&sortByGeoPoint=34.052235%2C-118.243685&filterGeoPoints=34.052235%2C-118.243685&filterGeoPoints=15.0%2C65.0&filterAroundRadius=5000&filterAnchor=0.2%2C0.8&filters=SOME_STRING_VALUE&facets=SOME_ARRAY_VALUE&facetsSize=SOME_INTEGER_VALUE&maxValuesPerFacet=SOME_INTEGER_VALUE&caseSensitiveFacetValues=SOME_BOOLEAN_VALUE&displayAttributes=title&displayAttributes=price&context=mobile&context=listing&includeFacets=SOME_STRING_VALUE&facetsOrderBy=SOME_STRING_VALUE&page=4&limit=10&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&ignoreQueryRules=SOME_BOOLEAN_VALUE&excludeQueryRules=2&excludeQueryRules=5&crossWorkspaceModeEnabled=SOME_BOOLEAN_VALUE&params=source%3Amobile")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    post:
      summary: Explained visual items search
      description: |
        Retrieves items that match an image. The results can be filtered and sorted. The response contains an explanation of the factors that influenced the result.

        ---

        **API consumers:** <span title="Deprecated">AI API key (legacy)</span>, <a href="/docs/settings/tool/tracking_codes" target="_blank" rel="noopener" title="Pass your tracker key in the request header">Web SDK Tracker</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>

        **API key permission required:** `ITEMS_SEARCH_SEARCH_READ`
      operationId: SearchVisualPostWithExplanation
      tags:
        - Visual Search
      security:
        - TrackerKey: []
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/items-search-inPathIndexId"
      requestBody:
        description: Request for performing visual search with explanation
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/items-search-VisualSearchRequest"
                - type: object
                  properties:
                    crossWorkspaceMode:
                      $ref: "#/components/schemas/items-search-CrossWorkspaceMode"
      responses:
        "200":
          description: Search response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/items-search-VisualSearchResponseWithExplanation"
        "500":
          description: Service not available
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/items-search-Error"
      x-snr-doc-urls:
        - /api-reference/ai-search#tag/Visual-Search/operation/SearchVisualPostWithExplanation
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/search/v2/indices/%7BindexId%7D/visual/explain \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"url":"string","page":0,"limit":10,"sortBy":"string","ordering":"desc","includeMeta":true,"clientUUID":"string","personalize":true,"correlationId":"string","searchId":"string","sortByMetric":"TransactionsPopularity","sortByGeoPoints":"34.052235,-118.243685","filterGeoPoints":["34.052235,-118.243685","15.0,65.0"],"filterAroundRadius":2000,"filterAnchor":"0.2,0.8","filters":"string","facets":["string"],"customFilteredFacets":{"brand":"price > 100","price":"brand == foo"},"facetsSize":2000,"maxValuesPerFacet":50,"caseSensitiveFacetValues":false,"includeFacets":"all","facetsOrderBy":"coverage","context":["mobile","listing"],"displayAttributes":["title","price"],"ignoreQueryRules":false,"excludeQueryRules":[2,5],"params":{"source":"mobile"},"crossWorkspaceMode":{"enabled":true}}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"url\":\"string\",\"page\":0,\"limit\":10,\"sortBy\":\"string\",\"ordering\":\"desc\",\"includeMeta\":true,\"clientUUID\":\"string\",\"personalize\":true,\"correlationId\":\"string\",\"searchId\":\"string\",\"sortByMetric\":\"TransactionsPopularity\",\"sortByGeoPoints\":\"34.052235,-118.243685\",\"filterGeoPoints\":[\"34.052235,-118.243685\",\"15.0,65.0\"],\"filterAroundRadius\":2000,\"filterAnchor\":\"0.2,0.8\",\"filters\":\"string\",\"facets\":[\"string\"],\"customFilteredFacets\":{\"brand\":\"price > 100\",\"price\":\"brand == foo\"},\"facetsSize\":2000,\"maxValuesPerFacet\":50,\"caseSensitiveFacetValues\":false,\"includeFacets\":\"all\",\"facetsOrderBy\":\"coverage\",\"context\":[\"mobile\",\"listing\"],\"displayAttributes\":[\"title\",\"price\"],\"ignoreQueryRules\":false,\"excludeQueryRules\":[2,5],\"params\":{\"source\":\"mobile\"},\"crossWorkspaceMode\":{\"enabled\":true}}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/search/v2/indices/%7BindexId%7D/visual/explain", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "url": "string",
              "page": 0,
              "limit": 10,
              "sortBy": "string",
              "ordering": "desc",
              "includeMeta": true,
              "clientUUID": "string",
              "personalize": true,
              "correlationId": "string",
              "searchId": "string",
              "sortByMetric": "TransactionsPopularity",
              "sortByGeoPoints": "34.052235,-118.243685",
              "filterGeoPoints": [
                "34.052235,-118.243685",
                "15.0,65.0"
              ],
              "filterAroundRadius": 2000,
              "filterAnchor": "0.2,0.8",
              "filters": "string",
              "facets": [
                "string"
              ],
              "customFilteredFacets": {
                "brand": "price > 100",
                "price": "brand == foo"
              },
              "facetsSize": 2000,
              "maxValuesPerFacet": 50,
              "caseSensitiveFacetValues": false,
              "includeFacets": "all",
              "facetsOrderBy": "coverage",
              "context": [
                "mobile",
                "listing"
              ],
              "displayAttributes": [
                "title",
                "price"
              ],
              "ignoreQueryRules": false,
              "excludeQueryRules": [
                2,
                5
              ],
              "params": {
                "source": "mobile"
              },
              "crossWorkspaceMode": {
                "enabled": true
              }
            });

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("POST", "https://api.synerise.com/search/v2/indices/%7BindexId%7D/visual/explain");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/search/v2/indices/%7BindexId%7D/visual/explain",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify({
              url: 'string',
              page: 0,
              limit: 10,
              sortBy: 'string',
              ordering: 'desc',
              includeMeta: true,
              clientUUID: 'string',
              personalize: true,
              correlationId: 'string',
              searchId: 'string',
              sortByMetric: 'TransactionsPopularity',
              sortByGeoPoints: '34.052235,-118.243685',
              filterGeoPoints: ['34.052235,-118.243685', '15.0,65.0'],
              filterAroundRadius: 2000,
              filterAnchor: '0.2,0.8',
              filters: 'string',
              facets: ['string'],
              customFilteredFacets: {brand: 'price > 100', price: 'brand == foo'},
              facetsSize: 2000,
              maxValuesPerFacet: 50,
              caseSensitiveFacetValues: false,
              includeFacets: 'all',
              facetsOrderBy: 'coverage',
              context: ['mobile', 'listing'],
              displayAttributes: ['title', 'price'],
              ignoreQueryRules: false,
              excludeQueryRules: [2, 5],
              params: {source: 'mobile'},
              crossWorkspaceMode: {enabled: true}
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/search/v2/indices/%7BindexId%7D/visual/explain');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"url":"string","page":0,"limit":10,"sortBy":"string","ordering":"desc","includeMeta":true,"clientUUID":"string","personalize":true,"correlationId":"string","searchId":"string","sortByMetric":"TransactionsPopularity","sortByGeoPoints":"34.052235,-118.243685","filterGeoPoints":["34.052235,-118.243685","15.0,65.0"],"filterAroundRadius":2000,"filterAnchor":"0.2,0.8","filters":"string","facets":["string"],"customFilteredFacets":{"brand":"price > 100","price":"brand == foo"},"facetsSize":2000,"maxValuesPerFacet":50,"caseSensitiveFacetValues":false,"includeFacets":"all","facetsOrderBy":"coverage","context":["mobile","listing"],"displayAttributes":["title","price"],"ignoreQueryRules":false,"excludeQueryRules":[2,5],"params":{"source":"mobile"},"crossWorkspaceMode":{"enabled":true}}');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/search/v2/indices/%7BindexId%7D/visual/explain")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"url\":\"string\",\"page\":0,\"limit\":10,\"sortBy\":\"string\",\"ordering\":\"desc\",\"includeMeta\":true,\"clientUUID\":\"string\",\"personalize\":true,\"correlationId\":\"string\",\"searchId\":\"string\",\"sortByMetric\":\"TransactionsPopularity\",\"sortByGeoPoints\":\"34.052235,-118.243685\",\"filterGeoPoints\":[\"34.052235,-118.243685\",\"15.0,65.0\"],\"filterAroundRadius\":2000,\"filterAnchor\":\"0.2,0.8\",\"filters\":\"string\",\"facets\":[\"string\"],\"customFilteredFacets\":{\"brand\":\"price > 100\",\"price\":\"brand == foo\"},\"facetsSize\":2000,\"maxValuesPerFacet\":50,\"caseSensitiveFacetValues\":false,\"includeFacets\":\"all\",\"facetsOrderBy\":\"coverage\",\"context\":[\"mobile\",\"listing\"],\"displayAttributes\":[\"title\",\"price\"],\"ignoreQueryRules\":false,\"excludeQueryRules\":[2,5],\"params\":{\"source\":\"mobile\"},\"crossWorkspaceMode\":{\"enabled\":true}}")
              .asString();
  /search/v2/indices/{indexId}/query:
    get:
      summary: Full-text items search
      description: |
        Retrieves items that match a full-text query from a search index or a suggestion index. The results can be filtered and sorted.

        ---

        **API consumers:** <span title="Deprecated">AI API key (legacy)</span>, <a href="/docs/settings/tool/tracking_codes" target="_blank" rel="noopener" title="Pass your tracker key in the request header">Web SDK Tracker</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>

        **API key permission required:** `ITEMS_SEARCH_SEARCH_READ`
      operationId: SearchFullTextGet
      tags:
        - Search
      security:
        - TrackerKey: []
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/items-search-searchQuery"
        - $ref: "#/components/parameters/items-search-inPathIndexId"
        - $ref: "#/components/parameters/items-search-clientUUID"
        - $ref: "#/components/parameters/items-search-personalize"
        - $ref: "#/components/parameters/items-search-correlationId"
        - $ref: "#/components/parameters/items-search-searchId"
        - $ref: "#/components/parameters/items-search-sortByMetric"
        - $ref: "#/components/parameters/items-search-sortByGeoPoint"
        - $ref: "#/components/parameters/items-search-filterGeoPoints"
        - $ref: "#/components/parameters/items-search-filterAroundRadius"
        - $ref: "#/components/parameters/items-search-filters"
        - $ref: "#/components/parameters/items-search-facets"
        - $ref: "#/components/parameters/items-search-facetsSize"
        - $ref: "#/components/parameters/items-search-maxValuesPerFacet"
        - $ref: "#/components/parameters/items-search-caseSensitiveFacetValues"
        - $ref: "#/components/parameters/items-search-displayAttributes"
        - $ref: "#/components/parameters/items-search-context"
        - $ref: "#/components/parameters/items-search-includeFacets"
        - $ref: "#/components/parameters/items-search-facetsOrderBy"
        - $ref: "#/components/parameters/items-search-paginationPage"
        - $ref: "#/components/parameters/items-search-paginationLimit"
        - $ref: "#/components/parameters/items-search-paginationSortBy"
        - $ref: "#/components/parameters/items-search-paginationOrdering"
        - $ref: "#/components/parameters/items-search-paginationIncludeMeta"
        - $ref: "#/components/parameters/items-search-distinctFilter"
        - $ref: "#/components/parameters/items-search-ignoreQueryRules"
        - $ref: "#/components/parameters/items-search-excludeQueryRules"
        - $ref: "#/components/parameters/items-search-disableQueryClassification"
        - $ref: "#/components/parameters/items-search-disableDynamicReranker"
        - $ref: "#/components/parameters/items-search-params"
      responses:
        "200":
          $ref: "#/components/responses/items-search-FullTextSearchResponse200"
        "500":
          description: Service not available
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/items-search-Error"
      x-snr-doc-urls:
        - /api-reference/ai-search#tag/Search/operation/SearchFullTextGet
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/search/v2/indices/%7BindexId%7D/query?query=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&personalize=SOME_BOOLEAN_VALUE&correlationId=SOME_STRING_VALUE&searchId=SOME_STRING_VALUE&sortByMetric=SOME_STRING_VALUE&sortByGeoPoint=34.052235%2C-118.243685&filterGeoPoints=34.052235%2C-118.243685&filterGeoPoints=15.0%2C65.0&filterAroundRadius=5000&filters=SOME_STRING_VALUE&facets=SOME_ARRAY_VALUE&facetsSize=SOME_INTEGER_VALUE&maxValuesPerFacet=SOME_INTEGER_VALUE&caseSensitiveFacetValues=SOME_BOOLEAN_VALUE&displayAttributes=title&displayAttributes=price&context=mobile&context=listing&includeFacets=SOME_STRING_VALUE&facetsOrderBy=SOME_STRING_VALUE&page=4&limit=10&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&distinctFilter=%7B%22attribute%22%3A%20%22color%22%2C%20%22maxNumItems%22%3A%203%7D&ignoreQueryRules=SOME_BOOLEAN_VALUE&excludeQueryRules=2&excludeQueryRules=5&disableQueryClassification=SOME_BOOLEAN_VALUE&disableDynamicReranker=SOME_BOOLEAN_VALUE&params=source%3Amobile' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("GET", "/search/v2/indices/%7BindexId%7D/query?query=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&personalize=SOME_BOOLEAN_VALUE&correlationId=SOME_STRING_VALUE&searchId=SOME_STRING_VALUE&sortByMetric=SOME_STRING_VALUE&sortByGeoPoint=34.052235%2C-118.243685&filterGeoPoints=34.052235%2C-118.243685&filterGeoPoints=15.0%2C65.0&filterAroundRadius=5000&filters=SOME_STRING_VALUE&facets=SOME_ARRAY_VALUE&facetsSize=SOME_INTEGER_VALUE&maxValuesPerFacet=SOME_INTEGER_VALUE&caseSensitiveFacetValues=SOME_BOOLEAN_VALUE&displayAttributes=title&displayAttributes=price&context=mobile&context=listing&includeFacets=SOME_STRING_VALUE&facetsOrderBy=SOME_STRING_VALUE&page=4&limit=10&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&distinctFilter=%7B%22attribute%22%3A%20%22color%22%2C%20%22maxNumItems%22%3A%203%7D&ignoreQueryRules=SOME_BOOLEAN_VALUE&excludeQueryRules=2&excludeQueryRules=5&disableQueryClassification=SOME_BOOLEAN_VALUE&disableDynamicReranker=SOME_BOOLEAN_VALUE&params=source%3Amobile", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("GET", "https://api.synerise.com/search/v2/indices/%7BindexId%7D/query?query=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&personalize=SOME_BOOLEAN_VALUE&correlationId=SOME_STRING_VALUE&searchId=SOME_STRING_VALUE&sortByMetric=SOME_STRING_VALUE&sortByGeoPoint=34.052235%2C-118.243685&filterGeoPoints=34.052235%2C-118.243685&filterGeoPoints=15.0%2C65.0&filterAroundRadius=5000&filters=SOME_STRING_VALUE&facets=SOME_ARRAY_VALUE&facetsSize=SOME_INTEGER_VALUE&maxValuesPerFacet=SOME_INTEGER_VALUE&caseSensitiveFacetValues=SOME_BOOLEAN_VALUE&displayAttributes=title&displayAttributes=price&context=mobile&context=listing&includeFacets=SOME_STRING_VALUE&facetsOrderBy=SOME_STRING_VALUE&page=4&limit=10&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&distinctFilter=%7B%22attribute%22%3A%20%22color%22%2C%20%22maxNumItems%22%3A%203%7D&ignoreQueryRules=SOME_BOOLEAN_VALUE&excludeQueryRules=2&excludeQueryRules=5&disableQueryClassification=SOME_BOOLEAN_VALUE&disableDynamicReranker=SOME_BOOLEAN_VALUE&params=source%3Amobile");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/search/v2/indices/%7BindexId%7D/query?query=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&personalize=SOME_BOOLEAN_VALUE&correlationId=SOME_STRING_VALUE&searchId=SOME_STRING_VALUE&sortByMetric=SOME_STRING_VALUE&sortByGeoPoint=34.052235%2C-118.243685&filterGeoPoints=34.052235%2C-118.243685&filterGeoPoints=15.0%2C65.0&filterAroundRadius=5000&filters=SOME_STRING_VALUE&facets=SOME_ARRAY_VALUE&facetsSize=SOME_INTEGER_VALUE&maxValuesPerFacet=SOME_INTEGER_VALUE&caseSensitiveFacetValues=SOME_BOOLEAN_VALUE&displayAttributes=title&displayAttributes=price&context=mobile&context=listing&includeFacets=SOME_STRING_VALUE&facetsOrderBy=SOME_STRING_VALUE&page=4&limit=10&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&distinctFilter=%7B%22attribute%22%3A%20%22color%22%2C%20%22maxNumItems%22%3A%203%7D&ignoreQueryRules=SOME_BOOLEAN_VALUE&excludeQueryRules=2&excludeQueryRules=5&disableQueryClassification=SOME_BOOLEAN_VALUE&disableDynamicReranker=SOME_BOOLEAN_VALUE&params=source%3Amobile",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/search/v2/indices/%7BindexId%7D/query');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'query' => 'SOME_STRING_VALUE',
              'clientUUID' => 'SOME_STRING_VALUE',
              'personalize' => 'SOME_BOOLEAN_VALUE',
              'correlationId' => 'SOME_STRING_VALUE',
              'searchId' => 'SOME_STRING_VALUE',
              'sortByMetric' => 'SOME_STRING_VALUE',
              'sortByGeoPoint' => '34.052235,-118.243685',
              'filterGeoPoints' => [
                '34.052235,-118.243685',
                '15.0,65.0'
              ],
              'filterAroundRadius' => '5000',
              'filters' => 'SOME_STRING_VALUE',
              'facets' => 'SOME_ARRAY_VALUE',
              'facetsSize' => 'SOME_INTEGER_VALUE',
              'maxValuesPerFacet' => 'SOME_INTEGER_VALUE',
              'caseSensitiveFacetValues' => 'SOME_BOOLEAN_VALUE',
              'displayAttributes' => [
                'title',
                'price'
              ],
              'context' => [
                'mobile',
                'listing'
              ],
              'includeFacets' => 'SOME_STRING_VALUE',
              'facetsOrderBy' => 'SOME_STRING_VALUE',
              'page' => '4',
              'limit' => '10',
              'sortBy' => 'SOME_STRING_VALUE',
              'ordering' => 'SOME_STRING_VALUE',
              'includeMeta' => 'SOME_BOOLEAN_VALUE',
              'distinctFilter' => '{"attribute": "color", "maxNumItems": 3}',
              'ignoreQueryRules' => 'SOME_BOOLEAN_VALUE',
              'excludeQueryRules' => [
                '2',
                '5'
              ],
              'disableQueryClassification' => 'SOME_BOOLEAN_VALUE',
              'disableDynamicReranker' => 'SOME_BOOLEAN_VALUE',
              'params' => 'source:mobile'
            ]);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/search/v2/indices/%7BindexId%7D/query?query=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&personalize=SOME_BOOLEAN_VALUE&correlationId=SOME_STRING_VALUE&searchId=SOME_STRING_VALUE&sortByMetric=SOME_STRING_VALUE&sortByGeoPoint=34.052235%2C-118.243685&filterGeoPoints=34.052235%2C-118.243685&filterGeoPoints=15.0%2C65.0&filterAroundRadius=5000&filters=SOME_STRING_VALUE&facets=SOME_ARRAY_VALUE&facetsSize=SOME_INTEGER_VALUE&maxValuesPerFacet=SOME_INTEGER_VALUE&caseSensitiveFacetValues=SOME_BOOLEAN_VALUE&displayAttributes=title&displayAttributes=price&context=mobile&context=listing&includeFacets=SOME_STRING_VALUE&facetsOrderBy=SOME_STRING_VALUE&page=4&limit=10&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&distinctFilter=%7B%22attribute%22%3A%20%22color%22%2C%20%22maxNumItems%22%3A%203%7D&ignoreQueryRules=SOME_BOOLEAN_VALUE&excludeQueryRules=2&excludeQueryRules=5&disableQueryClassification=SOME_BOOLEAN_VALUE&disableDynamicReranker=SOME_BOOLEAN_VALUE&params=source%3Amobile")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    post:
      summary: Full-text items search
      description: |
        Retrieves items that match a full-text query from a search index or a suggestion index. The results can be filtered and sorted.

        ---

        **API consumers:** <span title="Deprecated">AI API key (legacy)</span>, <a href="/docs/settings/tool/tracking_codes" target="_blank" rel="noopener" title="Pass your tracker key in the request header">Web SDK Tracker</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>

        **API key permission required:** `ITEMS_SEARCH_SEARCH_READ`
      operationId: SearchFullTextPost
      tags:
        - Search
      security:
        - TrackerKey: []
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/items-search-inPathIndexId"
      requestBody:
        description: Request for performing full-text search
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/items-search-FullTextSearchRequest"
      responses:
        "200":
          $ref: "#/components/responses/items-search-FullTextSearchResponse200"
        "500":
          description: Service not available
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/items-search-Error"
      x-snr-doc-urls:
        - /api-reference/ai-search#tag/Search/operation/SearchFullTextPost
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/search/v2/indices/%7BindexId%7D/query \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"query":"string","page":0,"limit":10,"sortBy":"string","ordering":"desc","includeMeta":true,"clientUUID":"string","personalize":true,"correlationId":"string","searchId":"string","sortByMetric":"TransactionsPopularity","sortByGeoPoints":"34.052235,-118.243685","filterGeoPoints":["34.052235,-118.243685","15.0,65.0"],"filterAroundRadius":2000,"filters":"string","facets":["string"],"customFilteredFacets":{"brand":"price > 100","price":"brand == foo"},"facetsSize":2000,"maxValuesPerFacet":50,"caseSensitiveFacetValues":false,"includeFacets":"all","facetsOrderBy":"coverage","context":["mobile","listing"],"displayAttributes":["title","price"],"distinctFilter":{"attribute":"string","maxNumItems":1,"levelRangeModifier":0},"ignoreQueryRules":false,"excludeQueryRules":[2,5],"params":{"source":"mobile"},"disableQueryClassification":false,"disableDynamicReranker":false}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"query\":\"string\",\"page\":0,\"limit\":10,\"sortBy\":\"string\",\"ordering\":\"desc\",\"includeMeta\":true,\"clientUUID\":\"string\",\"personalize\":true,\"correlationId\":\"string\",\"searchId\":\"string\",\"sortByMetric\":\"TransactionsPopularity\",\"sortByGeoPoints\":\"34.052235,-118.243685\",\"filterGeoPoints\":[\"34.052235,-118.243685\",\"15.0,65.0\"],\"filterAroundRadius\":2000,\"filters\":\"string\",\"facets\":[\"string\"],\"customFilteredFacets\":{\"brand\":\"price > 100\",\"price\":\"brand == foo\"},\"facetsSize\":2000,\"maxValuesPerFacet\":50,\"caseSensitiveFacetValues\":false,\"includeFacets\":\"all\",\"facetsOrderBy\":\"coverage\",\"context\":[\"mobile\",\"listing\"],\"displayAttributes\":[\"title\",\"price\"],\"distinctFilter\":{\"attribute\":\"string\",\"maxNumItems\":1,\"levelRangeModifier\":0},\"ignoreQueryRules\":false,\"excludeQueryRules\":[2,5],\"params\":{\"source\":\"mobile\"},\"disableQueryClassification\":false,\"disableDynamicReranker\":false}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/search/v2/indices/%7BindexId%7D/query", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "query": "string",
              "page": 0,
              "limit": 10,
              "sortBy": "string",
              "ordering": "desc",
              "includeMeta": true,
              "clientUUID": "string",
              "personalize": true,
              "correlationId": "string",
              "searchId": "string",
              "sortByMetric": "TransactionsPopularity",
              "sortByGeoPoints": "34.052235,-118.243685",
              "filterGeoPoints": [
                "34.052235,-118.243685",
                "15.0,65.0"
              ],
              "filterAroundRadius": 2000,
              "filters": "string",
              "facets": [
                "string"
              ],
              "customFilteredFacets": {
                "brand": "price > 100",
                "price": "brand == foo"
              },
              "facetsSize": 2000,
              "maxValuesPerFacet": 50,
              "caseSensitiveFacetValues": false,
              "includeFacets": "all",
              "facetsOrderBy": "coverage",
              "context": [
                "mobile",
                "listing"
              ],
              "displayAttributes": [
                "title",
                "price"
              ],
              "distinctFilter": {
                "attribute": "string",
                "maxNumItems": 1,
                "levelRangeModifier": 0
              },
              "ignoreQueryRules": false,
              "excludeQueryRules": [
                2,
                5
              ],
              "params": {
                "source": "mobile"
              },
              "disableQueryClassification": false,
              "disableDynamicReranker": false
            });

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("POST", "https://api.synerise.com/search/v2/indices/%7BindexId%7D/query");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/search/v2/indices/%7BindexId%7D/query",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify({
              query: 'string',
              page: 0,
              limit: 10,
              sortBy: 'string',
              ordering: 'desc',
              includeMeta: true,
              clientUUID: 'string',
              personalize: true,
              correlationId: 'string',
              searchId: 'string',
              sortByMetric: 'TransactionsPopularity',
              sortByGeoPoints: '34.052235,-118.243685',
              filterGeoPoints: ['34.052235,-118.243685', '15.0,65.0'],
              filterAroundRadius: 2000,
              filters: 'string',
              facets: ['string'],
              customFilteredFacets: {brand: 'price > 100', price: 'brand == foo'},
              facetsSize: 2000,
              maxValuesPerFacet: 50,
              caseSensitiveFacetValues: false,
              includeFacets: 'all',
              facetsOrderBy: 'coverage',
              context: ['mobile', 'listing'],
              displayAttributes: ['title', 'price'],
              distinctFilter: {attribute: 'string', maxNumItems: 1, levelRangeModifier: 0},
              ignoreQueryRules: false,
              excludeQueryRules: [2, 5],
              params: {source: 'mobile'},
              disableQueryClassification: false,
              disableDynamicReranker: false
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/search/v2/indices/%7BindexId%7D/query');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"query":"string","page":0,"limit":10,"sortBy":"string","ordering":"desc","includeMeta":true,"clientUUID":"string","personalize":true,"correlationId":"string","searchId":"string","sortByMetric":"TransactionsPopularity","sortByGeoPoints":"34.052235,-118.243685","filterGeoPoints":["34.052235,-118.243685","15.0,65.0"],"filterAroundRadius":2000,"filters":"string","facets":["string"],"customFilteredFacets":{"brand":"price > 100","price":"brand == foo"},"facetsSize":2000,"maxValuesPerFacet":50,"caseSensitiveFacetValues":false,"includeFacets":"all","facetsOrderBy":"coverage","context":["mobile","listing"],"displayAttributes":["title","price"],"distinctFilter":{"attribute":"string","maxNumItems":1,"levelRangeModifier":0},"ignoreQueryRules":false,"excludeQueryRules":[2,5],"params":{"source":"mobile"},"disableQueryClassification":false,"disableDynamicReranker":false}');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/search/v2/indices/%7BindexId%7D/query")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"query\":\"string\",\"page\":0,\"limit\":10,\"sortBy\":\"string\",\"ordering\":\"desc\",\"includeMeta\":true,\"clientUUID\":\"string\",\"personalize\":true,\"correlationId\":\"string\",\"searchId\":\"string\",\"sortByMetric\":\"TransactionsPopularity\",\"sortByGeoPoints\":\"34.052235,-118.243685\",\"filterGeoPoints\":[\"34.052235,-118.243685\",\"15.0,65.0\"],\"filterAroundRadius\":2000,\"filters\":\"string\",\"facets\":[\"string\"],\"customFilteredFacets\":{\"brand\":\"price > 100\",\"price\":\"brand == foo\"},\"facetsSize\":2000,\"maxValuesPerFacet\":50,\"caseSensitiveFacetValues\":false,\"includeFacets\":\"all\",\"facetsOrderBy\":\"coverage\",\"context\":[\"mobile\",\"listing\"],\"displayAttributes\":[\"title\",\"price\"],\"distinctFilter\":{\"attribute\":\"string\",\"maxNumItems\":1,\"levelRangeModifier\":0},\"ignoreQueryRules\":false,\"excludeQueryRules\":[2,5],\"params\":{\"source\":\"mobile\"},\"disableQueryClassification\":false,\"disableDynamicReranker\":false}")
              .asString();
  /search/v2/indices/{indexId}/query/explain:
    get:
      summary: Explained full-text items search
      description: |
        Retrieves items that match a full-text query from a search index or a suggestion index. The results can be filtered and sorted.  The response contains an explanation of the factors that influenced the result.

        ---

        **API consumers:** <span title="Deprecated">AI API key (legacy)</span>, <a href="/docs/settings/tool/tracking_codes" target="_blank" rel="noopener" title="Pass your tracker key in the request header">Web SDK Tracker</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>

        **API key permission required:** `ITEMS_SEARCH_SEARCH_READ`
      operationId: SearchFullTextGetWithExplanation
      tags:
        - Search
      security:
        - TrackerKey: []
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/items-search-searchQuery"
        - $ref: "#/components/parameters/items-search-inPathIndexId"
        - $ref: "#/components/parameters/items-search-clientUUID"
        - $ref: "#/components/parameters/items-search-personalize"
        - $ref: "#/components/parameters/items-search-correlationId"
        - $ref: "#/components/parameters/items-search-searchId"
        - $ref: "#/components/parameters/items-search-sortByMetric"
        - $ref: "#/components/parameters/items-search-sortByGeoPoint"
        - $ref: "#/components/parameters/items-search-filterGeoPoints"
        - $ref: "#/components/parameters/items-search-filterAroundRadius"
        - $ref: "#/components/parameters/items-search-filters"
        - $ref: "#/components/parameters/items-search-facets"
        - $ref: "#/components/parameters/items-search-facetsSize"
        - $ref: "#/components/parameters/items-search-maxValuesPerFacet"
        - $ref: "#/components/parameters/items-search-caseSensitiveFacetValues"
        - $ref: "#/components/parameters/items-search-displayAttributes"
        - $ref: "#/components/parameters/items-search-context"
        - $ref: "#/components/parameters/items-search-includeFacets"
        - $ref: "#/components/parameters/items-search-facetsOrderBy"
        - $ref: "#/components/parameters/items-search-paginationPage"
        - $ref: "#/components/parameters/items-search-paginationLimit"
        - $ref: "#/components/parameters/items-search-paginationSortBy"
        - $ref: "#/components/parameters/items-search-paginationOrdering"
        - $ref: "#/components/parameters/items-search-paginationIncludeMeta"
        - $ref: "#/components/parameters/items-search-distinctFilter"
        - $ref: "#/components/parameters/items-search-ignoreQueryRules"
        - $ref: "#/components/parameters/items-search-disableQueryClassification"
        - $ref: "#/components/parameters/items-search-disableDynamicReranker"
        - $ref: "#/components/parameters/items-search-excludeQueryRules"
        - $ref: "#/components/parameters/items-search-crossWorkspaceModeEnabled"
        - $ref: "#/components/parameters/items-search-params"
      responses:
        "200":
          $ref: "#/components/responses/items-search-FullTextSearchResponse200WithExplanation"
        "500":
          description: Service not available
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/items-search-Error"
      x-snr-doc-urls:
        - /api-reference/ai-search#tag/Search/operation/SearchFullTextGetWithExplanation
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/search/v2/indices/%7BindexId%7D/query/explain?query=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&personalize=SOME_BOOLEAN_VALUE&correlationId=SOME_STRING_VALUE&searchId=SOME_STRING_VALUE&sortByMetric=SOME_STRING_VALUE&sortByGeoPoint=34.052235%2C-118.243685&filterGeoPoints=34.052235%2C-118.243685&filterGeoPoints=15.0%2C65.0&filterAroundRadius=5000&filters=SOME_STRING_VALUE&facets=SOME_ARRAY_VALUE&facetsSize=SOME_INTEGER_VALUE&maxValuesPerFacet=SOME_INTEGER_VALUE&caseSensitiveFacetValues=SOME_BOOLEAN_VALUE&displayAttributes=title&displayAttributes=price&context=mobile&context=listing&includeFacets=SOME_STRING_VALUE&facetsOrderBy=SOME_STRING_VALUE&page=4&limit=10&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&distinctFilter=%7B%22attribute%22%3A%20%22color%22%2C%20%22maxNumItems%22%3A%203%7D&ignoreQueryRules=SOME_BOOLEAN_VALUE&disableQueryClassification=SOME_BOOLEAN_VALUE&disableDynamicReranker=SOME_BOOLEAN_VALUE&excludeQueryRules=2&excludeQueryRules=5&crossWorkspaceModeEnabled=SOME_BOOLEAN_VALUE&params=source%3Amobile' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("GET", "/search/v2/indices/%7BindexId%7D/query/explain?query=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&personalize=SOME_BOOLEAN_VALUE&correlationId=SOME_STRING_VALUE&searchId=SOME_STRING_VALUE&sortByMetric=SOME_STRING_VALUE&sortByGeoPoint=34.052235%2C-118.243685&filterGeoPoints=34.052235%2C-118.243685&filterGeoPoints=15.0%2C65.0&filterAroundRadius=5000&filters=SOME_STRING_VALUE&facets=SOME_ARRAY_VALUE&facetsSize=SOME_INTEGER_VALUE&maxValuesPerFacet=SOME_INTEGER_VALUE&caseSensitiveFacetValues=SOME_BOOLEAN_VALUE&displayAttributes=title&displayAttributes=price&context=mobile&context=listing&includeFacets=SOME_STRING_VALUE&facetsOrderBy=SOME_STRING_VALUE&page=4&limit=10&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&distinctFilter=%7B%22attribute%22%3A%20%22color%22%2C%20%22maxNumItems%22%3A%203%7D&ignoreQueryRules=SOME_BOOLEAN_VALUE&disableQueryClassification=SOME_BOOLEAN_VALUE&disableDynamicReranker=SOME_BOOLEAN_VALUE&excludeQueryRules=2&excludeQueryRules=5&crossWorkspaceModeEnabled=SOME_BOOLEAN_VALUE&params=source%3Amobile", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("GET", "https://api.synerise.com/search/v2/indices/%7BindexId%7D/query/explain?query=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&personalize=SOME_BOOLEAN_VALUE&correlationId=SOME_STRING_VALUE&searchId=SOME_STRING_VALUE&sortByMetric=SOME_STRING_VALUE&sortByGeoPoint=34.052235%2C-118.243685&filterGeoPoints=34.052235%2C-118.243685&filterGeoPoints=15.0%2C65.0&filterAroundRadius=5000&filters=SOME_STRING_VALUE&facets=SOME_ARRAY_VALUE&facetsSize=SOME_INTEGER_VALUE&maxValuesPerFacet=SOME_INTEGER_VALUE&caseSensitiveFacetValues=SOME_BOOLEAN_VALUE&displayAttributes=title&displayAttributes=price&context=mobile&context=listing&includeFacets=SOME_STRING_VALUE&facetsOrderBy=SOME_STRING_VALUE&page=4&limit=10&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&distinctFilter=%7B%22attribute%22%3A%20%22color%22%2C%20%22maxNumItems%22%3A%203%7D&ignoreQueryRules=SOME_BOOLEAN_VALUE&disableQueryClassification=SOME_BOOLEAN_VALUE&disableDynamicReranker=SOME_BOOLEAN_VALUE&excludeQueryRules=2&excludeQueryRules=5&crossWorkspaceModeEnabled=SOME_BOOLEAN_VALUE&params=source%3Amobile");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/search/v2/indices/%7BindexId%7D/query/explain?query=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&personalize=SOME_BOOLEAN_VALUE&correlationId=SOME_STRING_VALUE&searchId=SOME_STRING_VALUE&sortByMetric=SOME_STRING_VALUE&sortByGeoPoint=34.052235%2C-118.243685&filterGeoPoints=34.052235%2C-118.243685&filterGeoPoints=15.0%2C65.0&filterAroundRadius=5000&filters=SOME_STRING_VALUE&facets=SOME_ARRAY_VALUE&facetsSize=SOME_INTEGER_VALUE&maxValuesPerFacet=SOME_INTEGER_VALUE&caseSensitiveFacetValues=SOME_BOOLEAN_VALUE&displayAttributes=title&displayAttributes=price&context=mobile&context=listing&includeFacets=SOME_STRING_VALUE&facetsOrderBy=SOME_STRING_VALUE&page=4&limit=10&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&distinctFilter=%7B%22attribute%22%3A%20%22color%22%2C%20%22maxNumItems%22%3A%203%7D&ignoreQueryRules=SOME_BOOLEAN_VALUE&disableQueryClassification=SOME_BOOLEAN_VALUE&disableDynamicReranker=SOME_BOOLEAN_VALUE&excludeQueryRules=2&excludeQueryRules=5&crossWorkspaceModeEnabled=SOME_BOOLEAN_VALUE&params=source%3Amobile",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/search/v2/indices/%7BindexId%7D/query/explain');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'query' => 'SOME_STRING_VALUE',
              'clientUUID' => 'SOME_STRING_VALUE',
              'personalize' => 'SOME_BOOLEAN_VALUE',
              'correlationId' => 'SOME_STRING_VALUE',
              'searchId' => 'SOME_STRING_VALUE',
              'sortByMetric' => 'SOME_STRING_VALUE',
              'sortByGeoPoint' => '34.052235,-118.243685',
              'filterGeoPoints' => [
                '34.052235,-118.243685',
                '15.0,65.0'
              ],
              'filterAroundRadius' => '5000',
              'filters' => 'SOME_STRING_VALUE',
              'facets' => 'SOME_ARRAY_VALUE',
              'facetsSize' => 'SOME_INTEGER_VALUE',
              'maxValuesPerFacet' => 'SOME_INTEGER_VALUE',
              'caseSensitiveFacetValues' => 'SOME_BOOLEAN_VALUE',
              'displayAttributes' => [
                'title',
                'price'
              ],
              'context' => [
                'mobile',
                'listing'
              ],
              'includeFacets' => 'SOME_STRING_VALUE',
              'facetsOrderBy' => 'SOME_STRING_VALUE',
              'page' => '4',
              'limit' => '10',
              'sortBy' => 'SOME_STRING_VALUE',
              'ordering' => 'SOME_STRING_VALUE',
              'includeMeta' => 'SOME_BOOLEAN_VALUE',
              'distinctFilter' => '{"attribute": "color", "maxNumItems": 3}',
              'ignoreQueryRules' => 'SOME_BOOLEAN_VALUE',
              'disableQueryClassification' => 'SOME_BOOLEAN_VALUE',
              'disableDynamicReranker' => 'SOME_BOOLEAN_VALUE',
              'excludeQueryRules' => [
                '2',
                '5'
              ],
              'crossWorkspaceModeEnabled' => 'SOME_BOOLEAN_VALUE',
              'params' => 'source:mobile'
            ]);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/search/v2/indices/%7BindexId%7D/query/explain?query=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&personalize=SOME_BOOLEAN_VALUE&correlationId=SOME_STRING_VALUE&searchId=SOME_STRING_VALUE&sortByMetric=SOME_STRING_VALUE&sortByGeoPoint=34.052235%2C-118.243685&filterGeoPoints=34.052235%2C-118.243685&filterGeoPoints=15.0%2C65.0&filterAroundRadius=5000&filters=SOME_STRING_VALUE&facets=SOME_ARRAY_VALUE&facetsSize=SOME_INTEGER_VALUE&maxValuesPerFacet=SOME_INTEGER_VALUE&caseSensitiveFacetValues=SOME_BOOLEAN_VALUE&displayAttributes=title&displayAttributes=price&context=mobile&context=listing&includeFacets=SOME_STRING_VALUE&facetsOrderBy=SOME_STRING_VALUE&page=4&limit=10&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&distinctFilter=%7B%22attribute%22%3A%20%22color%22%2C%20%22maxNumItems%22%3A%203%7D&ignoreQueryRules=SOME_BOOLEAN_VALUE&disableQueryClassification=SOME_BOOLEAN_VALUE&disableDynamicReranker=SOME_BOOLEAN_VALUE&excludeQueryRules=2&excludeQueryRules=5&crossWorkspaceModeEnabled=SOME_BOOLEAN_VALUE&params=source%3Amobile")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    post:
      summary: Explained full-text items search
      description: |
        Retrieves items that match a full-text query from a search index or a suggestion index. The results can be filtered and sorted. The response contains an explanation of the factors that influenced the result.

        ---

        **API consumers:** <span title="Deprecated">AI API key (legacy)</span>, <a href="/docs/settings/tool/tracking_codes" target="_blank" rel="noopener" title="Pass your tracker key in the request header">Web SDK Tracker</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>

        **API key permission required:** `ITEMS_SEARCH_SEARCH_READ`
      operationId: SearchFullTextPostWithExplanation
      tags:
        - Search
      security:
        - TrackerKey: []
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/items-search-inPathIndexId"
      requestBody:
        description: Request for performing full-text search with explanation
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/items-search-FullTextSearchRequest"
                - type: object
                  properties:
                    crossWorkspaceMode:
                      $ref: "#/components/schemas/items-search-CrossWorkspaceMode"
      responses:
        "200":
          $ref: "#/components/responses/items-search-FullTextSearchResponse200WithExplanation"
        "500":
          description: Service not available
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/items-search-Error"
      x-snr-doc-urls:
        - /api-reference/ai-search#tag/Search/operation/SearchFullTextPostWithExplanation
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/search/v2/indices/%7BindexId%7D/query/explain \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"query":"string","page":0,"limit":10,"sortBy":"string","ordering":"desc","includeMeta":true,"clientUUID":"string","personalize":true,"correlationId":"string","searchId":"string","sortByMetric":"TransactionsPopularity","sortByGeoPoints":"34.052235,-118.243685","filterGeoPoints":["34.052235,-118.243685","15.0,65.0"],"filterAroundRadius":2000,"filters":"string","facets":["string"],"customFilteredFacets":{"brand":"price > 100","price":"brand == foo"},"facetsSize":2000,"maxValuesPerFacet":50,"caseSensitiveFacetValues":false,"includeFacets":"all","facetsOrderBy":"coverage","context":["mobile","listing"],"displayAttributes":["title","price"],"distinctFilter":{"attribute":"string","maxNumItems":1,"levelRangeModifier":0},"ignoreQueryRules":false,"excludeQueryRules":[2,5],"params":{"source":"mobile"},"disableQueryClassification":false,"disableDynamicReranker":false,"crossWorkspaceMode":{"enabled":true}}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"query\":\"string\",\"page\":0,\"limit\":10,\"sortBy\":\"string\",\"ordering\":\"desc\",\"includeMeta\":true,\"clientUUID\":\"string\",\"personalize\":true,\"correlationId\":\"string\",\"searchId\":\"string\",\"sortByMetric\":\"TransactionsPopularity\",\"sortByGeoPoints\":\"34.052235,-118.243685\",\"filterGeoPoints\":[\"34.052235,-118.243685\",\"15.0,65.0\"],\"filterAroundRadius\":2000,\"filters\":\"string\",\"facets\":[\"string\"],\"customFilteredFacets\":{\"brand\":\"price > 100\",\"price\":\"brand == foo\"},\"facetsSize\":2000,\"maxValuesPerFacet\":50,\"caseSensitiveFacetValues\":false,\"includeFacets\":\"all\",\"facetsOrderBy\":\"coverage\",\"context\":[\"mobile\",\"listing\"],\"displayAttributes\":[\"title\",\"price\"],\"distinctFilter\":{\"attribute\":\"string\",\"maxNumItems\":1,\"levelRangeModifier\":0},\"ignoreQueryRules\":false,\"excludeQueryRules\":[2,5],\"params\":{\"source\":\"mobile\"},\"disableQueryClassification\":false,\"disableDynamicReranker\":false,\"crossWorkspaceMode\":{\"enabled\":true}}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/search/v2/indices/%7BindexId%7D/query/explain", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "query": "string",
              "page": 0,
              "limit": 10,
              "sortBy": "string",
              "ordering": "desc",
              "includeMeta": true,
              "clientUUID": "string",
              "personalize": true,
              "correlationId": "string",
              "searchId": "string",
              "sortByMetric": "TransactionsPopularity",
              "sortByGeoPoints": "34.052235,-118.243685",
              "filterGeoPoints": [
                "34.052235,-118.243685",
                "15.0,65.0"
              ],
              "filterAroundRadius": 2000,
              "filters": "string",
              "facets": [
                "string"
              ],
              "customFilteredFacets": {
                "brand": "price > 100",
                "price": "brand == foo"
              },
              "facetsSize": 2000,
              "maxValuesPerFacet": 50,
              "caseSensitiveFacetValues": false,
              "includeFacets": "all",
              "facetsOrderBy": "coverage",
              "context": [
                "mobile",
                "listing"
              ],
              "displayAttributes": [
                "title",
                "price"
              ],
              "distinctFilter": {
                "attribute": "string",
                "maxNumItems": 1,
                "levelRangeModifier": 0
              },
              "ignoreQueryRules": false,
              "excludeQueryRules": [
                2,
                5
              ],
              "params": {
                "source": "mobile"
              },
              "disableQueryClassification": false,
              "disableDynamicReranker": false,
              "crossWorkspaceMode": {
                "enabled": true
              }
            });

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("POST", "https://api.synerise.com/search/v2/indices/%7BindexId%7D/query/explain");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/search/v2/indices/%7BindexId%7D/query/explain",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify({
              query: 'string',
              page: 0,
              limit: 10,
              sortBy: 'string',
              ordering: 'desc',
              includeMeta: true,
              clientUUID: 'string',
              personalize: true,
              correlationId: 'string',
              searchId: 'string',
              sortByMetric: 'TransactionsPopularity',
              sortByGeoPoints: '34.052235,-118.243685',
              filterGeoPoints: ['34.052235,-118.243685', '15.0,65.0'],
              filterAroundRadius: 2000,
              filters: 'string',
              facets: ['string'],
              customFilteredFacets: {brand: 'price > 100', price: 'brand == foo'},
              facetsSize: 2000,
              maxValuesPerFacet: 50,
              caseSensitiveFacetValues: false,
              includeFacets: 'all',
              facetsOrderBy: 'coverage',
              context: ['mobile', 'listing'],
              displayAttributes: ['title', 'price'],
              distinctFilter: {attribute: 'string', maxNumItems: 1, levelRangeModifier: 0},
              ignoreQueryRules: false,
              excludeQueryRules: [2, 5],
              params: {source: 'mobile'},
              disableQueryClassification: false,
              disableDynamicReranker: false,
              crossWorkspaceMode: {enabled: true}
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/search/v2/indices/%7BindexId%7D/query/explain');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"query":"string","page":0,"limit":10,"sortBy":"string","ordering":"desc","includeMeta":true,"clientUUID":"string","personalize":true,"correlationId":"string","searchId":"string","sortByMetric":"TransactionsPopularity","sortByGeoPoints":"34.052235,-118.243685","filterGeoPoints":["34.052235,-118.243685","15.0,65.0"],"filterAroundRadius":2000,"filters":"string","facets":["string"],"customFilteredFacets":{"brand":"price > 100","price":"brand == foo"},"facetsSize":2000,"maxValuesPerFacet":50,"caseSensitiveFacetValues":false,"includeFacets":"all","facetsOrderBy":"coverage","context":["mobile","listing"],"displayAttributes":["title","price"],"distinctFilter":{"attribute":"string","maxNumItems":1,"levelRangeModifier":0},"ignoreQueryRules":false,"excludeQueryRules":[2,5],"params":{"source":"mobile"},"disableQueryClassification":false,"disableDynamicReranker":false,"crossWorkspaceMode":{"enabled":true}}');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/search/v2/indices/%7BindexId%7D/query/explain")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"query\":\"string\",\"page\":0,\"limit\":10,\"sortBy\":\"string\",\"ordering\":\"desc\",\"includeMeta\":true,\"clientUUID\":\"string\",\"personalize\":true,\"correlationId\":\"string\",\"searchId\":\"string\",\"sortByMetric\":\"TransactionsPopularity\",\"sortByGeoPoints\":\"34.052235,-118.243685\",\"filterGeoPoints\":[\"34.052235,-118.243685\",\"15.0,65.0\"],\"filterAroundRadius\":2000,\"filters\":\"string\",\"facets\":[\"string\"],\"customFilteredFacets\":{\"brand\":\"price > 100\",\"price\":\"brand == foo\"},\"facetsSize\":2000,\"maxValuesPerFacet\":50,\"caseSensitiveFacetValues\":false,\"includeFacets\":\"all\",\"facetsOrderBy\":\"coverage\",\"context\":[\"mobile\",\"listing\"],\"displayAttributes\":[\"title\",\"price\"],\"distinctFilter\":{\"attribute\":\"string\",\"maxNumItems\":1,\"levelRangeModifier\":0},\"ignoreQueryRules\":false,\"excludeQueryRules\":[2,5],\"params\":{\"source\":\"mobile\"},\"disableQueryClassification\":false,\"disableDynamicReranker\":false,\"crossWorkspaceMode\":{\"enabled\":true}}")
              .asString();
  /search/v2/indices/{indexId}/autocomplete:
    get:
      summary: Autocomplete items search
      description: |
        Retrieves items that match a query from a search index or a suggestion index. The results can be filtered and sorted. The results of this search type are not cached.

        ---

        **API consumers:** <span title="Deprecated">AI API key (legacy)</span>, <a href="/docs/settings/tool/tracking_codes" target="_blank" rel="noopener" title="Pass your tracker key in the request header">Web SDK Tracker</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>

        **API key permission required:** `ITEMS_SEARCH_SEARCH_READ`
      operationId: SearchAutocompleteGet
      tags:
        - Search
      security:
        - TrackerKey: []
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/items-search-searchQuery"
        - $ref: "#/components/parameters/items-search-inPathIndexId"
        - $ref: "#/components/parameters/items-search-clientUUID"
        - $ref: "#/components/parameters/items-search-personalize"
        - $ref: "#/components/parameters/items-search-sortByMetric"
        - $ref: "#/components/parameters/items-search-sortByGeoPoint"
        - $ref: "#/components/parameters/items-search-filterGeoPoints"
        - $ref: "#/components/parameters/items-search-filterAroundRadius"
        - $ref: "#/components/parameters/items-search-filters"
        - $ref: "#/components/parameters/items-search-facets"
        - $ref: "#/components/parameters/items-search-facetsSize"
        - $ref: "#/components/parameters/items-search-maxValuesPerFacet"
        - $ref: "#/components/parameters/items-search-caseSensitiveFacetValues"
        - $ref: "#/components/parameters/items-search-displayAttributes"
        - $ref: "#/components/parameters/items-search-context"
        - $ref: "#/components/parameters/items-search-includeFacets"
        - $ref: "#/components/parameters/items-search-facetsOrderBy"
        - $ref: "#/components/parameters/items-search-paginationPage"
        - $ref: "#/components/parameters/items-search-paginationLimit"
        - $ref: "#/components/parameters/items-search-paginationSortBy"
        - $ref: "#/components/parameters/items-search-paginationOrdering"
        - $ref: "#/components/parameters/items-search-paginationIncludeMeta"
        - $ref: "#/components/parameters/items-search-distinctFilter"
        - $ref: "#/components/parameters/items-search-ignoreQueryRules"
        - $ref: "#/components/parameters/items-search-excludeQueryRules"
        - $ref: "#/components/parameters/items-search-params"
        - $ref: "#/components/parameters/items-search-disableQueryClassification"
        - $ref: "#/components/parameters/items-search-disableDynamicReranker"
      responses:
        "200":
          $ref: "#/components/responses/items-search-AutocompleteSearchResponse200"
        "500":
          description: Service not available
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/items-search-Error"
      x-snr-doc-urls:
        - /api-reference/ai-search#tag/Search/operation/SearchAutocompleteGet
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/search/v2/indices/%7BindexId%7D/autocomplete?query=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&personalize=SOME_BOOLEAN_VALUE&sortByMetric=SOME_STRING_VALUE&sortByGeoPoint=34.052235%2C-118.243685&filterGeoPoints=34.052235%2C-118.243685&filterGeoPoints=15.0%2C65.0&filterAroundRadius=5000&filters=SOME_STRING_VALUE&facets=SOME_ARRAY_VALUE&facetsSize=SOME_INTEGER_VALUE&maxValuesPerFacet=SOME_INTEGER_VALUE&caseSensitiveFacetValues=SOME_BOOLEAN_VALUE&displayAttributes=title&displayAttributes=price&context=mobile&context=listing&includeFacets=SOME_STRING_VALUE&facetsOrderBy=SOME_STRING_VALUE&page=4&limit=10&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&distinctFilter=%7B%22attribute%22%3A%20%22color%22%2C%20%22maxNumItems%22%3A%203%7D&ignoreQueryRules=SOME_BOOLEAN_VALUE&excludeQueryRules=2&excludeQueryRules=5&params=source%3Amobile&disableQueryClassification=SOME_BOOLEAN_VALUE&disableDynamicReranker=SOME_BOOLEAN_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("GET", "/search/v2/indices/%7BindexId%7D/autocomplete?query=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&personalize=SOME_BOOLEAN_VALUE&sortByMetric=SOME_STRING_VALUE&sortByGeoPoint=34.052235%2C-118.243685&filterGeoPoints=34.052235%2C-118.243685&filterGeoPoints=15.0%2C65.0&filterAroundRadius=5000&filters=SOME_STRING_VALUE&facets=SOME_ARRAY_VALUE&facetsSize=SOME_INTEGER_VALUE&maxValuesPerFacet=SOME_INTEGER_VALUE&caseSensitiveFacetValues=SOME_BOOLEAN_VALUE&displayAttributes=title&displayAttributes=price&context=mobile&context=listing&includeFacets=SOME_STRING_VALUE&facetsOrderBy=SOME_STRING_VALUE&page=4&limit=10&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&distinctFilter=%7B%22attribute%22%3A%20%22color%22%2C%20%22maxNumItems%22%3A%203%7D&ignoreQueryRules=SOME_BOOLEAN_VALUE&excludeQueryRules=2&excludeQueryRules=5&params=source%3Amobile&disableQueryClassification=SOME_BOOLEAN_VALUE&disableDynamicReranker=SOME_BOOLEAN_VALUE", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("GET", "https://api.synerise.com/search/v2/indices/%7BindexId%7D/autocomplete?query=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&personalize=SOME_BOOLEAN_VALUE&sortByMetric=SOME_STRING_VALUE&sortByGeoPoint=34.052235%2C-118.243685&filterGeoPoints=34.052235%2C-118.243685&filterGeoPoints=15.0%2C65.0&filterAroundRadius=5000&filters=SOME_STRING_VALUE&facets=SOME_ARRAY_VALUE&facetsSize=SOME_INTEGER_VALUE&maxValuesPerFacet=SOME_INTEGER_VALUE&caseSensitiveFacetValues=SOME_BOOLEAN_VALUE&displayAttributes=title&displayAttributes=price&context=mobile&context=listing&includeFacets=SOME_STRING_VALUE&facetsOrderBy=SOME_STRING_VALUE&page=4&limit=10&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&distinctFilter=%7B%22attribute%22%3A%20%22color%22%2C%20%22maxNumItems%22%3A%203%7D&ignoreQueryRules=SOME_BOOLEAN_VALUE&excludeQueryRules=2&excludeQueryRules=5&params=source%3Amobile&disableQueryClassification=SOME_BOOLEAN_VALUE&disableDynamicReranker=SOME_BOOLEAN_VALUE");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/search/v2/indices/%7BindexId%7D/autocomplete?query=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&personalize=SOME_BOOLEAN_VALUE&sortByMetric=SOME_STRING_VALUE&sortByGeoPoint=34.052235%2C-118.243685&filterGeoPoints=34.052235%2C-118.243685&filterGeoPoints=15.0%2C65.0&filterAroundRadius=5000&filters=SOME_STRING_VALUE&facets=SOME_ARRAY_VALUE&facetsSize=SOME_INTEGER_VALUE&maxValuesPerFacet=SOME_INTEGER_VALUE&caseSensitiveFacetValues=SOME_BOOLEAN_VALUE&displayAttributes=title&displayAttributes=price&context=mobile&context=listing&includeFacets=SOME_STRING_VALUE&facetsOrderBy=SOME_STRING_VALUE&page=4&limit=10&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&distinctFilter=%7B%22attribute%22%3A%20%22color%22%2C%20%22maxNumItems%22%3A%203%7D&ignoreQueryRules=SOME_BOOLEAN_VALUE&excludeQueryRules=2&excludeQueryRules=5&params=source%3Amobile&disableQueryClassification=SOME_BOOLEAN_VALUE&disableDynamicReranker=SOME_BOOLEAN_VALUE",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/search/v2/indices/%7BindexId%7D/autocomplete');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'query' => 'SOME_STRING_VALUE',
              'clientUUID' => 'SOME_STRING_VALUE',
              'personalize' => 'SOME_BOOLEAN_VALUE',
              'sortByMetric' => 'SOME_STRING_VALUE',
              'sortByGeoPoint' => '34.052235,-118.243685',
              'filterGeoPoints' => [
                '34.052235,-118.243685',
                '15.0,65.0'
              ],
              'filterAroundRadius' => '5000',
              'filters' => 'SOME_STRING_VALUE',
              'facets' => 'SOME_ARRAY_VALUE',
              'facetsSize' => 'SOME_INTEGER_VALUE',
              'maxValuesPerFacet' => 'SOME_INTEGER_VALUE',
              'caseSensitiveFacetValues' => 'SOME_BOOLEAN_VALUE',
              'displayAttributes' => [
                'title',
                'price'
              ],
              'context' => [
                'mobile',
                'listing'
              ],
              'includeFacets' => 'SOME_STRING_VALUE',
              'facetsOrderBy' => 'SOME_STRING_VALUE',
              'page' => '4',
              'limit' => '10',
              'sortBy' => 'SOME_STRING_VALUE',
              'ordering' => 'SOME_STRING_VALUE',
              'includeMeta' => 'SOME_BOOLEAN_VALUE',
              'distinctFilter' => '{"attribute": "color", "maxNumItems": 3}',
              'ignoreQueryRules' => 'SOME_BOOLEAN_VALUE',
              'excludeQueryRules' => [
                '2',
                '5'
              ],
              'params' => 'source:mobile',
              'disableQueryClassification' => 'SOME_BOOLEAN_VALUE',
              'disableDynamicReranker' => 'SOME_BOOLEAN_VALUE'
            ]);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/search/v2/indices/%7BindexId%7D/autocomplete?query=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&personalize=SOME_BOOLEAN_VALUE&sortByMetric=SOME_STRING_VALUE&sortByGeoPoint=34.052235%2C-118.243685&filterGeoPoints=34.052235%2C-118.243685&filterGeoPoints=15.0%2C65.0&filterAroundRadius=5000&filters=SOME_STRING_VALUE&facets=SOME_ARRAY_VALUE&facetsSize=SOME_INTEGER_VALUE&maxValuesPerFacet=SOME_INTEGER_VALUE&caseSensitiveFacetValues=SOME_BOOLEAN_VALUE&displayAttributes=title&displayAttributes=price&context=mobile&context=listing&includeFacets=SOME_STRING_VALUE&facetsOrderBy=SOME_STRING_VALUE&page=4&limit=10&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&distinctFilter=%7B%22attribute%22%3A%20%22color%22%2C%20%22maxNumItems%22%3A%203%7D&ignoreQueryRules=SOME_BOOLEAN_VALUE&excludeQueryRules=2&excludeQueryRules=5&params=source%3Amobile&disableQueryClassification=SOME_BOOLEAN_VALUE&disableDynamicReranker=SOME_BOOLEAN_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    post:
      summary: Autocomplete items search
      description: |
        Retrieves items that match a query from a search index or a suggestion index. The results can be filtered and sorted. The results of this search type are not cached.

        ---

        **API consumers:** <span title="Deprecated">AI API key (legacy)</span>, <a href="/docs/settings/tool/tracking_codes" target="_blank" rel="noopener" title="Pass your tracker key in the request header">Web SDK Tracker</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>

        **API key permission required:** `ITEMS_SEARCH_SEARCH_READ`
      operationId: SearchAutocompletePost
      tags:
        - Search
      security:
        - TrackerKey: []
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/items-search-inPathIndexId"
      requestBody:
        description: Request for performing an autocomplete search
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/items-search-AutocompleteRequest"
      responses:
        "200":
          $ref: "#/components/responses/items-search-AutocompleteSearchResponse200"
        "500":
          description: Service not available
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/items-search-Error"
      x-snr-doc-urls:
        - /api-reference/ai-search#tag/Search/operation/SearchAutocompletePost
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/search/v2/indices/%7BindexId%7D/autocomplete \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"query":"string","page":0,"limit":10,"sortBy":"string","ordering":"desc","includeMeta":true,"clientUUID":"string","sortByMetric":"TransactionsPopularity","sortByGeoPoints":"34.052235,-118.243685","filterGeoPoints":["34.052235,-118.243685","15.0,65.0"],"filterAroundRadius":2000,"filters":"string","facets":["string"],"customFilteredFacets":{"brand":"price > 100","price":"brand == foo"},"facetsSize":2000,"maxValuesPerFacet":50,"caseSensitiveFacetValues":false,"includeFacets":"all","facetsOrderBy":"coverage","context":["mobile","listing"],"displayAttributes":["title","price"],"distinctFilter":{"attribute":"string","maxNumItems":1,"levelRangeModifier":0},"ignoreQueryRules":false,"excludeQueryRules":[2,5],"params":{"source":"mobile"},"disableQueryClassification":false,"disableDynamicReranker":false}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"query\":\"string\",\"page\":0,\"limit\":10,\"sortBy\":\"string\",\"ordering\":\"desc\",\"includeMeta\":true,\"clientUUID\":\"string\",\"sortByMetric\":\"TransactionsPopularity\",\"sortByGeoPoints\":\"34.052235,-118.243685\",\"filterGeoPoints\":[\"34.052235,-118.243685\",\"15.0,65.0\"],\"filterAroundRadius\":2000,\"filters\":\"string\",\"facets\":[\"string\"],\"customFilteredFacets\":{\"brand\":\"price > 100\",\"price\":\"brand == foo\"},\"facetsSize\":2000,\"maxValuesPerFacet\":50,\"caseSensitiveFacetValues\":false,\"includeFacets\":\"all\",\"facetsOrderBy\":\"coverage\",\"context\":[\"mobile\",\"listing\"],\"displayAttributes\":[\"title\",\"price\"],\"distinctFilter\":{\"attribute\":\"string\",\"maxNumItems\":1,\"levelRangeModifier\":0},\"ignoreQueryRules\":false,\"excludeQueryRules\":[2,5],\"params\":{\"source\":\"mobile\"},\"disableQueryClassification\":false,\"disableDynamicReranker\":false}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/search/v2/indices/%7BindexId%7D/autocomplete", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "query": "string",
              "page": 0,
              "limit": 10,
              "sortBy": "string",
              "ordering": "desc",
              "includeMeta": true,
              "clientUUID": "string",
              "sortByMetric": "TransactionsPopularity",
              "sortByGeoPoints": "34.052235,-118.243685",
              "filterGeoPoints": [
                "34.052235,-118.243685",
                "15.0,65.0"
              ],
              "filterAroundRadius": 2000,
              "filters": "string",
              "facets": [
                "string"
              ],
              "customFilteredFacets": {
                "brand": "price > 100",
                "price": "brand == foo"
              },
              "facetsSize": 2000,
              "maxValuesPerFacet": 50,
              "caseSensitiveFacetValues": false,
              "includeFacets": "all",
              "facetsOrderBy": "coverage",
              "context": [
                "mobile",
                "listing"
              ],
              "displayAttributes": [
                "title",
                "price"
              ],
              "distinctFilter": {
                "attribute": "string",
                "maxNumItems": 1,
                "levelRangeModifier": 0
              },
              "ignoreQueryRules": false,
              "excludeQueryRules": [
                2,
                5
              ],
              "params": {
                "source": "mobile"
              },
              "disableQueryClassification": false,
              "disableDynamicReranker": false
            });

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("POST", "https://api.synerise.com/search/v2/indices/%7BindexId%7D/autocomplete");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/search/v2/indices/%7BindexId%7D/autocomplete",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify({
              query: 'string',
              page: 0,
              limit: 10,
              sortBy: 'string',
              ordering: 'desc',
              includeMeta: true,
              clientUUID: 'string',
              sortByMetric: 'TransactionsPopularity',
              sortByGeoPoints: '34.052235,-118.243685',
              filterGeoPoints: ['34.052235,-118.243685', '15.0,65.0'],
              filterAroundRadius: 2000,
              filters: 'string',
              facets: ['string'],
              customFilteredFacets: {brand: 'price > 100', price: 'brand == foo'},
              facetsSize: 2000,
              maxValuesPerFacet: 50,
              caseSensitiveFacetValues: false,
              includeFacets: 'all',
              facetsOrderBy: 'coverage',
              context: ['mobile', 'listing'],
              displayAttributes: ['title', 'price'],
              distinctFilter: {attribute: 'string', maxNumItems: 1, levelRangeModifier: 0},
              ignoreQueryRules: false,
              excludeQueryRules: [2, 5],
              params: {source: 'mobile'},
              disableQueryClassification: false,
              disableDynamicReranker: false
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/search/v2/indices/%7BindexId%7D/autocomplete');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"query":"string","page":0,"limit":10,"sortBy":"string","ordering":"desc","includeMeta":true,"clientUUID":"string","sortByMetric":"TransactionsPopularity","sortByGeoPoints":"34.052235,-118.243685","filterGeoPoints":["34.052235,-118.243685","15.0,65.0"],"filterAroundRadius":2000,"filters":"string","facets":["string"],"customFilteredFacets":{"brand":"price > 100","price":"brand == foo"},"facetsSize":2000,"maxValuesPerFacet":50,"caseSensitiveFacetValues":false,"includeFacets":"all","facetsOrderBy":"coverage","context":["mobile","listing"],"displayAttributes":["title","price"],"distinctFilter":{"attribute":"string","maxNumItems":1,"levelRangeModifier":0},"ignoreQueryRules":false,"excludeQueryRules":[2,5],"params":{"source":"mobile"},"disableQueryClassification":false,"disableDynamicReranker":false}');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/search/v2/indices/%7BindexId%7D/autocomplete")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"query\":\"string\",\"page\":0,\"limit\":10,\"sortBy\":\"string\",\"ordering\":\"desc\",\"includeMeta\":true,\"clientUUID\":\"string\",\"sortByMetric\":\"TransactionsPopularity\",\"sortByGeoPoints\":\"34.052235,-118.243685\",\"filterGeoPoints\":[\"34.052235,-118.243685\",\"15.0,65.0\"],\"filterAroundRadius\":2000,\"filters\":\"string\",\"facets\":[\"string\"],\"customFilteredFacets\":{\"brand\":\"price > 100\",\"price\":\"brand == foo\"},\"facetsSize\":2000,\"maxValuesPerFacet\":50,\"caseSensitiveFacetValues\":false,\"includeFacets\":\"all\",\"facetsOrderBy\":\"coverage\",\"context\":[\"mobile\",\"listing\"],\"displayAttributes\":[\"title\",\"price\"],\"distinctFilter\":{\"attribute\":\"string\",\"maxNumItems\":1,\"levelRangeModifier\":0},\"ignoreQueryRules\":false,\"excludeQueryRules\":[2,5],\"params\":{\"source\":\"mobile\"},\"disableQueryClassification\":false,\"disableDynamicReranker\":false}")
              .asString();
  /search/v2/indices/{indexId}/autocomplete/explain:
    get:
      summary: Explained autocomplete items search
      description: |
        Retrieves items that match a query from a search index or a suggestion index. The results can be filtered and sorted. The results of this search type are not cached. The response contains an explanation of the factors that influenced the result.

        ---

        **API consumers:** <span title="Deprecated">AI API key (legacy)</span>, <a href="/docs/settings/tool/tracking_codes" target="_blank" rel="noopener" title="Pass your tracker key in the request header">Web SDK Tracker</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>

        **API key permission required:** `ITEMS_SEARCH_SEARCH_READ`
      operationId: SearchAutocompleteGetWithExplanation
      tags:
        - Search
      security:
        - TrackerKey: []
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/items-search-searchQuery"
        - $ref: "#/components/parameters/items-search-inPathIndexId"
        - $ref: "#/components/parameters/items-search-clientUUID"
        - $ref: "#/components/parameters/items-search-personalize"
        - $ref: "#/components/parameters/items-search-sortByMetric"
        - $ref: "#/components/parameters/items-search-sortByGeoPoint"
        - $ref: "#/components/parameters/items-search-filterGeoPoints"
        - $ref: "#/components/parameters/items-search-filterAroundRadius"
        - $ref: "#/components/parameters/items-search-filters"
        - $ref: "#/components/parameters/items-search-facets"
        - $ref: "#/components/parameters/items-search-facetsSize"
        - $ref: "#/components/parameters/items-search-maxValuesPerFacet"
        - $ref: "#/components/parameters/items-search-caseSensitiveFacetValues"
        - $ref: "#/components/parameters/items-search-displayAttributes"
        - $ref: "#/components/parameters/items-search-context"
        - $ref: "#/components/parameters/items-search-includeFacets"
        - $ref: "#/components/parameters/items-search-facetsOrderBy"
        - $ref: "#/components/parameters/items-search-paginationPage"
        - $ref: "#/components/parameters/items-search-paginationLimit"
        - $ref: "#/components/parameters/items-search-paginationSortBy"
        - $ref: "#/components/parameters/items-search-paginationOrdering"
        - $ref: "#/components/parameters/items-search-paginationIncludeMeta"
        - $ref: "#/components/parameters/items-search-distinctFilter"
        - $ref: "#/components/parameters/items-search-ignoreQueryRules"
        - $ref: "#/components/parameters/items-search-excludeQueryRules"
        - $ref: "#/components/parameters/items-search-crossWorkspaceModeEnabled"
        - $ref: "#/components/parameters/items-search-params"
        - $ref: "#/components/parameters/items-search-disableQueryClassification"
        - $ref: "#/components/parameters/items-search-disableDynamicReranker"
      responses:
        "200":
          $ref: "#/components/responses/items-search-AutocompleteSearchResponse200WithExplanation"
        "500":
          description: Service not available
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/items-search-Error"
      x-snr-doc-urls:
        - /api-reference/ai-search#tag/Search/operation/SearchAutocompleteGetWithExplanation
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/search/v2/indices/%7BindexId%7D/autocomplete/explain?query=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&personalize=SOME_BOOLEAN_VALUE&sortByMetric=SOME_STRING_VALUE&sortByGeoPoint=34.052235%2C-118.243685&filterGeoPoints=34.052235%2C-118.243685&filterGeoPoints=15.0%2C65.0&filterAroundRadius=5000&filters=SOME_STRING_VALUE&facets=SOME_ARRAY_VALUE&facetsSize=SOME_INTEGER_VALUE&maxValuesPerFacet=SOME_INTEGER_VALUE&caseSensitiveFacetValues=SOME_BOOLEAN_VALUE&displayAttributes=title&displayAttributes=price&context=mobile&context=listing&includeFacets=SOME_STRING_VALUE&facetsOrderBy=SOME_STRING_VALUE&page=4&limit=10&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&distinctFilter=%7B%22attribute%22%3A%20%22color%22%2C%20%22maxNumItems%22%3A%203%7D&ignoreQueryRules=SOME_BOOLEAN_VALUE&excludeQueryRules=2&excludeQueryRules=5&crossWorkspaceModeEnabled=SOME_BOOLEAN_VALUE&params=source%3Amobile&disableQueryClassification=SOME_BOOLEAN_VALUE&disableDynamicReranker=SOME_BOOLEAN_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("GET", "/search/v2/indices/%7BindexId%7D/autocomplete/explain?query=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&personalize=SOME_BOOLEAN_VALUE&sortByMetric=SOME_STRING_VALUE&sortByGeoPoint=34.052235%2C-118.243685&filterGeoPoints=34.052235%2C-118.243685&filterGeoPoints=15.0%2C65.0&filterAroundRadius=5000&filters=SOME_STRING_VALUE&facets=SOME_ARRAY_VALUE&facetsSize=SOME_INTEGER_VALUE&maxValuesPerFacet=SOME_INTEGER_VALUE&caseSensitiveFacetValues=SOME_BOOLEAN_VALUE&displayAttributes=title&displayAttributes=price&context=mobile&context=listing&includeFacets=SOME_STRING_VALUE&facetsOrderBy=SOME_STRING_VALUE&page=4&limit=10&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&distinctFilter=%7B%22attribute%22%3A%20%22color%22%2C%20%22maxNumItems%22%3A%203%7D&ignoreQueryRules=SOME_BOOLEAN_VALUE&excludeQueryRules=2&excludeQueryRules=5&crossWorkspaceModeEnabled=SOME_BOOLEAN_VALUE&params=source%3Amobile&disableQueryClassification=SOME_BOOLEAN_VALUE&disableDynamicReranker=SOME_BOOLEAN_VALUE", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("GET", "https://api.synerise.com/search/v2/indices/%7BindexId%7D/autocomplete/explain?query=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&personalize=SOME_BOOLEAN_VALUE&sortByMetric=SOME_STRING_VALUE&sortByGeoPoint=34.052235%2C-118.243685&filterGeoPoints=34.052235%2C-118.243685&filterGeoPoints=15.0%2C65.0&filterAroundRadius=5000&filters=SOME_STRING_VALUE&facets=SOME_ARRAY_VALUE&facetsSize=SOME_INTEGER_VALUE&maxValuesPerFacet=SOME_INTEGER_VALUE&caseSensitiveFacetValues=SOME_BOOLEAN_VALUE&displayAttributes=title&displayAttributes=price&context=mobile&context=listing&includeFacets=SOME_STRING_VALUE&facetsOrderBy=SOME_STRING_VALUE&page=4&limit=10&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&distinctFilter=%7B%22attribute%22%3A%20%22color%22%2C%20%22maxNumItems%22%3A%203%7D&ignoreQueryRules=SOME_BOOLEAN_VALUE&excludeQueryRules=2&excludeQueryRules=5&crossWorkspaceModeEnabled=SOME_BOOLEAN_VALUE&params=source%3Amobile&disableQueryClassification=SOME_BOOLEAN_VALUE&disableDynamicReranker=SOME_BOOLEAN_VALUE");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/search/v2/indices/%7BindexId%7D/autocomplete/explain?query=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&personalize=SOME_BOOLEAN_VALUE&sortByMetric=SOME_STRING_VALUE&sortByGeoPoint=34.052235%2C-118.243685&filterGeoPoints=34.052235%2C-118.243685&filterGeoPoints=15.0%2C65.0&filterAroundRadius=5000&filters=SOME_STRING_VALUE&facets=SOME_ARRAY_VALUE&facetsSize=SOME_INTEGER_VALUE&maxValuesPerFacet=SOME_INTEGER_VALUE&caseSensitiveFacetValues=SOME_BOOLEAN_VALUE&displayAttributes=title&displayAttributes=price&context=mobile&context=listing&includeFacets=SOME_STRING_VALUE&facetsOrderBy=SOME_STRING_VALUE&page=4&limit=10&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&distinctFilter=%7B%22attribute%22%3A%20%22color%22%2C%20%22maxNumItems%22%3A%203%7D&ignoreQueryRules=SOME_BOOLEAN_VALUE&excludeQueryRules=2&excludeQueryRules=5&crossWorkspaceModeEnabled=SOME_BOOLEAN_VALUE&params=source%3Amobile&disableQueryClassification=SOME_BOOLEAN_VALUE&disableDynamicReranker=SOME_BOOLEAN_VALUE",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/search/v2/indices/%7BindexId%7D/autocomplete/explain');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'query' => 'SOME_STRING_VALUE',
              'clientUUID' => 'SOME_STRING_VALUE',
              'personalize' => 'SOME_BOOLEAN_VALUE',
              'sortByMetric' => 'SOME_STRING_VALUE',
              'sortByGeoPoint' => '34.052235,-118.243685',
              'filterGeoPoints' => [
                '34.052235,-118.243685',
                '15.0,65.0'
              ],
              'filterAroundRadius' => '5000',
              'filters' => 'SOME_STRING_VALUE',
              'facets' => 'SOME_ARRAY_VALUE',
              'facetsSize' => 'SOME_INTEGER_VALUE',
              'maxValuesPerFacet' => 'SOME_INTEGER_VALUE',
              'caseSensitiveFacetValues' => 'SOME_BOOLEAN_VALUE',
              'displayAttributes' => [
                'title',
                'price'
              ],
              'context' => [
                'mobile',
                'listing'
              ],
              'includeFacets' => 'SOME_STRING_VALUE',
              'facetsOrderBy' => 'SOME_STRING_VALUE',
              'page' => '4',
              'limit' => '10',
              'sortBy' => 'SOME_STRING_VALUE',
              'ordering' => 'SOME_STRING_VALUE',
              'includeMeta' => 'SOME_BOOLEAN_VALUE',
              'distinctFilter' => '{"attribute": "color", "maxNumItems": 3}',
              'ignoreQueryRules' => 'SOME_BOOLEAN_VALUE',
              'excludeQueryRules' => [
                '2',
                '5'
              ],
              'crossWorkspaceModeEnabled' => 'SOME_BOOLEAN_VALUE',
              'params' => 'source:mobile',
              'disableQueryClassification' => 'SOME_BOOLEAN_VALUE',
              'disableDynamicReranker' => 'SOME_BOOLEAN_VALUE'
            ]);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/search/v2/indices/%7BindexId%7D/autocomplete/explain?query=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&personalize=SOME_BOOLEAN_VALUE&sortByMetric=SOME_STRING_VALUE&sortByGeoPoint=34.052235%2C-118.243685&filterGeoPoints=34.052235%2C-118.243685&filterGeoPoints=15.0%2C65.0&filterAroundRadius=5000&filters=SOME_STRING_VALUE&facets=SOME_ARRAY_VALUE&facetsSize=SOME_INTEGER_VALUE&maxValuesPerFacet=SOME_INTEGER_VALUE&caseSensitiveFacetValues=SOME_BOOLEAN_VALUE&displayAttributes=title&displayAttributes=price&context=mobile&context=listing&includeFacets=SOME_STRING_VALUE&facetsOrderBy=SOME_STRING_VALUE&page=4&limit=10&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&distinctFilter=%7B%22attribute%22%3A%20%22color%22%2C%20%22maxNumItems%22%3A%203%7D&ignoreQueryRules=SOME_BOOLEAN_VALUE&excludeQueryRules=2&excludeQueryRules=5&crossWorkspaceModeEnabled=SOME_BOOLEAN_VALUE&params=source%3Amobile&disableQueryClassification=SOME_BOOLEAN_VALUE&disableDynamicReranker=SOME_BOOLEAN_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    post:
      summary: Explained autocomplete items search
      description: |
        Retrieves items that match a query from a search index or a suggestion index. The results can be filtered and sorted. The results of this search type are not cached. The response contains an explanation of the factors that influenced the result.

        ---

        **API consumers:** <span title="Deprecated">AI API key (legacy)</span>, <a href="/docs/settings/tool/tracking_codes" target="_blank" rel="noopener" title="Pass your tracker key in the request header">Web SDK Tracker</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>

        **API key permission required:** `ITEMS_SEARCH_SEARCH_READ`
      operationId: SearchAutocompletePostWithExplanation
      tags:
        - Search
      security:
        - TrackerKey: []
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/items-search-inPathIndexId"
      requestBody:
        description: Request for performing an autocomplete search with explanation
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/items-search-AutocompleteRequest"
                - type: object
                  properties:
                    crossWorkspaceMode:
                      $ref: "#/components/schemas/items-search-CrossWorkspaceMode"
      responses:
        "200":
          $ref: "#/components/responses/items-search-AutocompleteSearchResponse200WithExplanation"
        "500":
          description: Service not available
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/items-search-Error"
      x-snr-doc-urls:
        - /api-reference/ai-search#tag/Search/operation/SearchAutocompletePostWithExplanation
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/search/v2/indices/%7BindexId%7D/autocomplete/explain \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"query":"string","page":0,"limit":10,"sortBy":"string","ordering":"desc","includeMeta":true,"clientUUID":"string","sortByMetric":"TransactionsPopularity","sortByGeoPoints":"34.052235,-118.243685","filterGeoPoints":["34.052235,-118.243685","15.0,65.0"],"filterAroundRadius":2000,"filters":"string","facets":["string"],"customFilteredFacets":{"brand":"price > 100","price":"brand == foo"},"facetsSize":2000,"maxValuesPerFacet":50,"caseSensitiveFacetValues":false,"includeFacets":"all","facetsOrderBy":"coverage","context":["mobile","listing"],"displayAttributes":["title","price"],"distinctFilter":{"attribute":"string","maxNumItems":1,"levelRangeModifier":0},"ignoreQueryRules":false,"excludeQueryRules":[2,5],"params":{"source":"mobile"},"disableQueryClassification":false,"disableDynamicReranker":false,"crossWorkspaceMode":{"enabled":true}}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"query\":\"string\",\"page\":0,\"limit\":10,\"sortBy\":\"string\",\"ordering\":\"desc\",\"includeMeta\":true,\"clientUUID\":\"string\",\"sortByMetric\":\"TransactionsPopularity\",\"sortByGeoPoints\":\"34.052235,-118.243685\",\"filterGeoPoints\":[\"34.052235,-118.243685\",\"15.0,65.0\"],\"filterAroundRadius\":2000,\"filters\":\"string\",\"facets\":[\"string\"],\"customFilteredFacets\":{\"brand\":\"price > 100\",\"price\":\"brand == foo\"},\"facetsSize\":2000,\"maxValuesPerFacet\":50,\"caseSensitiveFacetValues\":false,\"includeFacets\":\"all\",\"facetsOrderBy\":\"coverage\",\"context\":[\"mobile\",\"listing\"],\"displayAttributes\":[\"title\",\"price\"],\"distinctFilter\":{\"attribute\":\"string\",\"maxNumItems\":1,\"levelRangeModifier\":0},\"ignoreQueryRules\":false,\"excludeQueryRules\":[2,5],\"params\":{\"source\":\"mobile\"},\"disableQueryClassification\":false,\"disableDynamicReranker\":false,\"crossWorkspaceMode\":{\"enabled\":true}}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/search/v2/indices/%7BindexId%7D/autocomplete/explain", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "query": "string",
              "page": 0,
              "limit": 10,
              "sortBy": "string",
              "ordering": "desc",
              "includeMeta": true,
              "clientUUID": "string",
              "sortByMetric": "TransactionsPopularity",
              "sortByGeoPoints": "34.052235,-118.243685",
              "filterGeoPoints": [
                "34.052235,-118.243685",
                "15.0,65.0"
              ],
              "filterAroundRadius": 2000,
              "filters": "string",
              "facets": [
                "string"
              ],
              "customFilteredFacets": {
                "brand": "price > 100",
                "price": "brand == foo"
              },
              "facetsSize": 2000,
              "maxValuesPerFacet": 50,
              "caseSensitiveFacetValues": false,
              "includeFacets": "all",
              "facetsOrderBy": "coverage",
              "context": [
                "mobile",
                "listing"
              ],
              "displayAttributes": [
                "title",
                "price"
              ],
              "distinctFilter": {
                "attribute": "string",
                "maxNumItems": 1,
                "levelRangeModifier": 0
              },
              "ignoreQueryRules": false,
              "excludeQueryRules": [
                2,
                5
              ],
              "params": {
                "source": "mobile"
              },
              "disableQueryClassification": false,
              "disableDynamicReranker": false,
              "crossWorkspaceMode": {
                "enabled": true
              }
            });

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("POST", "https://api.synerise.com/search/v2/indices/%7BindexId%7D/autocomplete/explain");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/search/v2/indices/%7BindexId%7D/autocomplete/explain",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify({
              query: 'string',
              page: 0,
              limit: 10,
              sortBy: 'string',
              ordering: 'desc',
              includeMeta: true,
              clientUUID: 'string',
              sortByMetric: 'TransactionsPopularity',
              sortByGeoPoints: '34.052235,-118.243685',
              filterGeoPoints: ['34.052235,-118.243685', '15.0,65.0'],
              filterAroundRadius: 2000,
              filters: 'string',
              facets: ['string'],
              customFilteredFacets: {brand: 'price > 100', price: 'brand == foo'},
              facetsSize: 2000,
              maxValuesPerFacet: 50,
              caseSensitiveFacetValues: false,
              includeFacets: 'all',
              facetsOrderBy: 'coverage',
              context: ['mobile', 'listing'],
              displayAttributes: ['title', 'price'],
              distinctFilter: {attribute: 'string', maxNumItems: 1, levelRangeModifier: 0},
              ignoreQueryRules: false,
              excludeQueryRules: [2, 5],
              params: {source: 'mobile'},
              disableQueryClassification: false,
              disableDynamicReranker: false,
              crossWorkspaceMode: {enabled: true}
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/search/v2/indices/%7BindexId%7D/autocomplete/explain');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"query":"string","page":0,"limit":10,"sortBy":"string","ordering":"desc","includeMeta":true,"clientUUID":"string","sortByMetric":"TransactionsPopularity","sortByGeoPoints":"34.052235,-118.243685","filterGeoPoints":["34.052235,-118.243685","15.0,65.0"],"filterAroundRadius":2000,"filters":"string","facets":["string"],"customFilteredFacets":{"brand":"price > 100","price":"brand == foo"},"facetsSize":2000,"maxValuesPerFacet":50,"caseSensitiveFacetValues":false,"includeFacets":"all","facetsOrderBy":"coverage","context":["mobile","listing"],"displayAttributes":["title","price"],"distinctFilter":{"attribute":"string","maxNumItems":1,"levelRangeModifier":0},"ignoreQueryRules":false,"excludeQueryRules":[2,5],"params":{"source":"mobile"},"disableQueryClassification":false,"disableDynamicReranker":false,"crossWorkspaceMode":{"enabled":true}}');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/search/v2/indices/%7BindexId%7D/autocomplete/explain")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"query\":\"string\",\"page\":0,\"limit\":10,\"sortBy\":\"string\",\"ordering\":\"desc\",\"includeMeta\":true,\"clientUUID\":\"string\",\"sortByMetric\":\"TransactionsPopularity\",\"sortByGeoPoints\":\"34.052235,-118.243685\",\"filterGeoPoints\":[\"34.052235,-118.243685\",\"15.0,65.0\"],\"filterAroundRadius\":2000,\"filters\":\"string\",\"facets\":[\"string\"],\"customFilteredFacets\":{\"brand\":\"price > 100\",\"price\":\"brand == foo\"},\"facetsSize\":2000,\"maxValuesPerFacet\":50,\"caseSensitiveFacetValues\":false,\"includeFacets\":\"all\",\"facetsOrderBy\":\"coverage\",\"context\":[\"mobile\",\"listing\"],\"displayAttributes\":[\"title\",\"price\"],\"distinctFilter\":{\"attribute\":\"string\",\"maxNumItems\":1,\"levelRangeModifier\":0},\"ignoreQueryRules\":false,\"excludeQueryRules\":[2,5],\"params\":{\"source\":\"mobile\"},\"disableQueryClassification\":false,\"disableDynamicReranker\":false,\"crossWorkspaceMode\":{\"enabled\":true}}")
              .asString();
  /search/v2/indices/{indexId}/list:
    get:
      summary: Items listing
      description: |
        Retrieves item listing, which is a search without a query. The results can be filtered and sorted.

        ---

        **API consumers:** <span title="Deprecated">AI API key (legacy)</span>, <a href="/docs/settings/tool/tracking_codes" target="_blank" rel="noopener" title="Pass your tracker key in the request header">Web SDK Tracker</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>

        **API key permission required:** `ITEMS_SEARCH_SEARCH_READ`
      operationId: ListingGet
      tags:
        - Listing
      security:
        - TrackerKey: []
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/items-search-inPathIndexId"
        - $ref: "#/components/parameters/items-search-clientUUID"
        - $ref: "#/components/parameters/items-search-personalize"
        - $ref: "#/components/parameters/items-search-correlationId"
        - $ref: "#/components/parameters/items-search-searchId"
        - $ref: "#/components/parameters/items-search-sortByMetric"
        - $ref: "#/components/parameters/items-search-sortByGeoPoint"
        - $ref: "#/components/parameters/items-search-filterGeoPoints"
        - $ref: "#/components/parameters/items-search-filterAroundRadius"
        - $ref: "#/components/parameters/items-search-filters"
        - $ref: "#/components/parameters/items-search-facets"
        - $ref: "#/components/parameters/items-search-facetsSize"
        - $ref: "#/components/parameters/items-search-maxValuesPerFacet"
        - $ref: "#/components/parameters/items-search-caseSensitiveFacetValues"
        - $ref: "#/components/parameters/items-search-displayAttributes"
        - $ref: "#/components/parameters/items-search-context"
        - $ref: "#/components/parameters/items-search-includeFacets"
        - $ref: "#/components/parameters/items-search-facetsOrderBy"
        - $ref: "#/components/parameters/items-search-paginationPage"
        - $ref: "#/components/parameters/items-search-paginationLimit"
        - $ref: "#/components/parameters/items-search-paginationSortBy"
        - $ref: "#/components/parameters/items-search-paginationOrdering"
        - $ref: "#/components/parameters/items-search-paginationIncludeMeta"
        - $ref: "#/components/parameters/items-search-distinctFilter"
        - $ref: "#/components/parameters/items-search-ignoreQueryRules"
        - $ref: "#/components/parameters/items-search-excludeQueryRules"
        - $ref: "#/components/parameters/items-search-params"
      responses:
        "200":
          $ref: "#/components/responses/items-search-ListingResponse200"
        "500":
          description: Service not available
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/items-search-Error"
      x-snr-doc-urls:
        - /api-reference/ai-search#tag/Listing/operation/ListingGet
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/search/v2/indices/%7BindexId%7D/list?clientUUID=SOME_STRING_VALUE&personalize=SOME_BOOLEAN_VALUE&correlationId=SOME_STRING_VALUE&searchId=SOME_STRING_VALUE&sortByMetric=SOME_STRING_VALUE&sortByGeoPoint=34.052235%2C-118.243685&filterGeoPoints=34.052235%2C-118.243685&filterGeoPoints=15.0%2C65.0&filterAroundRadius=5000&filters=SOME_STRING_VALUE&facets=SOME_ARRAY_VALUE&facetsSize=SOME_INTEGER_VALUE&maxValuesPerFacet=SOME_INTEGER_VALUE&caseSensitiveFacetValues=SOME_BOOLEAN_VALUE&displayAttributes=title&displayAttributes=price&context=mobile&context=listing&includeFacets=SOME_STRING_VALUE&facetsOrderBy=SOME_STRING_VALUE&page=4&limit=10&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&distinctFilter=%7B%22attribute%22%3A%20%22color%22%2C%20%22maxNumItems%22%3A%203%7D&ignoreQueryRules=SOME_BOOLEAN_VALUE&excludeQueryRules=2&excludeQueryRules=5&params=source%3Amobile' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("GET", "/search/v2/indices/%7BindexId%7D/list?clientUUID=SOME_STRING_VALUE&personalize=SOME_BOOLEAN_VALUE&correlationId=SOME_STRING_VALUE&searchId=SOME_STRING_VALUE&sortByMetric=SOME_STRING_VALUE&sortByGeoPoint=34.052235%2C-118.243685&filterGeoPoints=34.052235%2C-118.243685&filterGeoPoints=15.0%2C65.0&filterAroundRadius=5000&filters=SOME_STRING_VALUE&facets=SOME_ARRAY_VALUE&facetsSize=SOME_INTEGER_VALUE&maxValuesPerFacet=SOME_INTEGER_VALUE&caseSensitiveFacetValues=SOME_BOOLEAN_VALUE&displayAttributes=title&displayAttributes=price&context=mobile&context=listing&includeFacets=SOME_STRING_VALUE&facetsOrderBy=SOME_STRING_VALUE&page=4&limit=10&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&distinctFilter=%7B%22attribute%22%3A%20%22color%22%2C%20%22maxNumItems%22%3A%203%7D&ignoreQueryRules=SOME_BOOLEAN_VALUE&excludeQueryRules=2&excludeQueryRules=5&params=source%3Amobile", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("GET", "https://api.synerise.com/search/v2/indices/%7BindexId%7D/list?clientUUID=SOME_STRING_VALUE&personalize=SOME_BOOLEAN_VALUE&correlationId=SOME_STRING_VALUE&searchId=SOME_STRING_VALUE&sortByMetric=SOME_STRING_VALUE&sortByGeoPoint=34.052235%2C-118.243685&filterGeoPoints=34.052235%2C-118.243685&filterGeoPoints=15.0%2C65.0&filterAroundRadius=5000&filters=SOME_STRING_VALUE&facets=SOME_ARRAY_VALUE&facetsSize=SOME_INTEGER_VALUE&maxValuesPerFacet=SOME_INTEGER_VALUE&caseSensitiveFacetValues=SOME_BOOLEAN_VALUE&displayAttributes=title&displayAttributes=price&context=mobile&context=listing&includeFacets=SOME_STRING_VALUE&facetsOrderBy=SOME_STRING_VALUE&page=4&limit=10&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&distinctFilter=%7B%22attribute%22%3A%20%22color%22%2C%20%22maxNumItems%22%3A%203%7D&ignoreQueryRules=SOME_BOOLEAN_VALUE&excludeQueryRules=2&excludeQueryRules=5&params=source%3Amobile");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/search/v2/indices/%7BindexId%7D/list?clientUUID=SOME_STRING_VALUE&personalize=SOME_BOOLEAN_VALUE&correlationId=SOME_STRING_VALUE&searchId=SOME_STRING_VALUE&sortByMetric=SOME_STRING_VALUE&sortByGeoPoint=34.052235%2C-118.243685&filterGeoPoints=34.052235%2C-118.243685&filterGeoPoints=15.0%2C65.0&filterAroundRadius=5000&filters=SOME_STRING_VALUE&facets=SOME_ARRAY_VALUE&facetsSize=SOME_INTEGER_VALUE&maxValuesPerFacet=SOME_INTEGER_VALUE&caseSensitiveFacetValues=SOME_BOOLEAN_VALUE&displayAttributes=title&displayAttributes=price&context=mobile&context=listing&includeFacets=SOME_STRING_VALUE&facetsOrderBy=SOME_STRING_VALUE&page=4&limit=10&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&distinctFilter=%7B%22attribute%22%3A%20%22color%22%2C%20%22maxNumItems%22%3A%203%7D&ignoreQueryRules=SOME_BOOLEAN_VALUE&excludeQueryRules=2&excludeQueryRules=5&params=source%3Amobile",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/search/v2/indices/%7BindexId%7D/list');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'clientUUID' => 'SOME_STRING_VALUE',
              'personalize' => 'SOME_BOOLEAN_VALUE',
              'correlationId' => 'SOME_STRING_VALUE',
              'searchId' => 'SOME_STRING_VALUE',
              'sortByMetric' => 'SOME_STRING_VALUE',
              'sortByGeoPoint' => '34.052235,-118.243685',
              'filterGeoPoints' => [
                '34.052235,-118.243685',
                '15.0,65.0'
              ],
              'filterAroundRadius' => '5000',
              'filters' => 'SOME_STRING_VALUE',
              'facets' => 'SOME_ARRAY_VALUE',
              'facetsSize' => 'SOME_INTEGER_VALUE',
              'maxValuesPerFacet' => 'SOME_INTEGER_VALUE',
              'caseSensitiveFacetValues' => 'SOME_BOOLEAN_VALUE',
              'displayAttributes' => [
                'title',
                'price'
              ],
              'context' => [
                'mobile',
                'listing'
              ],
              'includeFacets' => 'SOME_STRING_VALUE',
              'facetsOrderBy' => 'SOME_STRING_VALUE',
              'page' => '4',
              'limit' => '10',
              'sortBy' => 'SOME_STRING_VALUE',
              'ordering' => 'SOME_STRING_VALUE',
              'includeMeta' => 'SOME_BOOLEAN_VALUE',
              'distinctFilter' => '{"attribute": "color", "maxNumItems": 3}',
              'ignoreQueryRules' => 'SOME_BOOLEAN_VALUE',
              'excludeQueryRules' => [
                '2',
                '5'
              ],
              'params' => 'source:mobile'
            ]);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/search/v2/indices/%7BindexId%7D/list?clientUUID=SOME_STRING_VALUE&personalize=SOME_BOOLEAN_VALUE&correlationId=SOME_STRING_VALUE&searchId=SOME_STRING_VALUE&sortByMetric=SOME_STRING_VALUE&sortByGeoPoint=34.052235%2C-118.243685&filterGeoPoints=34.052235%2C-118.243685&filterGeoPoints=15.0%2C65.0&filterAroundRadius=5000&filters=SOME_STRING_VALUE&facets=SOME_ARRAY_VALUE&facetsSize=SOME_INTEGER_VALUE&maxValuesPerFacet=SOME_INTEGER_VALUE&caseSensitiveFacetValues=SOME_BOOLEAN_VALUE&displayAttributes=title&displayAttributes=price&context=mobile&context=listing&includeFacets=SOME_STRING_VALUE&facetsOrderBy=SOME_STRING_VALUE&page=4&limit=10&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&distinctFilter=%7B%22attribute%22%3A%20%22color%22%2C%20%22maxNumItems%22%3A%203%7D&ignoreQueryRules=SOME_BOOLEAN_VALUE&excludeQueryRules=2&excludeQueryRules=5&params=source%3Amobile")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    post:
      summary: Items listing
      description: |
        Retrieves item listing, which is a search without a query. The results can be filtered and sorted.

        ---

        **API consumers:** <span title="Deprecated">AI API key (legacy)</span>, <a href="/docs/settings/tool/tracking_codes" target="_blank" rel="noopener" title="Pass your tracker key in the request header">Web SDK Tracker</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>

        **API key permission required:** `ITEMS_SEARCH_SEARCH_READ`
      operationId: ListingPost
      tags:
        - Listing
      security:
        - TrackerKey: []
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/items-search-inPathIndexId"
      requestBody:
        description: Request for item listing
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/items-search-ListingRequest"
      responses:
        "200":
          $ref: "#/components/responses/items-search-ListingResponse200"
        "500":
          description: Service not available
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/items-search-Error"
      x-snr-doc-urls:
        - /api-reference/ai-search#tag/Listing/operation/ListingPost
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/search/v2/indices/%7BindexId%7D/list \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"page":0,"limit":10,"sortBy":"string","ordering":"desc","includeMeta":true,"clientUUID":"string","personalize":true,"correlationId":"string","searchId":"string","sortByMetric":"TransactionsPopularity","sortByGeoPoints":"34.052235,-118.243685","filterGeoPoints":["34.052235,-118.243685","15.0,65.0"],"filterAroundRadius":2000,"filters":"string","facets":["string"],"customFilteredFacets":{"brand":"price > 100","price":"brand == foo"},"facetsSize":2000,"maxValuesPerFacet":50,"caseSensitiveFacetValues":false,"includeFacets":"all","facetsOrderBy":"coverage","context":["mobile","listing"],"displayAttributes":["title","price"],"distinctFilter":{"attribute":"string","maxNumItems":1,"levelRangeModifier":0},"ignoreQueryRules":false,"excludeQueryRules":[2,5],"params":{"source":"mobile"}}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"page\":0,\"limit\":10,\"sortBy\":\"string\",\"ordering\":\"desc\",\"includeMeta\":true,\"clientUUID\":\"string\",\"personalize\":true,\"correlationId\":\"string\",\"searchId\":\"string\",\"sortByMetric\":\"TransactionsPopularity\",\"sortByGeoPoints\":\"34.052235,-118.243685\",\"filterGeoPoints\":[\"34.052235,-118.243685\",\"15.0,65.0\"],\"filterAroundRadius\":2000,\"filters\":\"string\",\"facets\":[\"string\"],\"customFilteredFacets\":{\"brand\":\"price > 100\",\"price\":\"brand == foo\"},\"facetsSize\":2000,\"maxValuesPerFacet\":50,\"caseSensitiveFacetValues\":false,\"includeFacets\":\"all\",\"facetsOrderBy\":\"coverage\",\"context\":[\"mobile\",\"listing\"],\"displayAttributes\":[\"title\",\"price\"],\"distinctFilter\":{\"attribute\":\"string\",\"maxNumItems\":1,\"levelRangeModifier\":0},\"ignoreQueryRules\":false,\"excludeQueryRules\":[2,5],\"params\":{\"source\":\"mobile\"}}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/search/v2/indices/%7BindexId%7D/list", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "page": 0,
              "limit": 10,
              "sortBy": "string",
              "ordering": "desc",
              "includeMeta": true,
              "clientUUID": "string",
              "personalize": true,
              "correlationId": "string",
              "searchId": "string",
              "sortByMetric": "TransactionsPopularity",
              "sortByGeoPoints": "34.052235,-118.243685",
              "filterGeoPoints": [
                "34.052235,-118.243685",
                "15.0,65.0"
              ],
              "filterAroundRadius": 2000,
              "filters": "string",
              "facets": [
                "string"
              ],
              "customFilteredFacets": {
                "brand": "price > 100",
                "price": "brand == foo"
              },
              "facetsSize": 2000,
              "maxValuesPerFacet": 50,
              "caseSensitiveFacetValues": false,
              "includeFacets": "all",
              "facetsOrderBy": "coverage",
              "context": [
                "mobile",
                "listing"
              ],
              "displayAttributes": [
                "title",
                "price"
              ],
              "distinctFilter": {
                "attribute": "string",
                "maxNumItems": 1,
                "levelRangeModifier": 0
              },
              "ignoreQueryRules": false,
              "excludeQueryRules": [
                2,
                5
              ],
              "params": {
                "source": "mobile"
              }
            });

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("POST", "https://api.synerise.com/search/v2/indices/%7BindexId%7D/list");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/search/v2/indices/%7BindexId%7D/list",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify({
              page: 0,
              limit: 10,
              sortBy: 'string',
              ordering: 'desc',
              includeMeta: true,
              clientUUID: 'string',
              personalize: true,
              correlationId: 'string',
              searchId: 'string',
              sortByMetric: 'TransactionsPopularity',
              sortByGeoPoints: '34.052235,-118.243685',
              filterGeoPoints: ['34.052235,-118.243685', '15.0,65.0'],
              filterAroundRadius: 2000,
              filters: 'string',
              facets: ['string'],
              customFilteredFacets: {brand: 'price > 100', price: 'brand == foo'},
              facetsSize: 2000,
              maxValuesPerFacet: 50,
              caseSensitiveFacetValues: false,
              includeFacets: 'all',
              facetsOrderBy: 'coverage',
              context: ['mobile', 'listing'],
              displayAttributes: ['title', 'price'],
              distinctFilter: {attribute: 'string', maxNumItems: 1, levelRangeModifier: 0},
              ignoreQueryRules: false,
              excludeQueryRules: [2, 5],
              params: {source: 'mobile'}
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/search/v2/indices/%7BindexId%7D/list');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"page":0,"limit":10,"sortBy":"string","ordering":"desc","includeMeta":true,"clientUUID":"string","personalize":true,"correlationId":"string","searchId":"string","sortByMetric":"TransactionsPopularity","sortByGeoPoints":"34.052235,-118.243685","filterGeoPoints":["34.052235,-118.243685","15.0,65.0"],"filterAroundRadius":2000,"filters":"string","facets":["string"],"customFilteredFacets":{"brand":"price > 100","price":"brand == foo"},"facetsSize":2000,"maxValuesPerFacet":50,"caseSensitiveFacetValues":false,"includeFacets":"all","facetsOrderBy":"coverage","context":["mobile","listing"],"displayAttributes":["title","price"],"distinctFilter":{"attribute":"string","maxNumItems":1,"levelRangeModifier":0},"ignoreQueryRules":false,"excludeQueryRules":[2,5],"params":{"source":"mobile"}}');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/search/v2/indices/%7BindexId%7D/list")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"page\":0,\"limit\":10,\"sortBy\":\"string\",\"ordering\":\"desc\",\"includeMeta\":true,\"clientUUID\":\"string\",\"personalize\":true,\"correlationId\":\"string\",\"searchId\":\"string\",\"sortByMetric\":\"TransactionsPopularity\",\"sortByGeoPoints\":\"34.052235,-118.243685\",\"filterGeoPoints\":[\"34.052235,-118.243685\",\"15.0,65.0\"],\"filterAroundRadius\":2000,\"filters\":\"string\",\"facets\":[\"string\"],\"customFilteredFacets\":{\"brand\":\"price > 100\",\"price\":\"brand == foo\"},\"facetsSize\":2000,\"maxValuesPerFacet\":50,\"caseSensitiveFacetValues\":false,\"includeFacets\":\"all\",\"facetsOrderBy\":\"coverage\",\"context\":[\"mobile\",\"listing\"],\"displayAttributes\":[\"title\",\"price\"],\"distinctFilter\":{\"attribute\":\"string\",\"maxNumItems\":1,\"levelRangeModifier\":0},\"ignoreQueryRules\":false,\"excludeQueryRules\":[2,5],\"params\":{\"source\":\"mobile\"}}")
              .asString();
  /search/v2/indices/{indexId}/list/explain:
    get:
      summary: Explained items listing
      description: |
        Retrieves item listing, which is a search without a query. The results can be filtered and sorted. The response contains an explanation of the factors that influenced the result.

        ---

        **API consumers:** <span title="Deprecated">AI API key (legacy)</span>, <a href="/docs/settings/tool/tracking_codes" target="_blank" rel="noopener" title="Pass your tracker key in the request header">Web SDK Tracker</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>

        **API key permission required:** `ITEMS_SEARCH_SEARCH_READ`
      operationId: ListingGetWithExplanation
      tags:
        - Listing
      security:
        - TrackerKey: []
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/items-search-inPathIndexId"
        - $ref: "#/components/parameters/items-search-clientUUID"
        - $ref: "#/components/parameters/items-search-personalize"
        - $ref: "#/components/parameters/items-search-correlationId"
        - $ref: "#/components/parameters/items-search-searchId"
        - $ref: "#/components/parameters/items-search-sortByMetric"
        - $ref: "#/components/parameters/items-search-sortByGeoPoint"
        - $ref: "#/components/parameters/items-search-filterGeoPoints"
        - $ref: "#/components/parameters/items-search-filterAroundRadius"
        - $ref: "#/components/parameters/items-search-filters"
        - $ref: "#/components/parameters/items-search-facets"
        - $ref: "#/components/parameters/items-search-facetsSize"
        - $ref: "#/components/parameters/items-search-maxValuesPerFacet"
        - $ref: "#/components/parameters/items-search-caseSensitiveFacetValues"
        - $ref: "#/components/parameters/items-search-displayAttributes"
        - $ref: "#/components/parameters/items-search-context"
        - $ref: "#/components/parameters/items-search-includeFacets"
        - $ref: "#/components/parameters/items-search-facetsOrderBy"
        - $ref: "#/components/parameters/items-search-paginationPage"
        - $ref: "#/components/parameters/items-search-paginationLimit"
        - $ref: "#/components/parameters/items-search-paginationSortBy"
        - $ref: "#/components/parameters/items-search-paginationOrdering"
        - $ref: "#/components/parameters/items-search-paginationIncludeMeta"
        - $ref: "#/components/parameters/items-search-distinctFilter"
        - $ref: "#/components/parameters/items-search-ignoreQueryRules"
        - $ref: "#/components/parameters/items-search-excludeQueryRules"
        - $ref: "#/components/parameters/items-search-crossWorkspaceModeEnabled"
        - $ref: "#/components/parameters/items-search-params"
      responses:
        "200":
          $ref: "#/components/responses/items-search-ListingResponse200WithExplanation"
        "500":
          description: Service not available
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/items-search-Error"
      x-snr-doc-urls:
        - /api-reference/ai-search#tag/Listing/operation/ListingGetWithExplanation
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/search/v2/indices/%7BindexId%7D/list/explain?clientUUID=SOME_STRING_VALUE&personalize=SOME_BOOLEAN_VALUE&correlationId=SOME_STRING_VALUE&searchId=SOME_STRING_VALUE&sortByMetric=SOME_STRING_VALUE&sortByGeoPoint=34.052235%2C-118.243685&filterGeoPoints=34.052235%2C-118.243685&filterGeoPoints=15.0%2C65.0&filterAroundRadius=5000&filters=SOME_STRING_VALUE&facets=SOME_ARRAY_VALUE&facetsSize=SOME_INTEGER_VALUE&maxValuesPerFacet=SOME_INTEGER_VALUE&caseSensitiveFacetValues=SOME_BOOLEAN_VALUE&displayAttributes=title&displayAttributes=price&context=mobile&context=listing&includeFacets=SOME_STRING_VALUE&facetsOrderBy=SOME_STRING_VALUE&page=4&limit=10&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&distinctFilter=%7B%22attribute%22%3A%20%22color%22%2C%20%22maxNumItems%22%3A%203%7D&ignoreQueryRules=SOME_BOOLEAN_VALUE&excludeQueryRules=2&excludeQueryRules=5&crossWorkspaceModeEnabled=SOME_BOOLEAN_VALUE&params=source%3Amobile' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("GET", "/search/v2/indices/%7BindexId%7D/list/explain?clientUUID=SOME_STRING_VALUE&personalize=SOME_BOOLEAN_VALUE&correlationId=SOME_STRING_VALUE&searchId=SOME_STRING_VALUE&sortByMetric=SOME_STRING_VALUE&sortByGeoPoint=34.052235%2C-118.243685&filterGeoPoints=34.052235%2C-118.243685&filterGeoPoints=15.0%2C65.0&filterAroundRadius=5000&filters=SOME_STRING_VALUE&facets=SOME_ARRAY_VALUE&facetsSize=SOME_INTEGER_VALUE&maxValuesPerFacet=SOME_INTEGER_VALUE&caseSensitiveFacetValues=SOME_BOOLEAN_VALUE&displayAttributes=title&displayAttributes=price&context=mobile&context=listing&includeFacets=SOME_STRING_VALUE&facetsOrderBy=SOME_STRING_VALUE&page=4&limit=10&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&distinctFilter=%7B%22attribute%22%3A%20%22color%22%2C%20%22maxNumItems%22%3A%203%7D&ignoreQueryRules=SOME_BOOLEAN_VALUE&excludeQueryRules=2&excludeQueryRules=5&crossWorkspaceModeEnabled=SOME_BOOLEAN_VALUE&params=source%3Amobile", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("GET", "https://api.synerise.com/search/v2/indices/%7BindexId%7D/list/explain?clientUUID=SOME_STRING_VALUE&personalize=SOME_BOOLEAN_VALUE&correlationId=SOME_STRING_VALUE&searchId=SOME_STRING_VALUE&sortByMetric=SOME_STRING_VALUE&sortByGeoPoint=34.052235%2C-118.243685&filterGeoPoints=34.052235%2C-118.243685&filterGeoPoints=15.0%2C65.0&filterAroundRadius=5000&filters=SOME_STRING_VALUE&facets=SOME_ARRAY_VALUE&facetsSize=SOME_INTEGER_VALUE&maxValuesPerFacet=SOME_INTEGER_VALUE&caseSensitiveFacetValues=SOME_BOOLEAN_VALUE&displayAttributes=title&displayAttributes=price&context=mobile&context=listing&includeFacets=SOME_STRING_VALUE&facetsOrderBy=SOME_STRING_VALUE&page=4&limit=10&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&distinctFilter=%7B%22attribute%22%3A%20%22color%22%2C%20%22maxNumItems%22%3A%203%7D&ignoreQueryRules=SOME_BOOLEAN_VALUE&excludeQueryRules=2&excludeQueryRules=5&crossWorkspaceModeEnabled=SOME_BOOLEAN_VALUE&params=source%3Amobile");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/search/v2/indices/%7BindexId%7D/list/explain?clientUUID=SOME_STRING_VALUE&personalize=SOME_BOOLEAN_VALUE&correlationId=SOME_STRING_VALUE&searchId=SOME_STRING_VALUE&sortByMetric=SOME_STRING_VALUE&sortByGeoPoint=34.052235%2C-118.243685&filterGeoPoints=34.052235%2C-118.243685&filterGeoPoints=15.0%2C65.0&filterAroundRadius=5000&filters=SOME_STRING_VALUE&facets=SOME_ARRAY_VALUE&facetsSize=SOME_INTEGER_VALUE&maxValuesPerFacet=SOME_INTEGER_VALUE&caseSensitiveFacetValues=SOME_BOOLEAN_VALUE&displayAttributes=title&displayAttributes=price&context=mobile&context=listing&includeFacets=SOME_STRING_VALUE&facetsOrderBy=SOME_STRING_VALUE&page=4&limit=10&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&distinctFilter=%7B%22attribute%22%3A%20%22color%22%2C%20%22maxNumItems%22%3A%203%7D&ignoreQueryRules=SOME_BOOLEAN_VALUE&excludeQueryRules=2&excludeQueryRules=5&crossWorkspaceModeEnabled=SOME_BOOLEAN_VALUE&params=source%3Amobile",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/search/v2/indices/%7BindexId%7D/list/explain');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'clientUUID' => 'SOME_STRING_VALUE',
              'personalize' => 'SOME_BOOLEAN_VALUE',
              'correlationId' => 'SOME_STRING_VALUE',
              'searchId' => 'SOME_STRING_VALUE',
              'sortByMetric' => 'SOME_STRING_VALUE',
              'sortByGeoPoint' => '34.052235,-118.243685',
              'filterGeoPoints' => [
                '34.052235,-118.243685',
                '15.0,65.0'
              ],
              'filterAroundRadius' => '5000',
              'filters' => 'SOME_STRING_VALUE',
              'facets' => 'SOME_ARRAY_VALUE',
              'facetsSize' => 'SOME_INTEGER_VALUE',
              'maxValuesPerFacet' => 'SOME_INTEGER_VALUE',
              'caseSensitiveFacetValues' => 'SOME_BOOLEAN_VALUE',
              'displayAttributes' => [
                'title',
                'price'
              ],
              'context' => [
                'mobile',
                'listing'
              ],
              'includeFacets' => 'SOME_STRING_VALUE',
              'facetsOrderBy' => 'SOME_STRING_VALUE',
              'page' => '4',
              'limit' => '10',
              'sortBy' => 'SOME_STRING_VALUE',
              'ordering' => 'SOME_STRING_VALUE',
              'includeMeta' => 'SOME_BOOLEAN_VALUE',
              'distinctFilter' => '{"attribute": "color", "maxNumItems": 3}',
              'ignoreQueryRules' => 'SOME_BOOLEAN_VALUE',
              'excludeQueryRules' => [
                '2',
                '5'
              ],
              'crossWorkspaceModeEnabled' => 'SOME_BOOLEAN_VALUE',
              'params' => 'source:mobile'
            ]);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/search/v2/indices/%7BindexId%7D/list/explain?clientUUID=SOME_STRING_VALUE&personalize=SOME_BOOLEAN_VALUE&correlationId=SOME_STRING_VALUE&searchId=SOME_STRING_VALUE&sortByMetric=SOME_STRING_VALUE&sortByGeoPoint=34.052235%2C-118.243685&filterGeoPoints=34.052235%2C-118.243685&filterGeoPoints=15.0%2C65.0&filterAroundRadius=5000&filters=SOME_STRING_VALUE&facets=SOME_ARRAY_VALUE&facetsSize=SOME_INTEGER_VALUE&maxValuesPerFacet=SOME_INTEGER_VALUE&caseSensitiveFacetValues=SOME_BOOLEAN_VALUE&displayAttributes=title&displayAttributes=price&context=mobile&context=listing&includeFacets=SOME_STRING_VALUE&facetsOrderBy=SOME_STRING_VALUE&page=4&limit=10&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&distinctFilter=%7B%22attribute%22%3A%20%22color%22%2C%20%22maxNumItems%22%3A%203%7D&ignoreQueryRules=SOME_BOOLEAN_VALUE&excludeQueryRules=2&excludeQueryRules=5&crossWorkspaceModeEnabled=SOME_BOOLEAN_VALUE&params=source%3Amobile")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    post:
      summary: Explained items listing
      description: |
        Retrieves item listing, which is a search without a query. The results can be filtered and sorted. The response contains an explanation of the factors that influenced the result.

        ---

        **API consumers:** <span title="Deprecated">AI API key (legacy)</span>, <a href="/docs/settings/tool/tracking_codes" target="_blank" rel="noopener" title="Pass your tracker key in the request header">Web SDK Tracker</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>

        **API key permission required:** `ITEMS_SEARCH_SEARCH_READ`
      operationId: ListingPostWithExplanation
      tags:
        - Listing
      security:
        - TrackerKey: []
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/items-search-inPathIndexId"
      requestBody:
        description: Request for item listing with explanation
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/items-search-ListingRequest"
                - type: object
                  properties:
                    crossWorkspaceMode:
                      $ref: "#/components/schemas/items-search-CrossWorkspaceMode"
      responses:
        "200":
          $ref: "#/components/responses/items-search-ListingResponse200WithExplanation"
        "500":
          description: Service not available
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/items-search-Error"
      x-snr-doc-urls:
        - /api-reference/ai-search#tag/Listing/operation/ListingPostWithExplanation
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/search/v2/indices/%7BindexId%7D/list/explain \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"page":0,"limit":10,"sortBy":"string","ordering":"desc","includeMeta":true,"clientUUID":"string","personalize":true,"correlationId":"string","searchId":"string","sortByMetric":"TransactionsPopularity","sortByGeoPoints":"34.052235,-118.243685","filterGeoPoints":["34.052235,-118.243685","15.0,65.0"],"filterAroundRadius":2000,"filters":"string","facets":["string"],"customFilteredFacets":{"brand":"price > 100","price":"brand == foo"},"facetsSize":2000,"maxValuesPerFacet":50,"caseSensitiveFacetValues":false,"includeFacets":"all","facetsOrderBy":"coverage","context":["mobile","listing"],"displayAttributes":["title","price"],"distinctFilter":{"attribute":"string","maxNumItems":1,"levelRangeModifier":0},"ignoreQueryRules":false,"excludeQueryRules":[2,5],"params":{"source":"mobile"},"crossWorkspaceMode":{"enabled":true}}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"page\":0,\"limit\":10,\"sortBy\":\"string\",\"ordering\":\"desc\",\"includeMeta\":true,\"clientUUID\":\"string\",\"personalize\":true,\"correlationId\":\"string\",\"searchId\":\"string\",\"sortByMetric\":\"TransactionsPopularity\",\"sortByGeoPoints\":\"34.052235,-118.243685\",\"filterGeoPoints\":[\"34.052235,-118.243685\",\"15.0,65.0\"],\"filterAroundRadius\":2000,\"filters\":\"string\",\"facets\":[\"string\"],\"customFilteredFacets\":{\"brand\":\"price > 100\",\"price\":\"brand == foo\"},\"facetsSize\":2000,\"maxValuesPerFacet\":50,\"caseSensitiveFacetValues\":false,\"includeFacets\":\"all\",\"facetsOrderBy\":\"coverage\",\"context\":[\"mobile\",\"listing\"],\"displayAttributes\":[\"title\",\"price\"],\"distinctFilter\":{\"attribute\":\"string\",\"maxNumItems\":1,\"levelRangeModifier\":0},\"ignoreQueryRules\":false,\"excludeQueryRules\":[2,5],\"params\":{\"source\":\"mobile\"},\"crossWorkspaceMode\":{\"enabled\":true}}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/search/v2/indices/%7BindexId%7D/list/explain", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "page": 0,
              "limit": 10,
              "sortBy": "string",
              "ordering": "desc",
              "includeMeta": true,
              "clientUUID": "string",
              "personalize": true,
              "correlationId": "string",
              "searchId": "string",
              "sortByMetric": "TransactionsPopularity",
              "sortByGeoPoints": "34.052235,-118.243685",
              "filterGeoPoints": [
                "34.052235,-118.243685",
                "15.0,65.0"
              ],
              "filterAroundRadius": 2000,
              "filters": "string",
              "facets": [
                "string"
              ],
              "customFilteredFacets": {
                "brand": "price > 100",
                "price": "brand == foo"
              },
              "facetsSize": 2000,
              "maxValuesPerFacet": 50,
              "caseSensitiveFacetValues": false,
              "includeFacets": "all",
              "facetsOrderBy": "coverage",
              "context": [
                "mobile",
                "listing"
              ],
              "displayAttributes": [
                "title",
                "price"
              ],
              "distinctFilter": {
                "attribute": "string",
                "maxNumItems": 1,
                "levelRangeModifier": 0
              },
              "ignoreQueryRules": false,
              "excludeQueryRules": [
                2,
                5
              ],
              "params": {
                "source": "mobile"
              },
              "crossWorkspaceMode": {
                "enabled": true
              }
            });

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("POST", "https://api.synerise.com/search/v2/indices/%7BindexId%7D/list/explain");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/search/v2/indices/%7BindexId%7D/list/explain",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify({
              page: 0,
              limit: 10,
              sortBy: 'string',
              ordering: 'desc',
              includeMeta: true,
              clientUUID: 'string',
              personalize: true,
              correlationId: 'string',
              searchId: 'string',
              sortByMetric: 'TransactionsPopularity',
              sortByGeoPoints: '34.052235,-118.243685',
              filterGeoPoints: ['34.052235,-118.243685', '15.0,65.0'],
              filterAroundRadius: 2000,
              filters: 'string',
              facets: ['string'],
              customFilteredFacets: {brand: 'price > 100', price: 'brand == foo'},
              facetsSize: 2000,
              maxValuesPerFacet: 50,
              caseSensitiveFacetValues: false,
              includeFacets: 'all',
              facetsOrderBy: 'coverage',
              context: ['mobile', 'listing'],
              displayAttributes: ['title', 'price'],
              distinctFilter: {attribute: 'string', maxNumItems: 1, levelRangeModifier: 0},
              ignoreQueryRules: false,
              excludeQueryRules: [2, 5],
              params: {source: 'mobile'},
              crossWorkspaceMode: {enabled: true}
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/search/v2/indices/%7BindexId%7D/list/explain');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"page":0,"limit":10,"sortBy":"string","ordering":"desc","includeMeta":true,"clientUUID":"string","personalize":true,"correlationId":"string","searchId":"string","sortByMetric":"TransactionsPopularity","sortByGeoPoints":"34.052235,-118.243685","filterGeoPoints":["34.052235,-118.243685","15.0,65.0"],"filterAroundRadius":2000,"filters":"string","facets":["string"],"customFilteredFacets":{"brand":"price > 100","price":"brand == foo"},"facetsSize":2000,"maxValuesPerFacet":50,"caseSensitiveFacetValues":false,"includeFacets":"all","facetsOrderBy":"coverage","context":["mobile","listing"],"displayAttributes":["title","price"],"distinctFilter":{"attribute":"string","maxNumItems":1,"levelRangeModifier":0},"ignoreQueryRules":false,"excludeQueryRules":[2,5],"params":{"source":"mobile"},"crossWorkspaceMode":{"enabled":true}}');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/search/v2/indices/%7BindexId%7D/list/explain")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"page\":0,\"limit\":10,\"sortBy\":\"string\",\"ordering\":\"desc\",\"includeMeta\":true,\"clientUUID\":\"string\",\"personalize\":true,\"correlationId\":\"string\",\"searchId\":\"string\",\"sortByMetric\":\"TransactionsPopularity\",\"sortByGeoPoints\":\"34.052235,-118.243685\",\"filterGeoPoints\":[\"34.052235,-118.243685\",\"15.0,65.0\"],\"filterAroundRadius\":2000,\"filters\":\"string\",\"facets\":[\"string\"],\"customFilteredFacets\":{\"brand\":\"price > 100\",\"price\":\"brand == foo\"},\"facetsSize\":2000,\"maxValuesPerFacet\":50,\"caseSensitiveFacetValues\":false,\"includeFacets\":\"all\",\"facetsOrderBy\":\"coverage\",\"context\":[\"mobile\",\"listing\"],\"displayAttributes\":[\"title\",\"price\"],\"distinctFilter\":{\"attribute\":\"string\",\"maxNumItems\":1,\"levelRangeModifier\":0},\"ignoreQueryRules\":false,\"excludeQueryRules\":[2,5],\"params\":{\"source\":\"mobile\"},\"crossWorkspaceMode\":{\"enabled\":true}}")
              .asString();
  /search/v2/indices/{indexId}/attributes/filterable/values:
    get:
      summary: Get values of filterable attributes
      description: |
        Retrieve values of filterable attributes.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `ITEMS_SEARCH_SEARCH_READ`

        **User role permission required:** `assets_search: read`
      operationId: getFilterableAttributesValues
      tags:
        - Search Configuration
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/items-search-inPathIndexId"
        - $ref: "#/components/parameters/items-search-filterableAttributes"
      responses:
        "200":
          description: Values returned
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/items-search-FilterableAttributesValues"
        "500":
          description: Service not available
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/items-search-Error"
      x-snr-doc-urls:
        - /api-reference/ai-search#tag/Search-Configuration/operation/getFilterableAttributesValues
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/search/v2/indices/%7BindexId%7D/attributes/filterable/values?attribute=SOME_ARRAY_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("GET", "/search/v2/indices/%7BindexId%7D/attributes/filterable/values?attribute=SOME_ARRAY_VALUE", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("GET", "https://api.synerise.com/search/v2/indices/%7BindexId%7D/attributes/filterable/values?attribute=SOME_ARRAY_VALUE");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/search/v2/indices/%7BindexId%7D/attributes/filterable/values?attribute=SOME_ARRAY_VALUE",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/search/v2/indices/%7BindexId%7D/attributes/filterable/values');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'attribute' => 'SOME_ARRAY_VALUE'
            ]);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/search/v2/indices/%7BindexId%7D/attributes/filterable/values?attribute=SOME_ARRAY_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /search/v2/indices/{indexId}/explain-match:
    get:
      summary: Searchable attributes match
      description: |
        Enter a query and an item ID to check if a token (a word or a synonym which replaced it) matches a value or part of a value from the item's searchable attributes.


        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `ITEMS_SEARCH_SEARCH_READ`

        **User role permission required:** `assets_search: read`
      operationId: searchableAttributesMatch
      tags:
        - Search
      security:
        - TrackerKey: []
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/items-search-inPathIndexId"
        - $ref: "#/components/parameters/items-search-searchQuery"
        - $ref: "#/components/parameters/items-search-itemId"
      responses:
        "200":
          $ref: "#/components/responses/items-search-SearchableAttributesMatchResponse200"
        "500":
          description: Service not available
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/items-search-Error"
      x-snr-doc-urls:
        - /api-reference/ai-search#tag/Search/operation/searchableAttributesMatch
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/search/v2/indices/%7BindexId%7D/explain-match?query=SOME_STRING_VALUE&itemId=SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("GET", "/search/v2/indices/%7BindexId%7D/explain-match?query=SOME_STRING_VALUE&itemId=SOME_STRING_VALUE", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("GET", "https://api.synerise.com/search/v2/indices/%7BindexId%7D/explain-match?query=SOME_STRING_VALUE&itemId=SOME_STRING_VALUE");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/search/v2/indices/%7BindexId%7D/explain-match?query=SOME_STRING_VALUE&itemId=SOME_STRING_VALUE",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/search/v2/indices/%7BindexId%7D/explain-match');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'query' => 'SOME_STRING_VALUE',
              'itemId' => 'SOME_STRING_VALUE'
            ]);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/search/v2/indices/%7BindexId%7D/explain-match?query=SOME_STRING_VALUE&itemId=SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /search/v2/indices:
    get:
      summary: Get configurations of all indices
      description: |
        Retrieve the configurations of all indices.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `ITEMS_SEARCH_CONFIG_SEARCH_READ`

        **User role permission required:** `assets_search: read`
      operationId: getIndicesConfigsV2
      tags:
        - Search Configuration
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/items-search-config-paginationPage"
        - $ref: "#/components/parameters/items-search-config-paginationLimit"
        - $ref: "#/components/parameters/items-search-config-paginationSortBy"
        - $ref: "#/components/parameters/items-search-config-paginationOrdering"
        - $ref: "#/components/parameters/items-search-config-paginationIncludeMeta"
        - $ref: "#/components/parameters/items-search-config-nameFilter"
        - $ref: "#/components/parameters/items-search-config-queryFilter"
        - $ref: "#/components/parameters/items-search-config-excludeAbTests"
        - $ref: "#/components/parameters/items-search-config-inQueryDirectoryId"
        - $ref: "#/components/parameters/items-search-config-inQueryType"
      responses:
        "200":
          description: Configurations returned
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/items-search-config-PaginatedSearchConfigsSchema"
        "500":
          description: Service not available
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/items-search-config-Error"
      x-snr-doc-urls:
        - /api-reference/ai-search#tag/Search-Configuration/operation/getIndicesConfigsV2
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/search/v2/indices?page=4&limit=100&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&name=SOME_STRING_VALUE&query=SOME_STRING_VALUE&excludeAbTests=SOME_BOOLEAN_VALUE&directoryId=SOME_STRING_VALUE&type=SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("GET", "/search/v2/indices?page=4&limit=100&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&name=SOME_STRING_VALUE&query=SOME_STRING_VALUE&excludeAbTests=SOME_BOOLEAN_VALUE&directoryId=SOME_STRING_VALUE&type=SOME_STRING_VALUE", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("GET", "https://api.synerise.com/search/v2/indices?page=4&limit=100&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&name=SOME_STRING_VALUE&query=SOME_STRING_VALUE&excludeAbTests=SOME_BOOLEAN_VALUE&directoryId=SOME_STRING_VALUE&type=SOME_STRING_VALUE");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/search/v2/indices?page=4&limit=100&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&name=SOME_STRING_VALUE&query=SOME_STRING_VALUE&excludeAbTests=SOME_BOOLEAN_VALUE&directoryId=SOME_STRING_VALUE&type=SOME_STRING_VALUE",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/search/v2/indices');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'page' => '4',
              'limit' => '100',
              'sortBy' => 'SOME_STRING_VALUE',
              'ordering' => 'SOME_STRING_VALUE',
              'includeMeta' => 'SOME_BOOLEAN_VALUE',
              'name' => 'SOME_STRING_VALUE',
              'query' => 'SOME_STRING_VALUE',
              'excludeAbTests' => 'SOME_BOOLEAN_VALUE',
              'directoryId' => 'SOME_STRING_VALUE',
              'type' => 'SOME_STRING_VALUE'
            ]);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/search/v2/indices?page=4&limit=100&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&name=SOME_STRING_VALUE&query=SOME_STRING_VALUE&excludeAbTests=SOME_BOOLEAN_VALUE&directoryId=SOME_STRING_VALUE&type=SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    post:
      summary: Post index configuration
      description: |
        Creates a new configuration of a single index.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `ITEMS_SEARCH_CONFIG_SEARCH_CREATE`

        **User role permission required:** `assets_search: create`
      operationId: postIndexConfigV2
      tags:
        - Search Configuration
      security:
        - JWT: []
      requestBody:
        description: Request for posting search configuration
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - indexName
                - itemsCatalogId
                - language
                - searchableAttributes
                - enabled
              properties:
                indexName:
                  $ref: "#/components/schemas/items-search-config-IndexNameSchema"
                description:
                  $ref: "#/components/schemas/items-search-config-IndexDescriptionSchema"
                itemsCatalogId:
                  $ref: "#/components/schemas/items-search-config-ItemsCatalogIdSchema"
                language:
                  $ref: "#/components/schemas/items-search-config-LanguageSchema"
                enabled:
                  $ref: "#/components/schemas/items-search-config-EnabledSchema"
                ignoreUnavailableItems:
                  $ref: "#/components/schemas/items-search-config-IgnoreUnavailableItemsSchema"
                scoring:
                  $ref: "#/components/schemas/items-search-config-ScoringSchema"
                suggestions:
                  $ref: "#/components/schemas/items-search-config-Suggestions"
                tokenizer:
                  $ref: "#/components/schemas/items-search-config-Tokenizer"
                analyzers:
                  $ref: "#/components/schemas/items-search-config-Analyzers"
                attributesWithoutPrefixSearch:
                  $ref: "#/components/schemas/items-search-config-AttributesWithoutPrefixSearchSchema"
                attributesWithoutTypoTolerance:
                  $ref: "#/components/schemas/items-search-config-AttributesWithoutTypoToleranceSchema"
                valuesWithoutTypoTolerance:
                  $ref: "#/components/schemas/items-search-config-ValuesWithoutTypoToleranceSchema"
                typoToleranceOnNumericValues:
                  $ref: "#/components/schemas/items-search-config-TypoToleranceOnNumericValuesSchema"
                searchableAttributes:
                  $ref: "#/components/schemas/items-search-config-SearchableAttributesSchema"
                displayableAttributes:
                  $ref: "#/components/schemas/items-search-config-DisplayableAttributesSchema"
                facetableAttributes:
                  $ref: "#/components/schemas/items-search-config-FacetableAttributesSchema"
                filterableAttributes:
                  $ref: "#/components/schemas/items-search-config-FilterableAttributesSchema"
                sortableAttributes:
                  $ref: "#/components/schemas/items-search-config-SortableAttributesSchema"
                distinctFilterAttributes:
                  $ref: "#/components/schemas/items-search-config-DistinctFilterAttributesSchema"
                recentSearches:
                  $ref: "#/components/schemas/items-search-config-RecentSearchesConfig"
                reranking:
                  $ref: "#/components/schemas/items-search-config-RerankingSchema"
                geoSearch:
                  $ref: "#/components/schemas/items-search-config-GeoSearchSchema"
                queryRules:
                  $ref: "#/components/schemas/items-search-config-QueryRulesSchema"
      responses:
        "200":
          description: Returned created configuration
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/items-search-config-SearchConfigSchema"
        "500":
          description: Service not available
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/items-search-config-Error"
      x-snr-doc-urls:
        - /api-reference/ai-search#tag/Search-Configuration/operation/postIndexConfigV2
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/search/v2/indices \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"indexName":"string","description":"string","itemsCatalogId":"string","language":"string","enabled":true,"ignoreUnavailableItems":true,"scoring":{"pageVisitsPopularity":0,"transactionsPopularity":0,"personalized":0,"tieBreaker":0,"matching":{"type":"MinimumMatching","value":1},"fallbackMatching":{"type":"MinimumMatching","value":1},"similarity":{"type":"BM25","k1":1.2,"b":0.75},"crossWorkspaceMode":{"enabled":true}},"suggestions":{"smoothingModel":"Popularity","gramSize":3,"maxErrors":2,"minWordLength":4,"useAlways":false},"tokenizer":{"type":"Whitespace"},"analyzers":{"autocomplete":"Ngram"},"attributesWithoutPrefixSearch":["brand","color","promotion.type"],"attributesWithoutTypoTolerance":["itemId","link"],"valuesWithoutTypoTolerance":["Nike","blue","74997"],"typoToleranceOnNumericValues":true,"searchableAttributes":{"fullText":["brand","color","promotion.type"],"fullTextBoosted":["brand","color","promotion.type"],"fullTextStronglyBoosted":["brand","color","promotion.type"]},"displayableAttributes":["brand","color","promotion.type"],"facetableAttributes":{"range":["age","customScore.value","salePrice.value"],"text":["brand","color","promotion.type"],"datetime":["created","attributes.modifiedAt"]},"filterableAttributes":{"range":["age","customScore.value","salePrice.value"],"text":["brand","color","promotion.type"],"datetime":["created","attributes.modifiedAt"]},"sortableAttributes":{"range":["age","customScore.value","salePrice.value"],"text":["brand","color","promotion.type"],"datetime":["created","attributes.modifiedAt"]},"distinctFilterAttributes":{"range":["age","customScore.value","salePrice.value"],"text":["brand","color","promotion.type"],"datetime":["created","attributes.modifiedAt"]},"recentSearches":{"windowSize":100,"timeSpan":{"type":"DAYS","value":30}},"reranking":{"dynamicReranker":{"enabled":true,"filter":"string","numberOfItems":1,"minNumberOfEvents":0},"queryClassification":{"enabled":true,"actions":[{"action":"staticFilter","minReliabilityLevel":"certain"}],"excludedPhrases":["string"],"excludedCategories":["string"]}},"geoSearch":{"geoSearchableAttribute":"string"},"queryRules":{"consequencesJoinOperators":{"standardFilters":"AND","elasticFilters":"AND"}}}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"indexName\":\"string\",\"description\":\"string\",\"itemsCatalogId\":\"string\",\"language\":\"string\",\"enabled\":true,\"ignoreUnavailableItems\":true,\"scoring\":{\"pageVisitsPopularity\":0,\"transactionsPopularity\":0,\"personalized\":0,\"tieBreaker\":0,\"matching\":{\"type\":\"MinimumMatching\",\"value\":1},\"fallbackMatching\":{\"type\":\"MinimumMatching\",\"value\":1},\"similarity\":{\"type\":\"BM25\",\"k1\":1.2,\"b\":0.75},\"crossWorkspaceMode\":{\"enabled\":true}},\"suggestions\":{\"smoothingModel\":\"Popularity\",\"gramSize\":3,\"maxErrors\":2,\"minWordLength\":4,\"useAlways\":false},\"tokenizer\":{\"type\":\"Whitespace\"},\"analyzers\":{\"autocomplete\":\"Ngram\"},\"attributesWithoutPrefixSearch\":[\"brand\",\"color\",\"promotion.type\"],\"attributesWithoutTypoTolerance\":[\"itemId\",\"link\"],\"valuesWithoutTypoTolerance\":[\"Nike\",\"blue\",\"74997\"],\"typoToleranceOnNumericValues\":true,\"searchableAttributes\":{\"fullText\":[\"brand\",\"color\",\"promotion.type\"],\"fullTextBoosted\":[\"brand\",\"color\",\"promotion.type\"],\"fullTextStronglyBoosted\":[\"brand\",\"color\",\"promotion.type\"]},\"displayableAttributes\":[\"brand\",\"color\",\"promotion.type\"],\"facetableAttributes\":{\"range\":[\"age\",\"customScore.value\",\"salePrice.value\"],\"text\":[\"brand\",\"color\",\"promotion.type\"],\"datetime\":[\"created\",\"attributes.modifiedAt\"]},\"filterableAttributes\":{\"range\":[\"age\",\"customScore.value\",\"salePrice.value\"],\"text\":[\"brand\",\"color\",\"promotion.type\"],\"datetime\":[\"created\",\"attributes.modifiedAt\"]},\"sortableAttributes\":{\"range\":[\"age\",\"customScore.value\",\"salePrice.value\"],\"text\":[\"brand\",\"color\",\"promotion.type\"],\"datetime\":[\"created\",\"attributes.modifiedAt\"]},\"distinctFilterAttributes\":{\"range\":[\"age\",\"customScore.value\",\"salePrice.value\"],\"text\":[\"brand\",\"color\",\"promotion.type\"],\"datetime\":[\"created\",\"attributes.modifiedAt\"]},\"recentSearches\":{\"windowSize\":100,\"timeSpan\":{\"type\":\"DAYS\",\"value\":30}},\"reranking\":{\"dynamicReranker\":{\"enabled\":true,\"filter\":\"string\",\"numberOfItems\":1,\"minNumberOfEvents\":0},\"queryClassification\":{\"enabled\":true,\"actions\":[{\"action\":\"staticFilter\",\"minReliabilityLevel\":\"certain\"}],\"excludedPhrases\":[\"string\"],\"excludedCategories\":[\"string\"]}},\"geoSearch\":{\"geoSearchableAttribute\":\"string\"},\"queryRules\":{\"consequencesJoinOperators\":{\"standardFilters\":\"AND\",\"elasticFilters\":\"AND\"}}}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/search/v2/indices", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "indexName": "string",
              "description": "string",
              "itemsCatalogId": "string",
              "language": "string",
              "enabled": true,
              "ignoreUnavailableItems": true,
              "scoring": {
                "pageVisitsPopularity": 0,
                "transactionsPopularity": 0,
                "personalized": 0,
                "tieBreaker": 0,
                "matching": {
                  "type": "MinimumMatching",
                  "value": 1
                },
                "fallbackMatching": {
                  "type": "MinimumMatching",
                  "value": 1
                },
                "similarity": {
                  "type": "BM25",
                  "k1": 1.2,
                  "b": 0.75
                },
                "crossWorkspaceMode": {
                  "enabled": true
                }
              },
              "suggestions": {
                "smoothingModel": "Popularity",
                "gramSize": 3,
                "maxErrors": 2,
                "minWordLength": 4,
                "useAlways": false
              },
              "tokenizer": {
                "type": "Whitespace"
              },
              "analyzers": {
                "autocomplete": "Ngram"
              },
              "attributesWithoutPrefixSearch": [
                "brand",
                "color",
                "promotion.type"
              ],
              "attributesWithoutTypoTolerance": [
                "itemId",
                "link"
              ],
              "valuesWithoutTypoTolerance": [
                "Nike",
                "blue",
                "74997"
              ],
              "typoToleranceOnNumericValues": true,
              "searchableAttributes": {
                "fullText": [
                  "brand",
                  "color",
                  "promotion.type"
                ],
                "fullTextBoosted": [
                  "brand",
                  "color",
                  "promotion.type"
                ],
                "fullTextStronglyBoosted": [
                  "brand",
                  "color",
                  "promotion.type"
                ]
              },
              "displayableAttributes": [
                "brand",
                "color",
                "promotion.type"
              ],
              "facetableAttributes": {
                "range": [
                  "age",
                  "customScore.value",
                  "salePrice.value"
                ],
                "text": [
                  "brand",
                  "color",
                  "promotion.type"
                ],
                "datetime": [
                  "created",
                  "attributes.modifiedAt"
                ]
              },
              "filterableAttributes": {
                "range": [
                  "age",
                  "customScore.value",
                  "salePrice.value"
                ],
                "text": [
                  "brand",
                  "color",
                  "promotion.type"
                ],
                "datetime": [
                  "created",
                  "attributes.modifiedAt"
                ]
              },
              "sortableAttributes": {
                "range": [
                  "age",
                  "customScore.value",
                  "salePrice.value"
                ],
                "text": [
                  "brand",
                  "color",
                  "promotion.type"
                ],
                "datetime": [
                  "created",
                  "attributes.modifiedAt"
                ]
              },
              "distinctFilterAttributes": {
                "range": [
                  "age",
                  "customScore.value",
                  "salePrice.value"
                ],
                "text": [
                  "brand",
                  "color",
                  "promotion.type"
                ],
                "datetime": [
                  "created",
                  "attributes.modifiedAt"
                ]
              },
              "recentSearches": {
                "windowSize": 100,
                "timeSpan": {
                  "type": "DAYS",
                  "value": 30
                }
              },
              "reranking": {
                "dynamicReranker": {
                  "enabled": true,
                  "filter": "string",
                  "numberOfItems": 1,
                  "minNumberOfEvents": 0
                },
                "queryClassification": {
                  "enabled": true,
                  "actions": [
                    {
                      "action": "staticFilter",
                      "minReliabilityLevel": "certain"
                    }
                  ],
                  "excludedPhrases": [
                    "string"
                  ],
                  "excludedCategories": [
                    "string"
                  ]
                }
              },
              "geoSearch": {
                "geoSearchableAttribute": "string"
              },
              "queryRules": {
                "consequencesJoinOperators": {
                  "standardFilters": "AND",
                  "elasticFilters": "AND"
                }
              }
            });

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("POST", "https://api.synerise.com/search/v2/indices");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/search/v2/indices",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify({
              indexName: 'string',
              description: 'string',
              itemsCatalogId: 'string',
              language: 'string',
              enabled: true,
              ignoreUnavailableItems: true,
              scoring: {
                pageVisitsPopularity: 0,
                transactionsPopularity: 0,
                personalized: 0,
                tieBreaker: 0,
                matching: {type: 'MinimumMatching', value: 1},
                fallbackMatching: {type: 'MinimumMatching', value: 1},
                similarity: {type: 'BM25', k1: 1.2, b: 0.75},
                crossWorkspaceMode: {enabled: true}
              },
              suggestions: {
                smoothingModel: 'Popularity',
                gramSize: 3,
                maxErrors: 2,
                minWordLength: 4,
                useAlways: false
              },
              tokenizer: {type: 'Whitespace'},
              analyzers: {autocomplete: 'Ngram'},
              attributesWithoutPrefixSearch: ['brand', 'color', 'promotion.type'],
              attributesWithoutTypoTolerance: ['itemId', 'link'],
              valuesWithoutTypoTolerance: ['Nike', 'blue', '74997'],
              typoToleranceOnNumericValues: true,
              searchableAttributes: {
                fullText: ['brand', 'color', 'promotion.type'],
                fullTextBoosted: ['brand', 'color', 'promotion.type'],
                fullTextStronglyBoosted: ['brand', 'color', 'promotion.type']
              },
              displayableAttributes: ['brand', 'color', 'promotion.type'],
              facetableAttributes: {
                range: ['age', 'customScore.value', 'salePrice.value'],
                text: ['brand', 'color', 'promotion.type'],
                datetime: ['created', 'attributes.modifiedAt']
              },
              filterableAttributes: {
                range: ['age', 'customScore.value', 'salePrice.value'],
                text: ['brand', 'color', 'promotion.type'],
                datetime: ['created', 'attributes.modifiedAt']
              },
              sortableAttributes: {
                range: ['age', 'customScore.value', 'salePrice.value'],
                text: ['brand', 'color', 'promotion.type'],
                datetime: ['created', 'attributes.modifiedAt']
              },
              distinctFilterAttributes: {
                range: ['age', 'customScore.value', 'salePrice.value'],
                text: ['brand', 'color', 'promotion.type'],
                datetime: ['created', 'attributes.modifiedAt']
              },
              recentSearches: {windowSize: 100, timeSpan: {type: 'DAYS', value: 30}},
              reranking: {
                dynamicReranker: {enabled: true, filter: 'string', numberOfItems: 1, minNumberOfEvents: 0},
                queryClassification: {
                  enabled: true,
                  actions: [{action: 'staticFilter', minReliabilityLevel: 'certain'}],
                  excludedPhrases: ['string'],
                  excludedCategories: ['string']
                }
              },
              geoSearch: {geoSearchableAttribute: 'string'},
              queryRules: {consequencesJoinOperators: {standardFilters: 'AND', elasticFilters: 'AND'}}
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/search/v2/indices');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"indexName":"string","description":"string","itemsCatalogId":"string","language":"string","enabled":true,"ignoreUnavailableItems":true,"scoring":{"pageVisitsPopularity":0,"transactionsPopularity":0,"personalized":0,"tieBreaker":0,"matching":{"type":"MinimumMatching","value":1},"fallbackMatching":{"type":"MinimumMatching","value":1},"similarity":{"type":"BM25","k1":1.2,"b":0.75},"crossWorkspaceMode":{"enabled":true}},"suggestions":{"smoothingModel":"Popularity","gramSize":3,"maxErrors":2,"minWordLength":4,"useAlways":false},"tokenizer":{"type":"Whitespace"},"analyzers":{"autocomplete":"Ngram"},"attributesWithoutPrefixSearch":["brand","color","promotion.type"],"attributesWithoutTypoTolerance":["itemId","link"],"valuesWithoutTypoTolerance":["Nike","blue","74997"],"typoToleranceOnNumericValues":true,"searchableAttributes":{"fullText":["brand","color","promotion.type"],"fullTextBoosted":["brand","color","promotion.type"],"fullTextStronglyBoosted":["brand","color","promotion.type"]},"displayableAttributes":["brand","color","promotion.type"],"facetableAttributes":{"range":["age","customScore.value","salePrice.value"],"text":["brand","color","promotion.type"],"datetime":["created","attributes.modifiedAt"]},"filterableAttributes":{"range":["age","customScore.value","salePrice.value"],"text":["brand","color","promotion.type"],"datetime":["created","attributes.modifiedAt"]},"sortableAttributes":{"range":["age","customScore.value","salePrice.value"],"text":["brand","color","promotion.type"],"datetime":["created","attributes.modifiedAt"]},"distinctFilterAttributes":{"range":["age","customScore.value","salePrice.value"],"text":["brand","color","promotion.type"],"datetime":["created","attributes.modifiedAt"]},"recentSearches":{"windowSize":100,"timeSpan":{"type":"DAYS","value":30}},"reranking":{"dynamicReranker":{"enabled":true,"filter":"string","numberOfItems":1,"minNumberOfEvents":0},"queryClassification":{"enabled":true,"actions":[{"action":"staticFilter","minReliabilityLevel":"certain"}],"excludedPhrases":["string"],"excludedCategories":["string"]}},"geoSearch":{"geoSearchableAttribute":"string"},"queryRules":{"consequencesJoinOperators":{"standardFilters":"AND","elasticFilters":"AND"}}}');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/search/v2/indices")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"indexName\":\"string\",\"description\":\"string\",\"itemsCatalogId\":\"string\",\"language\":\"string\",\"enabled\":true,\"ignoreUnavailableItems\":true,\"scoring\":{\"pageVisitsPopularity\":0,\"transactionsPopularity\":0,\"personalized\":0,\"tieBreaker\":0,\"matching\":{\"type\":\"MinimumMatching\",\"value\":1},\"fallbackMatching\":{\"type\":\"MinimumMatching\",\"value\":1},\"similarity\":{\"type\":\"BM25\",\"k1\":1.2,\"b\":0.75},\"crossWorkspaceMode\":{\"enabled\":true}},\"suggestions\":{\"smoothingModel\":\"Popularity\",\"gramSize\":3,\"maxErrors\":2,\"minWordLength\":4,\"useAlways\":false},\"tokenizer\":{\"type\":\"Whitespace\"},\"analyzers\":{\"autocomplete\":\"Ngram\"},\"attributesWithoutPrefixSearch\":[\"brand\",\"color\",\"promotion.type\"],\"attributesWithoutTypoTolerance\":[\"itemId\",\"link\"],\"valuesWithoutTypoTolerance\":[\"Nike\",\"blue\",\"74997\"],\"typoToleranceOnNumericValues\":true,\"searchableAttributes\":{\"fullText\":[\"brand\",\"color\",\"promotion.type\"],\"fullTextBoosted\":[\"brand\",\"color\",\"promotion.type\"],\"fullTextStronglyBoosted\":[\"brand\",\"color\",\"promotion.type\"]},\"displayableAttributes\":[\"brand\",\"color\",\"promotion.type\"],\"facetableAttributes\":{\"range\":[\"age\",\"customScore.value\",\"salePrice.value\"],\"text\":[\"brand\",\"color\",\"promotion.type\"],\"datetime\":[\"created\",\"attributes.modifiedAt\"]},\"filterableAttributes\":{\"range\":[\"age\",\"customScore.value\",\"salePrice.value\"],\"text\":[\"brand\",\"color\",\"promotion.type\"],\"datetime\":[\"created\",\"attributes.modifiedAt\"]},\"sortableAttributes\":{\"range\":[\"age\",\"customScore.value\",\"salePrice.value\"],\"text\":[\"brand\",\"color\",\"promotion.type\"],\"datetime\":[\"created\",\"attributes.modifiedAt\"]},\"distinctFilterAttributes\":{\"range\":[\"age\",\"customScore.value\",\"salePrice.value\"],\"text\":[\"brand\",\"color\",\"promotion.type\"],\"datetime\":[\"created\",\"attributes.modifiedAt\"]},\"recentSearches\":{\"windowSize\":100,\"timeSpan\":{\"type\":\"DAYS\",\"value\":30}},\"reranking\":{\"dynamicReranker\":{\"enabled\":true,\"filter\":\"string\",\"numberOfItems\":1,\"minNumberOfEvents\":0},\"queryClassification\":{\"enabled\":true,\"actions\":[{\"action\":\"staticFilter\",\"minReliabilityLevel\":\"certain\"}],\"excludedPhrases\":[\"string\"],\"excludedCategories\":[\"string\"]}},\"geoSearch\":{\"geoSearchableAttribute\":\"string\"},\"queryRules\":{\"consequencesJoinOperators\":{\"standardFilters\":\"AND\",\"elasticFilters\":\"AND\"}}}")
              .asString();
  /search/v2/indices/{indexId}/config:
    get:
      summary: Get index configuration
      description: |
        Retrieve the configuration of a single index.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `ITEMS_SEARCH_CONFIG_SEARCH_READ`

        **User role permission required:** `assets_search: read`
      operationId: getIndexConfigV2
      tags:
        - Search Configuration
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/items-search-config-InPathIndexId"
      responses:
        "200":
          description: Configuration returned
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/items-search-config-SearchConfigSchema"
        "500":
          description: Service not available
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/items-search-config-Error"
      x-snr-doc-urls:
        - /api-reference/ai-search#tag/Search-Configuration/operation/getIndexConfigV2
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/search/v2/indices/%7BindexId%7D/config \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("GET", "/search/v2/indices/%7BindexId%7D/config", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("GET", "https://api.synerise.com/search/v2/indices/%7BindexId%7D/config");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/search/v2/indices/%7BindexId%7D/config",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/search/v2/indices/%7BindexId%7D/config');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/search/v2/indices/%7BindexId%7D/config")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    put:
      summary: Update index configuration
      description: |
        Update the configuration of a single index.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `ITEMS_SEARCH_CONFIG_SEARCH_UPDATE`

        **User role permission required:** `assets_search: update`
      operationId: updateIndexConfigV2
      tags:
        - Search Configuration
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/items-search-config-InPathIndexId"
      requestBody:
        description: Request for posting search configuration
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - indexName
                - itemsCatalogId
                - language
                - searchableAttributes
                - enabled
              properties:
                indexName:
                  $ref: "#/components/schemas/items-search-config-IndexNameSchema"
                description:
                  $ref: "#/components/schemas/items-search-config-IndexDescriptionSchema"
                itemsCatalogId:
                  $ref: "#/components/schemas/items-search-config-ItemsCatalogIdSchema"
                language:
                  $ref: "#/components/schemas/items-search-config-LanguageSchema"
                enabled:
                  $ref: "#/components/schemas/items-search-config-EnabledSchema"
                ignoreUnavailableItems:
                  $ref: "#/components/schemas/items-search-config-IgnoreUnavailableItemsSchema"
                scoring:
                  $ref: "#/components/schemas/items-search-config-ScoringSchema"
                suggestions:
                  $ref: "#/components/schemas/items-search-config-Suggestions"
                tokenizer:
                  $ref: "#/components/schemas/items-search-config-Tokenizer"
                analyzers:
                  $ref: "#/components/schemas/items-search-config-Analyzers"
                attributesWithoutPrefixSearch:
                  $ref: "#/components/schemas/items-search-config-AttributesWithoutPrefixSearchSchema"
                attributesWithoutTypoTolerance:
                  $ref: "#/components/schemas/items-search-config-AttributesWithoutTypoToleranceSchema"
                valuesWithoutTypoTolerance:
                  $ref: "#/components/schemas/items-search-config-ValuesWithoutTypoToleranceSchema"
                typoToleranceOnNumericValues:
                  $ref: "#/components/schemas/items-search-config-TypoToleranceOnNumericValuesSchema"
                searchableAttributes:
                  $ref: "#/components/schemas/items-search-config-SearchableAttributesSchema"
                displayableAttributes:
                  $ref: "#/components/schemas/items-search-config-DisplayableAttributesSchema"
                facetableAttributes:
                  $ref: "#/components/schemas/items-search-config-FacetableAttributesSchema"
                filterableAttributes:
                  $ref: "#/components/schemas/items-search-config-FilterableAttributesSchema"
                sortableAttributes:
                  $ref: "#/components/schemas/items-search-config-SortableAttributesSchema"
                distinctFilterAttributes:
                  $ref: "#/components/schemas/items-search-config-DistinctFilterAttributesSchema"
                recentSearches:
                  $ref: "#/components/schemas/items-search-config-RecentSearchesConfig"
                reranking:
                  $ref: "#/components/schemas/items-search-config-RerankingSchema"
                geoSearch:
                  $ref: "#/components/schemas/items-search-config-GeoSearchSchema"
                queryRules:
                  $ref: "#/components/schemas/items-search-config-QueryRulesSchema"
      responses:
        "200":
          description: Returned updated configuration
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/items-search-config-SearchConfigSchema"
        "500":
          description: Service not available
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/items-search-config-Error"
      x-snr-doc-urls:
        - /api-reference/ai-search#tag/Search-Configuration/operation/updateIndexConfigV2
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request PUT \
              --url https://api.synerise.com/search/v2/indices/%7BindexId%7D/config \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"indexName":"string","description":"string","itemsCatalogId":"string","language":"string","enabled":true,"ignoreUnavailableItems":true,"scoring":{"pageVisitsPopularity":0,"transactionsPopularity":0,"personalized":0,"tieBreaker":0,"matching":{"type":"MinimumMatching","value":1},"fallbackMatching":{"type":"MinimumMatching","value":1},"similarity":{"type":"BM25","k1":1.2,"b":0.75},"crossWorkspaceMode":{"enabled":true}},"suggestions":{"smoothingModel":"Popularity","gramSize":3,"maxErrors":2,"minWordLength":4,"useAlways":false},"tokenizer":{"type":"Whitespace"},"analyzers":{"autocomplete":"Ngram"},"attributesWithoutPrefixSearch":["brand","color","promotion.type"],"attributesWithoutTypoTolerance":["itemId","link"],"valuesWithoutTypoTolerance":["Nike","blue","74997"],"typoToleranceOnNumericValues":true,"searchableAttributes":{"fullText":["brand","color","promotion.type"],"fullTextBoosted":["brand","color","promotion.type"],"fullTextStronglyBoosted":["brand","color","promotion.type"]},"displayableAttributes":["brand","color","promotion.type"],"facetableAttributes":{"range":["age","customScore.value","salePrice.value"],"text":["brand","color","promotion.type"],"datetime":["created","attributes.modifiedAt"]},"filterableAttributes":{"range":["age","customScore.value","salePrice.value"],"text":["brand","color","promotion.type"],"datetime":["created","attributes.modifiedAt"]},"sortableAttributes":{"range":["age","customScore.value","salePrice.value"],"text":["brand","color","promotion.type"],"datetime":["created","attributes.modifiedAt"]},"distinctFilterAttributes":{"range":["age","customScore.value","salePrice.value"],"text":["brand","color","promotion.type"],"datetime":["created","attributes.modifiedAt"]},"recentSearches":{"windowSize":100,"timeSpan":{"type":"DAYS","value":30}},"reranking":{"dynamicReranker":{"enabled":true,"filter":"string","numberOfItems":1,"minNumberOfEvents":0},"queryClassification":{"enabled":true,"actions":[{"action":"staticFilter","minReliabilityLevel":"certain"}],"excludedPhrases":["string"],"excludedCategories":["string"]}},"geoSearch":{"geoSearchableAttribute":"string"},"queryRules":{"consequencesJoinOperators":{"standardFilters":"AND","elasticFilters":"AND"}}}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"indexName\":\"string\",\"description\":\"string\",\"itemsCatalogId\":\"string\",\"language\":\"string\",\"enabled\":true,\"ignoreUnavailableItems\":true,\"scoring\":{\"pageVisitsPopularity\":0,\"transactionsPopularity\":0,\"personalized\":0,\"tieBreaker\":0,\"matching\":{\"type\":\"MinimumMatching\",\"value\":1},\"fallbackMatching\":{\"type\":\"MinimumMatching\",\"value\":1},\"similarity\":{\"type\":\"BM25\",\"k1\":1.2,\"b\":0.75},\"crossWorkspaceMode\":{\"enabled\":true}},\"suggestions\":{\"smoothingModel\":\"Popularity\",\"gramSize\":3,\"maxErrors\":2,\"minWordLength\":4,\"useAlways\":false},\"tokenizer\":{\"type\":\"Whitespace\"},\"analyzers\":{\"autocomplete\":\"Ngram\"},\"attributesWithoutPrefixSearch\":[\"brand\",\"color\",\"promotion.type\"],\"attributesWithoutTypoTolerance\":[\"itemId\",\"link\"],\"valuesWithoutTypoTolerance\":[\"Nike\",\"blue\",\"74997\"],\"typoToleranceOnNumericValues\":true,\"searchableAttributes\":{\"fullText\":[\"brand\",\"color\",\"promotion.type\"],\"fullTextBoosted\":[\"brand\",\"color\",\"promotion.type\"],\"fullTextStronglyBoosted\":[\"brand\",\"color\",\"promotion.type\"]},\"displayableAttributes\":[\"brand\",\"color\",\"promotion.type\"],\"facetableAttributes\":{\"range\":[\"age\",\"customScore.value\",\"salePrice.value\"],\"text\":[\"brand\",\"color\",\"promotion.type\"],\"datetime\":[\"created\",\"attributes.modifiedAt\"]},\"filterableAttributes\":{\"range\":[\"age\",\"customScore.value\",\"salePrice.value\"],\"text\":[\"brand\",\"color\",\"promotion.type\"],\"datetime\":[\"created\",\"attributes.modifiedAt\"]},\"sortableAttributes\":{\"range\":[\"age\",\"customScore.value\",\"salePrice.value\"],\"text\":[\"brand\",\"color\",\"promotion.type\"],\"datetime\":[\"created\",\"attributes.modifiedAt\"]},\"distinctFilterAttributes\":{\"range\":[\"age\",\"customScore.value\",\"salePrice.value\"],\"text\":[\"brand\",\"color\",\"promotion.type\"],\"datetime\":[\"created\",\"attributes.modifiedAt\"]},\"recentSearches\":{\"windowSize\":100,\"timeSpan\":{\"type\":\"DAYS\",\"value\":30}},\"reranking\":{\"dynamicReranker\":{\"enabled\":true,\"filter\":\"string\",\"numberOfItems\":1,\"minNumberOfEvents\":0},\"queryClassification\":{\"enabled\":true,\"actions\":[{\"action\":\"staticFilter\",\"minReliabilityLevel\":\"certain\"}],\"excludedPhrases\":[\"string\"],\"excludedCategories\":[\"string\"]}},\"geoSearch\":{\"geoSearchableAttribute\":\"string\"},\"queryRules\":{\"consequencesJoinOperators\":{\"standardFilters\":\"AND\",\"elasticFilters\":\"AND\"}}}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("PUT", "/search/v2/indices/%7BindexId%7D/config", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "indexName": "string",
              "description": "string",
              "itemsCatalogId": "string",
              "language": "string",
              "enabled": true,
              "ignoreUnavailableItems": true,
              "scoring": {
                "pageVisitsPopularity": 0,
                "transactionsPopularity": 0,
                "personalized": 0,
                "tieBreaker": 0,
                "matching": {
                  "type": "MinimumMatching",
                  "value": 1
                },
                "fallbackMatching": {
                  "type": "MinimumMatching",
                  "value": 1
                },
                "similarity": {
                  "type": "BM25",
                  "k1": 1.2,
                  "b": 0.75
                },
                "crossWorkspaceMode": {
                  "enabled": true
                }
              },
              "suggestions": {
                "smoothingModel": "Popularity",
                "gramSize": 3,
                "maxErrors": 2,
                "minWordLength": 4,
                "useAlways": false
              },
              "tokenizer": {
                "type": "Whitespace"
              },
              "analyzers": {
                "autocomplete": "Ngram"
              },
              "attributesWithoutPrefixSearch": [
                "brand",
                "color",
                "promotion.type"
              ],
              "attributesWithoutTypoTolerance": [
                "itemId",
                "link"
              ],
              "valuesWithoutTypoTolerance": [
                "Nike",
                "blue",
                "74997"
              ],
              "typoToleranceOnNumericValues": true,
              "searchableAttributes": {
                "fullText": [
                  "brand",
                  "color",
                  "promotion.type"
                ],
                "fullTextBoosted": [
                  "brand",
                  "color",
                  "promotion.type"
                ],
                "fullTextStronglyBoosted": [
                  "brand",
                  "color",
                  "promotion.type"
                ]
              },
              "displayableAttributes": [
                "brand",
                "color",
                "promotion.type"
              ],
              "facetableAttributes": {
                "range": [
                  "age",
                  "customScore.value",
                  "salePrice.value"
                ],
                "text": [
                  "brand",
                  "color",
                  "promotion.type"
                ],
                "datetime": [
                  "created",
                  "attributes.modifiedAt"
                ]
              },
              "filterableAttributes": {
                "range": [
                  "age",
                  "customScore.value",
                  "salePrice.value"
                ],
                "text": [
                  "brand",
                  "color",
                  "promotion.type"
                ],
                "datetime": [
                  "created",
                  "attributes.modifiedAt"
                ]
              },
              "sortableAttributes": {
                "range": [
                  "age",
                  "customScore.value",
                  "salePrice.value"
                ],
                "text": [
                  "brand",
                  "color",
                  "promotion.type"
                ],
                "datetime": [
                  "created",
                  "attributes.modifiedAt"
                ]
              },
              "distinctFilterAttributes": {
                "range": [
                  "age",
                  "customScore.value",
                  "salePrice.value"
                ],
                "text": [
                  "brand",
                  "color",
                  "promotion.type"
                ],
                "datetime": [
                  "created",
                  "attributes.modifiedAt"
                ]
              },
              "recentSearches": {
                "windowSize": 100,
                "timeSpan": {
                  "type": "DAYS",
                  "value": 30
                }
              },
              "reranking": {
                "dynamicReranker": {
                  "enabled": true,
                  "filter": "string",
                  "numberOfItems": 1,
                  "minNumberOfEvents": 0
                },
                "queryClassification": {
                  "enabled": true,
                  "actions": [
                    {
                      "action": "staticFilter",
                      "minReliabilityLevel": "certain"
                    }
                  ],
                  "excludedPhrases": [
                    "string"
                  ],
                  "excludedCategories": [
                    "string"
                  ]
                }
              },
              "geoSearch": {
                "geoSearchableAttribute": "string"
              },
              "queryRules": {
                "consequencesJoinOperators": {
                  "standardFilters": "AND",
                  "elasticFilters": "AND"
                }
              }
            });

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("PUT", "https://api.synerise.com/search/v2/indices/%7BindexId%7D/config");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "PUT",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/search/v2/indices/%7BindexId%7D/config",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify({
              indexName: 'string',
              description: 'string',
              itemsCatalogId: 'string',
              language: 'string',
              enabled: true,
              ignoreUnavailableItems: true,
              scoring: {
                pageVisitsPopularity: 0,
                transactionsPopularity: 0,
                personalized: 0,
                tieBreaker: 0,
                matching: {type: 'MinimumMatching', value: 1},
                fallbackMatching: {type: 'MinimumMatching', value: 1},
                similarity: {type: 'BM25', k1: 1.2, b: 0.75},
                crossWorkspaceMode: {enabled: true}
              },
              suggestions: {
                smoothingModel: 'Popularity',
                gramSize: 3,
                maxErrors: 2,
                minWordLength: 4,
                useAlways: false
              },
              tokenizer: {type: 'Whitespace'},
              analyzers: {autocomplete: 'Ngram'},
              attributesWithoutPrefixSearch: ['brand', 'color', 'promotion.type'],
              attributesWithoutTypoTolerance: ['itemId', 'link'],
              valuesWithoutTypoTolerance: ['Nike', 'blue', '74997'],
              typoToleranceOnNumericValues: true,
              searchableAttributes: {
                fullText: ['brand', 'color', 'promotion.type'],
                fullTextBoosted: ['brand', 'color', 'promotion.type'],
                fullTextStronglyBoosted: ['brand', 'color', 'promotion.type']
              },
              displayableAttributes: ['brand', 'color', 'promotion.type'],
              facetableAttributes: {
                range: ['age', 'customScore.value', 'salePrice.value'],
                text: ['brand', 'color', 'promotion.type'],
                datetime: ['created', 'attributes.modifiedAt']
              },
              filterableAttributes: {
                range: ['age', 'customScore.value', 'salePrice.value'],
                text: ['brand', 'color', 'promotion.type'],
                datetime: ['created', 'attributes.modifiedAt']
              },
              sortableAttributes: {
                range: ['age', 'customScore.value', 'salePrice.value'],
                text: ['brand', 'color', 'promotion.type'],
                datetime: ['created', 'attributes.modifiedAt']
              },
              distinctFilterAttributes: {
                range: ['age', 'customScore.value', 'salePrice.value'],
                text: ['brand', 'color', 'promotion.type'],
                datetime: ['created', 'attributes.modifiedAt']
              },
              recentSearches: {windowSize: 100, timeSpan: {type: 'DAYS', value: 30}},
              reranking: {
                dynamicReranker: {enabled: true, filter: 'string', numberOfItems: 1, minNumberOfEvents: 0},
                queryClassification: {
                  enabled: true,
                  actions: [{action: 'staticFilter', minReliabilityLevel: 'certain'}],
                  excludedPhrases: ['string'],
                  excludedCategories: ['string']
                }
              },
              geoSearch: {geoSearchableAttribute: 'string'},
              queryRules: {consequencesJoinOperators: {standardFilters: 'AND', elasticFilters: 'AND'}}
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/search/v2/indices/%7BindexId%7D/config');
            $request->setMethod(HTTP_METH_PUT);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"indexName":"string","description":"string","itemsCatalogId":"string","language":"string","enabled":true,"ignoreUnavailableItems":true,"scoring":{"pageVisitsPopularity":0,"transactionsPopularity":0,"personalized":0,"tieBreaker":0,"matching":{"type":"MinimumMatching","value":1},"fallbackMatching":{"type":"MinimumMatching","value":1},"similarity":{"type":"BM25","k1":1.2,"b":0.75},"crossWorkspaceMode":{"enabled":true}},"suggestions":{"smoothingModel":"Popularity","gramSize":3,"maxErrors":2,"minWordLength":4,"useAlways":false},"tokenizer":{"type":"Whitespace"},"analyzers":{"autocomplete":"Ngram"},"attributesWithoutPrefixSearch":["brand","color","promotion.type"],"attributesWithoutTypoTolerance":["itemId","link"],"valuesWithoutTypoTolerance":["Nike","blue","74997"],"typoToleranceOnNumericValues":true,"searchableAttributes":{"fullText":["brand","color","promotion.type"],"fullTextBoosted":["brand","color","promotion.type"],"fullTextStronglyBoosted":["brand","color","promotion.type"]},"displayableAttributes":["brand","color","promotion.type"],"facetableAttributes":{"range":["age","customScore.value","salePrice.value"],"text":["brand","color","promotion.type"],"datetime":["created","attributes.modifiedAt"]},"filterableAttributes":{"range":["age","customScore.value","salePrice.value"],"text":["brand","color","promotion.type"],"datetime":["created","attributes.modifiedAt"]},"sortableAttributes":{"range":["age","customScore.value","salePrice.value"],"text":["brand","color","promotion.type"],"datetime":["created","attributes.modifiedAt"]},"distinctFilterAttributes":{"range":["age","customScore.value","salePrice.value"],"text":["brand","color","promotion.type"],"datetime":["created","attributes.modifiedAt"]},"recentSearches":{"windowSize":100,"timeSpan":{"type":"DAYS","value":30}},"reranking":{"dynamicReranker":{"enabled":true,"filter":"string","numberOfItems":1,"minNumberOfEvents":0},"queryClassification":{"enabled":true,"actions":[{"action":"staticFilter","minReliabilityLevel":"certain"}],"excludedPhrases":["string"],"excludedCategories":["string"]}},"geoSearch":{"geoSearchableAttribute":"string"},"queryRules":{"consequencesJoinOperators":{"standardFilters":"AND","elasticFilters":"AND"}}}');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.put("https://api.synerise.com/search/v2/indices/%7BindexId%7D/config")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"indexName\":\"string\",\"description\":\"string\",\"itemsCatalogId\":\"string\",\"language\":\"string\",\"enabled\":true,\"ignoreUnavailableItems\":true,\"scoring\":{\"pageVisitsPopularity\":0,\"transactionsPopularity\":0,\"personalized\":0,\"tieBreaker\":0,\"matching\":{\"type\":\"MinimumMatching\",\"value\":1},\"fallbackMatching\":{\"type\":\"MinimumMatching\",\"value\":1},\"similarity\":{\"type\":\"BM25\",\"k1\":1.2,\"b\":0.75},\"crossWorkspaceMode\":{\"enabled\":true}},\"suggestions\":{\"smoothingModel\":\"Popularity\",\"gramSize\":3,\"maxErrors\":2,\"minWordLength\":4,\"useAlways\":false},\"tokenizer\":{\"type\":\"Whitespace\"},\"analyzers\":{\"autocomplete\":\"Ngram\"},\"attributesWithoutPrefixSearch\":[\"brand\",\"color\",\"promotion.type\"],\"attributesWithoutTypoTolerance\":[\"itemId\",\"link\"],\"valuesWithoutTypoTolerance\":[\"Nike\",\"blue\",\"74997\"],\"typoToleranceOnNumericValues\":true,\"searchableAttributes\":{\"fullText\":[\"brand\",\"color\",\"promotion.type\"],\"fullTextBoosted\":[\"brand\",\"color\",\"promotion.type\"],\"fullTextStronglyBoosted\":[\"brand\",\"color\",\"promotion.type\"]},\"displayableAttributes\":[\"brand\",\"color\",\"promotion.type\"],\"facetableAttributes\":{\"range\":[\"age\",\"customScore.value\",\"salePrice.value\"],\"text\":[\"brand\",\"color\",\"promotion.type\"],\"datetime\":[\"created\",\"attributes.modifiedAt\"]},\"filterableAttributes\":{\"range\":[\"age\",\"customScore.value\",\"salePrice.value\"],\"text\":[\"brand\",\"color\",\"promotion.type\"],\"datetime\":[\"created\",\"attributes.modifiedAt\"]},\"sortableAttributes\":{\"range\":[\"age\",\"customScore.value\",\"salePrice.value\"],\"text\":[\"brand\",\"color\",\"promotion.type\"],\"datetime\":[\"created\",\"attributes.modifiedAt\"]},\"distinctFilterAttributes\":{\"range\":[\"age\",\"customScore.value\",\"salePrice.value\"],\"text\":[\"brand\",\"color\",\"promotion.type\"],\"datetime\":[\"created\",\"attributes.modifiedAt\"]},\"recentSearches\":{\"windowSize\":100,\"timeSpan\":{\"type\":\"DAYS\",\"value\":30}},\"reranking\":{\"dynamicReranker\":{\"enabled\":true,\"filter\":\"string\",\"numberOfItems\":1,\"minNumberOfEvents\":0},\"queryClassification\":{\"enabled\":true,\"actions\":[{\"action\":\"staticFilter\",\"minReliabilityLevel\":\"certain\"}],\"excludedPhrases\":[\"string\"],\"excludedCategories\":[\"string\"]}},\"geoSearch\":{\"geoSearchableAttribute\":\"string\"},\"queryRules\":{\"consequencesJoinOperators\":{\"standardFilters\":\"AND\",\"elasticFilters\":\"AND\"}}}")
              .asString();
    delete:
      summary: Delete index configuration
      description: |
        Delete the configuration of a single index.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `ITEMS_SEARCH_CONFIG_SEARCH_DELETE`

        **User role permission required:** `assets_search: delete`
      operationId: deleteIndexConfigV2
      tags:
        - Search Configuration
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/items-search-config-InPathIndexId"
      responses:
        "204":
          description: Configuration deleted
        "500":
          description: Service not available
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/items-search-config-Error"
      x-snr-doc-urls:
        - /api-reference/ai-search#tag/Search-Configuration/operation/deleteIndexConfigV2
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request DELETE \
              --url https://api.synerise.com/search/v2/indices/%7BindexId%7D/config \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("DELETE", "/search/v2/indices/%7BindexId%7D/config", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("DELETE", "https://api.synerise.com/search/v2/indices/%7BindexId%7D/config");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "DELETE",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/search/v2/indices/%7BindexId%7D/config",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/search/v2/indices/%7BindexId%7D/config');
            $request->setMethod(HTTP_METH_DELETE);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.delete("https://api.synerise.com/search/v2/indices/%7BindexId%7D/config")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /search/v2/indices/{indexId}/state:
    get:
      summary: Get index state
      description: |
        Retrieve the state of a single index.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `ITEMS_SEARCH_CONFIG_SEARCH_READ`

        **User role permission required:** `assets_search: read`
      operationId: getIndexStateV2
      tags:
        - Search Configuration
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/items-search-config-InPathIndexId"
      responses:
        "200":
          description: State returned
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/items-search-config-IndexStateResponseSchema"
        "500":
          description: Service not available
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/items-search-config-Error"
      x-snr-doc-urls:
        - /api-reference/ai-search#tag/Search-Configuration/operation/getIndexStateV2
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/search/v2/indices/%7BindexId%7D/state \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("GET", "/search/v2/indices/%7BindexId%7D/state", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("GET", "https://api.synerise.com/search/v2/indices/%7BindexId%7D/state");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/search/v2/indices/%7BindexId%7D/state",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/search/v2/indices/%7BindexId%7D/state');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/search/v2/indices/%7BindexId%7D/state")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /search/v2/supported-languages:
    get:
      summary: Get supported languages
      description: |
        Retrieve supported languages.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `ITEMS_SEARCH_CONFIG_SEARCH_READ`

        **User role permission required:** `assets_search: read`
      operationId: getSupportedLanguagesV2
      tags:
        - Search Configuration
      security:
        - JWT: []
      responses:
        "200":
          description: Supported search languages as ISO 639-1 codes
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/items-search-config-SupportedLanguages"
        "500":
          description: Service not available
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/items-search-config-Error"
      x-snr-doc-urls:
        - /api-reference/ai-search#tag/Search-Configuration/operation/getSupportedLanguagesV2
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/search/v2/supported-languages \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("GET", "/search/v2/supported-languages", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("GET", "https://api.synerise.com/search/v2/supported-languages");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/search/v2/supported-languages",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/search/v2/supported-languages');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/search/v2/supported-languages")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /search/v2/indices/{indexId}/duplicate:
    get:
      summary: Duplicate index
      description: |
        duplicate index.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `ITEMS_SEARCH_CONFIG_SEARCH_CREATE`

        **User role permission required:** `assets_search: create`
      operationId: duplicateIndexV2Get
      tags:
        - Search Configuration
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/items-search-config-InPathIndexId"
      responses:
        "200":
          description: Returned newly created duplicate index
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/items-search-config-SearchConfigSchema"
        "500":
          description: Service not available
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/items-search-config-Error"
      x-snr-doc-urls:
        - /api-reference/ai-search#tag/Search-Configuration/operation/duplicateIndexV2Get
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/search/v2/indices/%7BindexId%7D/duplicate \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("GET", "/search/v2/indices/%7BindexId%7D/duplicate", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("GET", "https://api.synerise.com/search/v2/indices/%7BindexId%7D/duplicate");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/search/v2/indices/%7BindexId%7D/duplicate",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/search/v2/indices/%7BindexId%7D/duplicate');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/search/v2/indices/%7BindexId%7D/duplicate")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /search/v2/suggestion-indices:
    get:
      summary: Get suggestion indices
      description: |
        Retrieve a list of all suggestion index configurations in the workspace.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `ITEMS_SEARCH_CONFIG_SEARCH_READ`

        **User role permission required:** `assets_search: read`
      operationId: GetSuggestionsIndices
      tags:
        - Suggestions Configuration
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/items-search-config-paginationPage"
        - $ref: "#/components/parameters/items-search-config-paginationLimit"
        - $ref: "#/components/parameters/items-search-config-paginationSortBy"
        - $ref: "#/components/parameters/items-search-config-paginationOrdering"
        - $ref: "#/components/parameters/items-search-config-paginationIncludeMeta"
        - $ref: "#/components/parameters/items-search-config-nameFilter"
        - $ref: "#/components/parameters/items-search-config-queryFilter"
      responses:
        "200":
          description: List of suggestion index configurations
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/items-search-config-GetSuggestionIndicesResponseSchema"
        "500":
          description: An error occurred
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/items-search-config-Error"
      x-snr-doc-urls:
        - /api-reference/ai-search#tag/Suggestions-Configuration/operation/GetSuggestionsIndices
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/search/v2/suggestion-indices?page=4&limit=100&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&name=SOME_STRING_VALUE&query=SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("GET", "/search/v2/suggestion-indices?page=4&limit=100&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&name=SOME_STRING_VALUE&query=SOME_STRING_VALUE", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("GET", "https://api.synerise.com/search/v2/suggestion-indices?page=4&limit=100&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&name=SOME_STRING_VALUE&query=SOME_STRING_VALUE");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/search/v2/suggestion-indices?page=4&limit=100&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&name=SOME_STRING_VALUE&query=SOME_STRING_VALUE",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/search/v2/suggestion-indices');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'page' => '4',
              'limit' => '100',
              'sortBy' => 'SOME_STRING_VALUE',
              'ordering' => 'SOME_STRING_VALUE',
              'includeMeta' => 'SOME_BOOLEAN_VALUE',
              'name' => 'SOME_STRING_VALUE',
              'query' => 'SOME_STRING_VALUE'
            ]);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/search/v2/suggestion-indices?page=4&limit=100&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&name=SOME_STRING_VALUE&query=SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    post:
      summary: Create suggestion index
      description: |
        Create a suggestion index configuration.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `ITEMS_SEARCH_CONFIG_SEARCH_CREATE`

        **User role permission required:** `assets_search: create`
      operationId: PostSuggestionIndexConfig
      tags:
        - Suggestions Configuration
      security:
        - JWT: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                indexName:
                  $ref: "#/components/schemas/items-search-config-SuggestionIndexNameSchema"
                description:
                  $ref: "#/components/schemas/items-search-config-SuggestionIndexDescriptionSchema"
                author:
                  $ref: "#/components/schemas/items-search-config-SuggestionIndexAuthorSchema"
                enabled:
                  $ref: "#/components/schemas/items-search-config-SuggestionIndexEnabledSchema"
                sources:
                  $ref: "#/components/schemas/items-search-config-SuggestionIndexSourcesSchema"
                denylist:
                  $ref: "#/components/schemas/items-search-config-SuggestionIndexDenylistSchema"
              required:
                - indexName
                - enabled
                - sources
      responses:
        "200":
          description: Suggestion index config created
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/items-search-config-SuggestionIndexSchema"
        "500":
          description: An error occurred
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/items-search-config-Error"
      x-snr-doc-urls:
        - /api-reference/ai-search#tag/Suggestions-Configuration/operation/PostSuggestionIndexConfig
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/search/v2/suggestion-indices \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"indexName":"string","description":"string","author":0,"enabled":true,"sources":{"indices":[{"indexId":"string","minPopularity":5,"minHits":1,"minLetters":2,"daysInterval":30,"validate":false}],"external":[{"query":"string","count":0}],"generate":[{"itemsCatalogId":"string","attributes":["string"]}]},"denylist":[{"pattern":"string","matchingType":"Phrase"}]}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"indexName\":\"string\",\"description\":\"string\",\"author\":0,\"enabled\":true,\"sources\":{\"indices\":[{\"indexId\":\"string\",\"minPopularity\":5,\"minHits\":1,\"minLetters\":2,\"daysInterval\":30,\"validate\":false}],\"external\":[{\"query\":\"string\",\"count\":0}],\"generate\":[{\"itemsCatalogId\":\"string\",\"attributes\":[\"string\"]}]},\"denylist\":[{\"pattern\":\"string\",\"matchingType\":\"Phrase\"}]}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/search/v2/suggestion-indices", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "indexName": "string",
              "description": "string",
              "author": 0,
              "enabled": true,
              "sources": {
                "indices": [
                  {
                    "indexId": "string",
                    "minPopularity": 5,
                    "minHits": 1,
                    "minLetters": 2,
                    "daysInterval": 30,
                    "validate": false
                  }
                ],
                "external": [
                  {
                    "query": "string",
                    "count": 0
                  }
                ],
                "generate": [
                  {
                    "itemsCatalogId": "string",
                    "attributes": [
                      "string"
                    ]
                  }
                ]
              },
              "denylist": [
                {
                  "pattern": "string",
                  "matchingType": "Phrase"
                }
              ]
            });

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("POST", "https://api.synerise.com/search/v2/suggestion-indices");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/search/v2/suggestion-indices",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify({
              indexName: 'string',
              description: 'string',
              author: 0,
              enabled: true,
              sources: {
                indices: [
                  {
                    indexId: 'string',
                    minPopularity: 5,
                    minHits: 1,
                    minLetters: 2,
                    daysInterval: 30,
                    validate: false
                  }
                ],
                external: [{query: 'string', count: 0}],
                generate: [{itemsCatalogId: 'string', attributes: ['string']}]
              },
              denylist: [{pattern: 'string', matchingType: 'Phrase'}]
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/search/v2/suggestion-indices');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"indexName":"string","description":"string","author":0,"enabled":true,"sources":{"indices":[{"indexId":"string","minPopularity":5,"minHits":1,"minLetters":2,"daysInterval":30,"validate":false}],"external":[{"query":"string","count":0}],"generate":[{"itemsCatalogId":"string","attributes":["string"]}]},"denylist":[{"pattern":"string","matchingType":"Phrase"}]}');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/search/v2/suggestion-indices")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"indexName\":\"string\",\"description\":\"string\",\"author\":0,\"enabled\":true,\"sources\":{\"indices\":[{\"indexId\":\"string\",\"minPopularity\":5,\"minHits\":1,\"minLetters\":2,\"daysInterval\":30,\"validate\":false}],\"external\":[{\"query\":\"string\",\"count\":0}],\"generate\":[{\"itemsCatalogId\":\"string\",\"attributes\":[\"string\"]}]},\"denylist\":[{\"pattern\":\"string\",\"matchingType\":\"Phrase\"}]}")
              .asString();
  /search/v2/suggestion-indices/{indexId}/config:
    get:
      summary: Get suggestion index
      description: |
        Retrieve a suggestion index configuration.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `ITEMS_SEARCH_CONFIG_SEARCH_READ`

        **User role permission required:** `assets_search: read`
      operationId: GetSuggestionsIndex
      tags:
        - Suggestions Configuration
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/items-search-config-InPathIndexId"
      responses:
        "200":
          description: Suggestion index configuration
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/items-search-config-SuggestionIndexSchema"
        "500":
          description: An error occurred
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/items-search-config-Error"
      x-snr-doc-urls:
        - /api-reference/ai-search#tag/Suggestions-Configuration/operation/GetSuggestionsIndex
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/search/v2/suggestion-indices/%7BindexId%7D/config \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("GET", "/search/v2/suggestion-indices/%7BindexId%7D/config", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("GET", "https://api.synerise.com/search/v2/suggestion-indices/%7BindexId%7D/config");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/search/v2/suggestion-indices/%7BindexId%7D/config",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/search/v2/suggestion-indices/%7BindexId%7D/config');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/search/v2/suggestion-indices/%7BindexId%7D/config")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    put:
      summary: Create/replace suggestion index
      description: |
        Create a suggestion index configuration or replace an existing one, given the index ID.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `ITEMS_SEARCH_CONFIG_SEARCH_UPDATE`

        **User role permission required:** `assets_search: update`
      operationId: PutSuggestionIndexConfig
      tags:
        - Suggestions Configuration
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/items-search-config-InPathIndexId"
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                indexName:
                  $ref: "#/components/schemas/items-search-config-SuggestionIndexNameSchema"
                description:
                  $ref: "#/components/schemas/items-search-config-SuggestionIndexDescriptionSchema"
                author:
                  $ref: "#/components/schemas/items-search-config-SuggestionIndexAuthorSchema"
                enabled:
                  $ref: "#/components/schemas/items-search-config-SuggestionIndexEnabledSchema"
                sources:
                  $ref: "#/components/schemas/items-search-config-SuggestionIndexSourcesSchema"
                denylist:
                  $ref: "#/components/schemas/items-search-config-SuggestionIndexDenylistSchema"
              required:
                - indexName
                - enabled
                - sources
      responses:
        "200":
          description: Suggestion index config created or replaced successfully
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/items-search-config-SuggestionIndexSchema"
        "500":
          description: An error occurred
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/items-search-config-Error"
      x-snr-doc-urls:
        - /api-reference/ai-search#tag/Suggestions-Configuration/operation/PutSuggestionIndexConfig
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request PUT \
              --url https://api.synerise.com/search/v2/suggestion-indices/%7BindexId%7D/config \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"indexName":"string","description":"string","author":0,"enabled":true,"sources":{"indices":[{"indexId":"string","minPopularity":5,"minHits":1,"minLetters":2,"daysInterval":30,"validate":false}],"external":[{"query":"string","count":0}],"generate":[{"itemsCatalogId":"string","attributes":["string"]}]},"denylist":[{"pattern":"string","matchingType":"Phrase"}]}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"indexName\":\"string\",\"description\":\"string\",\"author\":0,\"enabled\":true,\"sources\":{\"indices\":[{\"indexId\":\"string\",\"minPopularity\":5,\"minHits\":1,\"minLetters\":2,\"daysInterval\":30,\"validate\":false}],\"external\":[{\"query\":\"string\",\"count\":0}],\"generate\":[{\"itemsCatalogId\":\"string\",\"attributes\":[\"string\"]}]},\"denylist\":[{\"pattern\":\"string\",\"matchingType\":\"Phrase\"}]}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("PUT", "/search/v2/suggestion-indices/%7BindexId%7D/config", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "indexName": "string",
              "description": "string",
              "author": 0,
              "enabled": true,
              "sources": {
                "indices": [
                  {
                    "indexId": "string",
                    "minPopularity": 5,
                    "minHits": 1,
                    "minLetters": 2,
                    "daysInterval": 30,
                    "validate": false
                  }
                ],
                "external": [
                  {
                    "query": "string",
                    "count": 0
                  }
                ],
                "generate": [
                  {
                    "itemsCatalogId": "string",
                    "attributes": [
                      "string"
                    ]
                  }
                ]
              },
              "denylist": [
                {
                  "pattern": "string",
                  "matchingType": "Phrase"
                }
              ]
            });

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("PUT", "https://api.synerise.com/search/v2/suggestion-indices/%7BindexId%7D/config");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "PUT",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/search/v2/suggestion-indices/%7BindexId%7D/config",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify({
              indexName: 'string',
              description: 'string',
              author: 0,
              enabled: true,
              sources: {
                indices: [
                  {
                    indexId: 'string',
                    minPopularity: 5,
                    minHits: 1,
                    minLetters: 2,
                    daysInterval: 30,
                    validate: false
                  }
                ],
                external: [{query: 'string', count: 0}],
                generate: [{itemsCatalogId: 'string', attributes: ['string']}]
              },
              denylist: [{pattern: 'string', matchingType: 'Phrase'}]
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/search/v2/suggestion-indices/%7BindexId%7D/config');
            $request->setMethod(HTTP_METH_PUT);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"indexName":"string","description":"string","author":0,"enabled":true,"sources":{"indices":[{"indexId":"string","minPopularity":5,"minHits":1,"minLetters":2,"daysInterval":30,"validate":false}],"external":[{"query":"string","count":0}],"generate":[{"itemsCatalogId":"string","attributes":["string"]}]},"denylist":[{"pattern":"string","matchingType":"Phrase"}]}');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.put("https://api.synerise.com/search/v2/suggestion-indices/%7BindexId%7D/config")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"indexName\":\"string\",\"description\":\"string\",\"author\":0,\"enabled\":true,\"sources\":{\"indices\":[{\"indexId\":\"string\",\"minPopularity\":5,\"minHits\":1,\"minLetters\":2,\"daysInterval\":30,\"validate\":false}],\"external\":[{\"query\":\"string\",\"count\":0}],\"generate\":[{\"itemsCatalogId\":\"string\",\"attributes\":[\"string\"]}]},\"denylist\":[{\"pattern\":\"string\",\"matchingType\":\"Phrase\"}]}")
              .asString();
    delete:
      summary: Delete suggestion index
      description: |
        Delete a suggestion index configuration.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `ITEMS_SEARCH_CONFIG_SEARCH_DELETE`

        **User role permission required:** `assets_search: delete`
      operationId: DeleteSuggestionIndexConfig
      tags:
        - Suggestions Configuration
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/items-search-config-InPathIndexId"
      responses:
        "204":
          description: Suggestion index config deleted
        "500":
          description: An error occurred
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/items-search-config-Error"
      x-snr-doc-urls:
        - /api-reference/ai-search#tag/Suggestions-Configuration/operation/DeleteSuggestionIndexConfig
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request DELETE \
              --url https://api.synerise.com/search/v2/suggestion-indices/%7BindexId%7D/config \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("DELETE", "/search/v2/suggestion-indices/%7BindexId%7D/config", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("DELETE", "https://api.synerise.com/search/v2/suggestion-indices/%7BindexId%7D/config");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "DELETE",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/search/v2/suggestion-indices/%7BindexId%7D/config",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/search/v2/suggestion-indices/%7BindexId%7D/config');
            $request->setMethod(HTTP_METH_DELETE);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.delete("https://api.synerise.com/search/v2/suggestion-indices/%7BindexId%7D/config")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /search/v2/suggestion-indices/{indexId}/state:
    get:
      summary: Get suggestion index state
      description: |
        Retrieve the state of a single suggestion index.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `ITEMS_SEARCH_CONFIG_SEARCH_READ`

        **User role permission required:** `assets_search: read`
      operationId: GetSuggestionsIndexState
      tags:
        - Suggestions Configuration
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/items-search-config-InPathIndexId"
      responses:
        "200":
          description: Suggestion index state
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/items-search-config-IndexStateResponseSchema"
        "500":
          description: An error occurred
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/items-search-config-Error"
      x-snr-doc-urls:
        - /api-reference/ai-search#tag/Suggestions-Configuration/operation/GetSuggestionsIndexState
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/search/v2/suggestion-indices/%7BindexId%7D/state \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("GET", "/search/v2/suggestion-indices/%7BindexId%7D/state", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("GET", "https://api.synerise.com/search/v2/suggestion-indices/%7BindexId%7D/state");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/search/v2/suggestion-indices/%7BindexId%7D/state",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/search/v2/suggestion-indices/%7BindexId%7D/state');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/search/v2/suggestion-indices/%7BindexId%7D/state")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /search/v2/indices/{indexId}/deleted-searches:
    get:
      summary: Get deleted searches
      description: |
        Retrieve the searches deleted from a profile's history.

        ---

        **API consumers:** <span title="Deprecated">AI API key (legacy)</span>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/docs/settings/tool/tracking_codes" target="_blank" rel="noopener" title="Pass your tracker key in the request header">Web SDK Tracker</a>

        **API key permission required:** `ITEMS_SEARCH_RECENT_SEARCH_READ`
      operationId: GetDeletedSearches
      tags:
        - Search
      security:
        - JWT: []
        - TrackerKey: []
      parameters:
        - $ref: "#/components/parameters/items-search-recent-indexId"
        - $ref: "#/components/parameters/items-search-recent-clientUUID"
      responses:
        "200":
          description: Deleted searches returned
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/items-search-recent-DeletedSearch"
        "400":
          description: Check error message for more details
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/items-search-recent-Error"
      x-snr-doc-urls:
        - /api-reference/ai-search#tag/Search/operation/GetDeletedSearches
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/search/v2/indices/4add1a1fa877c1651906bb22c9dfd37a1618852272/deleted-searches?clientUUID=e0097757-d1e2-44ac-ba3c-d97979a354c1' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("GET", "/search/v2/indices/4add1a1fa877c1651906bb22c9dfd37a1618852272/deleted-searches?clientUUID=e0097757-d1e2-44ac-ba3c-d97979a354c1", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("GET", "https://api.synerise.com/search/v2/indices/4add1a1fa877c1651906bb22c9dfd37a1618852272/deleted-searches?clientUUID=e0097757-d1e2-44ac-ba3c-d97979a354c1");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/search/v2/indices/4add1a1fa877c1651906bb22c9dfd37a1618852272/deleted-searches?clientUUID=e0097757-d1e2-44ac-ba3c-d97979a354c1",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/search/v2/indices/4add1a1fa877c1651906bb22c9dfd37a1618852272/deleted-searches');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'clientUUID' => 'e0097757-d1e2-44ac-ba3c-d97979a354c1'
            ]);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/search/v2/indices/4add1a1fa877c1651906bb22c9dfd37a1618852272/deleted-searches?clientUUID=e0097757-d1e2-44ac-ba3c-d97979a354c1")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    post:
      summary: Soft-delete a recent search
      description: |
        Delete a recent search from the history accessible to a profile. The search remains in the database and you can retrieve it by using [this endpoint](#operation/GetDeletedSearches).

        ---

        **API consumers:** <span title="Deprecated">AI API key (legacy)</span>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/docs/settings/tool/tracking_codes" target="_blank" rel="noopener" title="Pass your tracker key in the request header">Web SDK Tracker</a>

        **API key permission required:** `ITEMS_SEARCH_RECENT_SEARCH_CREATE`
      operationId: PostDeletedSearch
      tags:
        - Search
      security:
        - JWT: []
        - TrackerKey: []
      parameters:
        - $ref: "#/components/parameters/items-search-recent-indexId"
        - $ref: "#/components/parameters/items-search-recent-clientUUID"
      requestBody:
        description: Request for deleting search query
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/items-search-recent-DeletedSearch"
      responses:
        "204":
          description: Soft-delete successful
        "400":
          description: Check error message for more details
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/items-search-recent-Error"
      x-snr-doc-urls:
        - /api-reference/ai-search#tag/Search/operation/PostDeletedSearch
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url 'https://api.synerise.com/search/v2/indices/4add1a1fa877c1651906bb22c9dfd37a1618852272/deleted-searches?clientUUID=e0097757-d1e2-44ac-ba3c-d97979a354c1' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"query":"string","match":"query","timestamp":"2019-08-24T14:15:22Z"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"query\":\"string\",\"match\":\"query\",\"timestamp\":\"2019-08-24T14:15:22Z\"}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/search/v2/indices/4add1a1fa877c1651906bb22c9dfd37a1618852272/deleted-searches?clientUUID=e0097757-d1e2-44ac-ba3c-d97979a354c1", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "query": "string",
              "match": "query",
              "timestamp": "2019-08-24T14:15:22Z"
            });

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("POST", "https://api.synerise.com/search/v2/indices/4add1a1fa877c1651906bb22c9dfd37a1618852272/deleted-searches?clientUUID=e0097757-d1e2-44ac-ba3c-d97979a354c1");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/search/v2/indices/4add1a1fa877c1651906bb22c9dfd37a1618852272/deleted-searches?clientUUID=e0097757-d1e2-44ac-ba3c-d97979a354c1",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify({query: 'string', match: 'query', timestamp: '2019-08-24T14:15:22Z'}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/search/v2/indices/4add1a1fa877c1651906bb22c9dfd37a1618852272/deleted-searches');
            $request->setMethod(HTTP_METH_POST);

            $request->setQueryData([
              'clientUUID' => 'e0097757-d1e2-44ac-ba3c-d97979a354c1'
            ]);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"query":"string","match":"query","timestamp":"2019-08-24T14:15:22Z"}');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/search/v2/indices/4add1a1fa877c1651906bb22c9dfd37a1618852272/deleted-searches?clientUUID=e0097757-d1e2-44ac-ba3c-d97979a354c1")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"query\":\"string\",\"match\":\"query\",\"timestamp\":\"2019-08-24T14:15:22Z\"}")
              .asString();
  /search/v2/indices/{indexId}/recent-searches:
    get:
      summary: Get recent searches
      description: |
        Get a profile's recent searches from a particular index.

        ---

        **API consumers:** <span title="Deprecated">AI API key (legacy)</span>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/docs/settings/tool/tracking_codes" target="_blank" rel="noopener" title="Pass your tracker key in the request header">Web SDK Tracker</a>

        **API key permission required:** `ITEMS_SEARCH_RECENT_SEARCH_READ`
      operationId: GetRecentSearches
      tags:
        - Search
      security:
        - JWT: []
        - TrackerKey: []
      parameters:
        - $ref: "#/components/parameters/items-search-recent-indexId"
        - $ref: "#/components/parameters/items-search-recent-clientUUID"
        - $ref: "#/components/parameters/items-search-recent-windowSize"
        - $ref: "#/components/parameters/items-search-recent-timeUnit"
        - $ref: "#/components/parameters/items-search-recent-timeValue"
      responses:
        "200":
          description: Recent searches returned
          content:
            application/json:
              schema:
                type: array
                items:
                  type: string
                  description: Recent search query
        "400":
          description: Check error message for more details
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/items-search-recent-Error"
      x-snr-doc-urls:
        - /api-reference/ai-search#tag/Search/operation/GetRecentSearches
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/search/v2/indices/4add1a1fa877c1651906bb22c9dfd37a1618852272/recent-searches?clientUUID=e0097757-d1e2-44ac-ba3c-d97979a354c1&windowSize=SOME_INTEGER_VALUE&timeUnit=SOME_STRING_VALUE&timeValue=SOME_INTEGER_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("GET", "/search/v2/indices/4add1a1fa877c1651906bb22c9dfd37a1618852272/recent-searches?clientUUID=e0097757-d1e2-44ac-ba3c-d97979a354c1&windowSize=SOME_INTEGER_VALUE&timeUnit=SOME_STRING_VALUE&timeValue=SOME_INTEGER_VALUE", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("GET", "https://api.synerise.com/search/v2/indices/4add1a1fa877c1651906bb22c9dfd37a1618852272/recent-searches?clientUUID=e0097757-d1e2-44ac-ba3c-d97979a354c1&windowSize=SOME_INTEGER_VALUE&timeUnit=SOME_STRING_VALUE&timeValue=SOME_INTEGER_VALUE");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/search/v2/indices/4add1a1fa877c1651906bb22c9dfd37a1618852272/recent-searches?clientUUID=e0097757-d1e2-44ac-ba3c-d97979a354c1&windowSize=SOME_INTEGER_VALUE&timeUnit=SOME_STRING_VALUE&timeValue=SOME_INTEGER_VALUE",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/search/v2/indices/4add1a1fa877c1651906bb22c9dfd37a1618852272/recent-searches');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'clientUUID' => 'e0097757-d1e2-44ac-ba3c-d97979a354c1',
              'windowSize' => 'SOME_INTEGER_VALUE',
              'timeUnit' => 'SOME_STRING_VALUE',
              'timeValue' => 'SOME_INTEGER_VALUE'
            ]);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/search/v2/indices/4add1a1fa877c1651906bb22c9dfd37a1618852272/recent-searches?clientUUID=e0097757-d1e2-44ac-ba3c-d97979a354c1&windowSize=SOME_INTEGER_VALUE&timeUnit=SOME_STRING_VALUE&timeValue=SOME_INTEGER_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /search/v2/indices/{indexId}/rules:
    get:
      summary: Get rules
      description: |
        Retrieves a list of rules.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `QUERY_RULES_SEARCH_READ`

        **User role permission required:** `assets_search: read`
      operationId: GetRulesV2
      tags:
        - Query Rules
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/query-rules-v2-inPathIndexId"
        - $ref: "#/components/parameters/query-rules-v2-statusFilter"
        - $ref: "#/components/parameters/query-rules-v2-nameFilter"
        - $ref: "#/components/parameters/query-rules-v2-paginationPage"
        - $ref: "#/components/parameters/query-rules-v2-paginationLimit"
        - $ref: "#/components/parameters/query-rules-v2-paginationSortBy"
        - $ref: "#/components/parameters/query-rules-v2-paginationOrdering"
        - $ref: "#/components/parameters/query-rules-v2-paginationIncludeMeta"
        - $ref: "#/components/parameters/query-rules-v2-inQueryDirectoryId"
        - $ref: "#/components/parameters/query-rules-v2-InQuerySearch"
        - $ref: "#/components/parameters/query-rules-v2-consequenceTypeFilter"
      responses:
        "200":
          description: List of rules
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/query-rules-v2-PaginatedRules"
        "500":
          description: An error occurred
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/query-rules-v2-Error"
      x-snr-doc-urls:
        - /api-reference/ai-search#tag/Query-Rules/operation/GetRulesV2
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/search/v2/indices/%7BindexId%7D/rules?status=SOME_STRING_VALUE&name=SOME_STRING_VALUE&page=4&limit=100&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&directoryId=SOME_STRING_VALUE&search=SOME_STRING_VALUE&consequenceType=SOME_ARRAY_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("GET", "/search/v2/indices/%7BindexId%7D/rules?status=SOME_STRING_VALUE&name=SOME_STRING_VALUE&page=4&limit=100&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&directoryId=SOME_STRING_VALUE&search=SOME_STRING_VALUE&consequenceType=SOME_ARRAY_VALUE", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("GET", "https://api.synerise.com/search/v2/indices/%7BindexId%7D/rules?status=SOME_STRING_VALUE&name=SOME_STRING_VALUE&page=4&limit=100&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&directoryId=SOME_STRING_VALUE&search=SOME_STRING_VALUE&consequenceType=SOME_ARRAY_VALUE");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/search/v2/indices/%7BindexId%7D/rules?status=SOME_STRING_VALUE&name=SOME_STRING_VALUE&page=4&limit=100&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&directoryId=SOME_STRING_VALUE&search=SOME_STRING_VALUE&consequenceType=SOME_ARRAY_VALUE",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/search/v2/indices/%7BindexId%7D/rules');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'status' => 'SOME_STRING_VALUE',
              'name' => 'SOME_STRING_VALUE',
              'page' => '4',
              'limit' => '100',
              'sortBy' => 'SOME_STRING_VALUE',
              'ordering' => 'SOME_STRING_VALUE',
              'includeMeta' => 'SOME_BOOLEAN_VALUE',
              'directoryId' => 'SOME_STRING_VALUE',
              'search' => 'SOME_STRING_VALUE',
              'consequenceType' => 'SOME_ARRAY_VALUE'
            ]);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/search/v2/indices/%7BindexId%7D/rules?status=SOME_STRING_VALUE&name=SOME_STRING_VALUE&page=4&limit=100&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&directoryId=SOME_STRING_VALUE&search=SOME_STRING_VALUE&consequenceType=SOME_ARRAY_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    post:
      summary: Create rule
      description: |
        Creates a new rule.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `QUERY_RULES_SEARCH_CREATE`

        **User role permission required:** `assets_search: create`
      operationId: PostRuleV2
      tags:
        - Query Rules
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/query-rules-v2-inPathIndexId"
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  $ref: "#/components/schemas/query-rules-v2-RuleName"
                author:
                  $ref: "#/components/schemas/query-rules-v2-RuleAuthor"
                activeFrom:
                  $ref: "#/components/schemas/query-rules-v2-RuleActiveFromDatetime"
                activeTo:
                  $ref: "#/components/schemas/query-rules-v2-RuleActiveToDatetime"
                timezone:
                  $ref: "#/components/schemas/query-rules-v2-RuleTimezoneSchema"
                data:
                  $ref: "#/components/schemas/query-rules-v2-RuleDataSchema"
        description: Request for posting a new rule or updating an existing one
        required: true
      responses:
        "200":
          description: ID of the new rule
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/query-rules-v2-RuleWithStatus"
        "500":
          description: An error occurred
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/query-rules-v2-Error"
      x-snr-doc-urls:
        - /api-reference/ai-search#tag/Query-Rules/operation/PostRuleV2
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/search/v2/indices/%7BindexId%7D/rules \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"name":"string","author":0,"activeFrom":"string","activeTo":"string","timezone":"string","data":{"audience":{"segmentationIds":["34ab56cd-789be-22ee-11ab-123456789abc","12xy34z5-456b-33cc-7o52-987654321ece"]},"conditions":{"patterns":["phone","notebook","mouse {color} {brand}"],"matchingType":"is","contexts":["listing","web","mobile"],"filters":{"textFilters":{"color":{"values":["green","red"],"matchingType":"InUserFilters"}},"rangeFilters":{"price":{"ranges":[{"rightEnd":{"value":20,"inclusive":true}}],"matchingType":"Exact"}},"datetimeFilters":{"created":{"ranges":[{"rightEnd":{"value":"2024-01-01","inclusive":true}}],"matchingType":"Exact"}}}},"queryConsequences":[{"type":"removeWord","word":"string","replacement":"string"}],"postQueryConsequences":{"hideHits":["string"],"promoteHits":[{"id":"string","position":0}],"promoteHitsPositionStrategy":{"type":"custom"},"standardFilters":{"textFilters":[{"attribute":"brand","mode":"include","values":["A-Brand","B-Brand","{brand}"]}],"rangeFilters":[{"attribute":"price","operator":"gt","value":"{price}"}],"datetimeFilters":[{"attribute":"created","operator":"gt","value":"{created}"}]},"elasticFilters":{"textFilters":[{"attribute":"brand","mode":"include","values":["A-Brand","B-Brand","{brand}"]}],"rangeFilters":[{"attribute":"price","operator":"gt","value":"{price}"}],"datetimeFilters":[{"attribute":"created","operator":"gt","value":"{created}"}]},"boostFilters":[{"weight":-100,"filters":{"textFilters":[{"attribute":"brand","mode":"include","values":["A-Brand","B-Brand","{brand}"]}],"rangeFilters":[{"attribute":"price","operator":"gt","value":"{price}"}],"datetimeFilters":[{"attribute":"created","operator":"gt","value":"{created}"}]}}],"topHitsFilters":[{"hitsNumber":1,"filters":{"textFilters":[{"attribute":"brand","mode":"include","values":["A-Brand","B-Brand","{brand}"]}],"rangeFilters":[{"attribute":"price","operator":"gt","value":"{price}"}],"datetimeFilters":[{"attribute":"created","operator":"gt","value":"{created}"}]}}],"distinctFilter":{"attribute":"string","maxNumItems":0,"categoryLevelModifier":0},"sortBy":{"attribute":"string","ordering":"desc"},"customData":"{\"customLandingPage\": \"https://synerise.com/\"}","returnNoData":false,"pinFacets":[{"attribute":"size","position":1},{"attribute":"width","position":2},{"attribute":"gift_wrap"}],"hideFacets":["material","fabric","sleeve_length"]}}}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"name\":\"string\",\"author\":0,\"activeFrom\":\"string\",\"activeTo\":\"string\",\"timezone\":\"string\",\"data\":{\"audience\":{\"segmentationIds\":[\"34ab56cd-789be-22ee-11ab-123456789abc\",\"12xy34z5-456b-33cc-7o52-987654321ece\"]},\"conditions\":{\"patterns\":[\"phone\",\"notebook\",\"mouse {color} {brand}\"],\"matchingType\":\"is\",\"contexts\":[\"listing\",\"web\",\"mobile\"],\"filters\":{\"textFilters\":{\"color\":{\"values\":[\"green\",\"red\"],\"matchingType\":\"InUserFilters\"}},\"rangeFilters\":{\"price\":{\"ranges\":[{\"rightEnd\":{\"value\":20,\"inclusive\":true}}],\"matchingType\":\"Exact\"}},\"datetimeFilters\":{\"created\":{\"ranges\":[{\"rightEnd\":{\"value\":\"2024-01-01\",\"inclusive\":true}}],\"matchingType\":\"Exact\"}}}},\"queryConsequences\":[{\"type\":\"removeWord\",\"word\":\"string\",\"replacement\":\"string\"}],\"postQueryConsequences\":{\"hideHits\":[\"string\"],\"promoteHits\":[{\"id\":\"string\",\"position\":0}],\"promoteHitsPositionStrategy\":{\"type\":\"custom\"},\"standardFilters\":{\"textFilters\":[{\"attribute\":\"brand\",\"mode\":\"include\",\"values\":[\"A-Brand\",\"B-Brand\",\"{brand}\"]}],\"rangeFilters\":[{\"attribute\":\"price\",\"operator\":\"gt\",\"value\":\"{price}\"}],\"datetimeFilters\":[{\"attribute\":\"created\",\"operator\":\"gt\",\"value\":\"{created}\"}]},\"elasticFilters\":{\"textFilters\":[{\"attribute\":\"brand\",\"mode\":\"include\",\"values\":[\"A-Brand\",\"B-Brand\",\"{brand}\"]}],\"rangeFilters\":[{\"attribute\":\"price\",\"operator\":\"gt\",\"value\":\"{price}\"}],\"datetimeFilters\":[{\"attribute\":\"created\",\"operator\":\"gt\",\"value\":\"{created}\"}]},\"boostFilters\":[{\"weight\":-100,\"filters\":{\"textFilters\":[{\"attribute\":\"brand\",\"mode\":\"include\",\"values\":[\"A-Brand\",\"B-Brand\",\"{brand}\"]}],\"rangeFilters\":[{\"attribute\":\"price\",\"operator\":\"gt\",\"value\":\"{price}\"}],\"datetimeFilters\":[{\"attribute\":\"created\",\"operator\":\"gt\",\"value\":\"{created}\"}]}}],\"topHitsFilters\":[{\"hitsNumber\":1,\"filters\":{\"textFilters\":[{\"attribute\":\"brand\",\"mode\":\"include\",\"values\":[\"A-Brand\",\"B-Brand\",\"{brand}\"]}],\"rangeFilters\":[{\"attribute\":\"price\",\"operator\":\"gt\",\"value\":\"{price}\"}],\"datetimeFilters\":[{\"attribute\":\"created\",\"operator\":\"gt\",\"value\":\"{created}\"}]}}],\"distinctFilter\":{\"attribute\":\"string\",\"maxNumItems\":0,\"categoryLevelModifier\":0},\"sortBy\":{\"attribute\":\"string\",\"ordering\":\"desc\"},\"customData\":\"{\\\"customLandingPage\\\": \\\"https://synerise.com/\\\"}\",\"returnNoData\":false,\"pinFacets\":[{\"attribute\":\"size\",\"position\":1},{\"attribute\":\"width\",\"position\":2},{\"attribute\":\"gift_wrap\"}],\"hideFacets\":[\"material\",\"fabric\",\"sleeve_length\"]}}}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/search/v2/indices/%7BindexId%7D/rules", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "name": "string",
              "author": 0,
              "activeFrom": "string",
              "activeTo": "string",
              "timezone": "string",
              "data": {
                "audience": {
                  "segmentationIds": [
                    "34ab56cd-789be-22ee-11ab-123456789abc",
                    "12xy34z5-456b-33cc-7o52-987654321ece"
                  ]
                },
                "conditions": {
                  "patterns": [
                    "phone",
                    "notebook",
                    "mouse {color} {brand}"
                  ],
                  "matchingType": "is",
                  "contexts": [
                    "listing",
                    "web",
                    "mobile"
                  ],
                  "filters": {
                    "textFilters": {
                      "color": {
                        "values": [
                          "green",
                          "red"
                        ],
                        "matchingType": "InUserFilters"
                      }
                    },
                    "rangeFilters": {
                      "price": {
                        "ranges": [
                          {
                            "rightEnd": {
                              "value": 20,
                              "inclusive": true
                            }
                          }
                        ],
                        "matchingType": "Exact"
                      }
                    },
                    "datetimeFilters": {
                      "created": {
                        "ranges": [
                          {
                            "rightEnd": {
                              "value": "2024-01-01",
                              "inclusive": true
                            }
                          }
                        ],
                        "matchingType": "Exact"
                      }
                    }
                  }
                },
                "queryConsequences": [
                  {
                    "type": "removeWord",
                    "word": "string",
                    "replacement": "string"
                  }
                ],
                "postQueryConsequences": {
                  "hideHits": [
                    "string"
                  ],
                  "promoteHits": [
                    {
                      "id": "string",
                      "position": 0
                    }
                  ],
                  "promoteHitsPositionStrategy": {
                    "type": "custom"
                  },
                  "standardFilters": {
                    "textFilters": [
                      {
                        "attribute": "brand",
                        "mode": "include",
                        "values": [
                          "A-Brand",
                          "B-Brand",
                          "{brand}"
                        ]
                      }
                    ],
                    "rangeFilters": [
                      {
                        "attribute": "price",
                        "operator": "gt",
                        "value": "{price}"
                      }
                    ],
                    "datetimeFilters": [
                      {
                        "attribute": "created",
                        "operator": "gt",
                        "value": "{created}"
                      }
                    ]
                  },
                  "elasticFilters": {
                    "textFilters": [
                      {
                        "attribute": "brand",
                        "mode": "include",
                        "values": [
                          "A-Brand",
                          "B-Brand",
                          "{brand}"
                        ]
                      }
                    ],
                    "rangeFilters": [
                      {
                        "attribute": "price",
                        "operator": "gt",
                        "value": "{price}"
                      }
                    ],
                    "datetimeFilters": [
                      {
                        "attribute": "created",
                        "operator": "gt",
                        "value": "{created}"
                      }
                    ]
                  },
                  "boostFilters": [
                    {
                      "weight": -100,
                      "filters": {
                        "textFilters": [
                          {
                            "attribute": "brand",
                            "mode": "include",
                            "values": [
                              "A-Brand",
                              "B-Brand",
                              "{brand}"
                            ]
                          }
                        ],
                        "rangeFilters": [
                          {
                            "attribute": "price",
                            "operator": "gt",
                            "value": "{price}"
                          }
                        ],
                        "datetimeFilters": [
                          {
                            "attribute": "created",
                            "operator": "gt",
                            "value": "{created}"
                          }
                        ]
                      }
                    }
                  ],
                  "topHitsFilters": [
                    {
                      "hitsNumber": 1,
                      "filters": {
                        "textFilters": [
                          {
                            "attribute": "brand",
                            "mode": "include",
                            "values": [
                              "A-Brand",
                              "B-Brand",
                              "{brand}"
                            ]
                          }
                        ],
                        "rangeFilters": [
                          {
                            "attribute": "price",
                            "operator": "gt",
                            "value": "{price}"
                          }
                        ],
                        "datetimeFilters": [
                          {
                            "attribute": "created",
                            "operator": "gt",
                            "value": "{created}"
                          }
                        ]
                      }
                    }
                  ],
                  "distinctFilter": {
                    "attribute": "string",
                    "maxNumItems": 0,
                    "categoryLevelModifier": 0
                  },
                  "sortBy": {
                    "attribute": "string",
                    "ordering": "desc"
                  },
                  "customData": "{\"customLandingPage\": \"https://synerise.com/\"}",
                  "returnNoData": false,
                  "pinFacets": [
                    {
                      "attribute": "size",
                      "position": 1
                    },
                    {
                      "attribute": "width",
                      "position": 2
                    },
                    {
                      "attribute": "gift_wrap"
                    }
                  ],
                  "hideFacets": [
                    "material",
                    "fabric",
                    "sleeve_length"
                  ]
                }
              }
            });

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("POST", "https://api.synerise.com/search/v2/indices/%7BindexId%7D/rules");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/search/v2/indices/%7BindexId%7D/rules",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify({
              name: 'string',
              author: 0,
              activeFrom: 'string',
              activeTo: 'string',
              timezone: 'string',
              data: {
                audience: {
                  segmentationIds: [
                    '34ab56cd-789be-22ee-11ab-123456789abc',
                    '12xy34z5-456b-33cc-7o52-987654321ece'
                  ]
                },
                conditions: {
                  patterns: ['phone', 'notebook', 'mouse {color} {brand}'],
                  matchingType: 'is',
                  contexts: ['listing', 'web', 'mobile'],
                  filters: {
                    textFilters: {color: {values: ['green', 'red'], matchingType: 'InUserFilters'}},
                    rangeFilters: {
                      price: {ranges: [{rightEnd: {value: 20, inclusive: true}}], matchingType: 'Exact'}
                    },
                    datetimeFilters: {
                      created: {
                        ranges: [{rightEnd: {value: '2024-01-01', inclusive: true}}],
                        matchingType: 'Exact'
                      }
                    }
                  }
                },
                queryConsequences: [{type: 'removeWord', word: 'string', replacement: 'string'}],
                postQueryConsequences: {
                  hideHits: ['string'],
                  promoteHits: [{id: 'string', position: 0}],
                  promoteHitsPositionStrategy: {type: 'custom'},
                  standardFilters: {
                    textFilters: [
                      {attribute: 'brand', mode: 'include', values: ['A-Brand', 'B-Brand', '{brand}']}
                    ],
                    rangeFilters: [{attribute: 'price', operator: 'gt', value: '{price}'}],
                    datetimeFilters: [{attribute: 'created', operator: 'gt', value: '{created}'}]
                  },
                  elasticFilters: {
                    textFilters: [
                      {attribute: 'brand', mode: 'include', values: ['A-Brand', 'B-Brand', '{brand}']}
                    ],
                    rangeFilters: [{attribute: 'price', operator: 'gt', value: '{price}'}],
                    datetimeFilters: [{attribute: 'created', operator: 'gt', value: '{created}'}]
                  },
                  boostFilters: [
                    {
                      weight: -100,
                      filters: {
                        textFilters: [
                          {attribute: 'brand', mode: 'include', values: ['A-Brand', 'B-Brand', '{brand}']}
                        ],
                        rangeFilters: [{attribute: 'price', operator: 'gt', value: '{price}'}],
                        datetimeFilters: [{attribute: 'created', operator: 'gt', value: '{created}'}]
                      }
                    }
                  ],
                  topHitsFilters: [
                    {
                      hitsNumber: 1,
                      filters: {
                        textFilters: [
                          {attribute: 'brand', mode: 'include', values: ['A-Brand', 'B-Brand', '{brand}']}
                        ],
                        rangeFilters: [{attribute: 'price', operator: 'gt', value: '{price}'}],
                        datetimeFilters: [{attribute: 'created', operator: 'gt', value: '{created}'}]
                      }
                    }
                  ],
                  distinctFilter: {attribute: 'string', maxNumItems: 0, categoryLevelModifier: 0},
                  sortBy: {attribute: 'string', ordering: 'desc'},
                  customData: '{"customLandingPage": "https://synerise.com/"}',
                  returnNoData: false,
                  pinFacets: [
                    {attribute: 'size', position: 1},
                    {attribute: 'width', position: 2},
                    {attribute: 'gift_wrap'}
                  ],
                  hideFacets: ['material', 'fabric', 'sleeve_length']
                }
              }
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/search/v2/indices/%7BindexId%7D/rules');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"name":"string","author":0,"activeFrom":"string","activeTo":"string","timezone":"string","data":{"audience":{"segmentationIds":["34ab56cd-789be-22ee-11ab-123456789abc","12xy34z5-456b-33cc-7o52-987654321ece"]},"conditions":{"patterns":["phone","notebook","mouse {color} {brand}"],"matchingType":"is","contexts":["listing","web","mobile"],"filters":{"textFilters":{"color":{"values":["green","red"],"matchingType":"InUserFilters"}},"rangeFilters":{"price":{"ranges":[{"rightEnd":{"value":20,"inclusive":true}}],"matchingType":"Exact"}},"datetimeFilters":{"created":{"ranges":[{"rightEnd":{"value":"2024-01-01","inclusive":true}}],"matchingType":"Exact"}}}},"queryConsequences":[{"type":"removeWord","word":"string","replacement":"string"}],"postQueryConsequences":{"hideHits":["string"],"promoteHits":[{"id":"string","position":0}],"promoteHitsPositionStrategy":{"type":"custom"},"standardFilters":{"textFilters":[{"attribute":"brand","mode":"include","values":["A-Brand","B-Brand","{brand}"]}],"rangeFilters":[{"attribute":"price","operator":"gt","value":"{price}"}],"datetimeFilters":[{"attribute":"created","operator":"gt","value":"{created}"}]},"elasticFilters":{"textFilters":[{"attribute":"brand","mode":"include","values":["A-Brand","B-Brand","{brand}"]}],"rangeFilters":[{"attribute":"price","operator":"gt","value":"{price}"}],"datetimeFilters":[{"attribute":"created","operator":"gt","value":"{created}"}]},"boostFilters":[{"weight":-100,"filters":{"textFilters":[{"attribute":"brand","mode":"include","values":["A-Brand","B-Brand","{brand}"]}],"rangeFilters":[{"attribute":"price","operator":"gt","value":"{price}"}],"datetimeFilters":[{"attribute":"created","operator":"gt","value":"{created}"}]}}],"topHitsFilters":[{"hitsNumber":1,"filters":{"textFilters":[{"attribute":"brand","mode":"include","values":["A-Brand","B-Brand","{brand}"]}],"rangeFilters":[{"attribute":"price","operator":"gt","value":"{price}"}],"datetimeFilters":[{"attribute":"created","operator":"gt","value":"{created}"}]}}],"distinctFilter":{"attribute":"string","maxNumItems":0,"categoryLevelModifier":0},"sortBy":{"attribute":"string","ordering":"desc"},"customData":"{\\"customLandingPage\\": \\"https://synerise.com/\\"}","returnNoData":false,"pinFacets":[{"attribute":"size","position":1},{"attribute":"width","position":2},{"attribute":"gift_wrap"}],"hideFacets":["material","fabric","sleeve_length"]}}}');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/search/v2/indices/%7BindexId%7D/rules")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"name\":\"string\",\"author\":0,\"activeFrom\":\"string\",\"activeTo\":\"string\",\"timezone\":\"string\",\"data\":{\"audience\":{\"segmentationIds\":[\"34ab56cd-789be-22ee-11ab-123456789abc\",\"12xy34z5-456b-33cc-7o52-987654321ece\"]},\"conditions\":{\"patterns\":[\"phone\",\"notebook\",\"mouse {color} {brand}\"],\"matchingType\":\"is\",\"contexts\":[\"listing\",\"web\",\"mobile\"],\"filters\":{\"textFilters\":{\"color\":{\"values\":[\"green\",\"red\"],\"matchingType\":\"InUserFilters\"}},\"rangeFilters\":{\"price\":{\"ranges\":[{\"rightEnd\":{\"value\":20,\"inclusive\":true}}],\"matchingType\":\"Exact\"}},\"datetimeFilters\":{\"created\":{\"ranges\":[{\"rightEnd\":{\"value\":\"2024-01-01\",\"inclusive\":true}}],\"matchingType\":\"Exact\"}}}},\"queryConsequences\":[{\"type\":\"removeWord\",\"word\":\"string\",\"replacement\":\"string\"}],\"postQueryConsequences\":{\"hideHits\":[\"string\"],\"promoteHits\":[{\"id\":\"string\",\"position\":0}],\"promoteHitsPositionStrategy\":{\"type\":\"custom\"},\"standardFilters\":{\"textFilters\":[{\"attribute\":\"brand\",\"mode\":\"include\",\"values\":[\"A-Brand\",\"B-Brand\",\"{brand}\"]}],\"rangeFilters\":[{\"attribute\":\"price\",\"operator\":\"gt\",\"value\":\"{price}\"}],\"datetimeFilters\":[{\"attribute\":\"created\",\"operator\":\"gt\",\"value\":\"{created}\"}]},\"elasticFilters\":{\"textFilters\":[{\"attribute\":\"brand\",\"mode\":\"include\",\"values\":[\"A-Brand\",\"B-Brand\",\"{brand}\"]}],\"rangeFilters\":[{\"attribute\":\"price\",\"operator\":\"gt\",\"value\":\"{price}\"}],\"datetimeFilters\":[{\"attribute\":\"created\",\"operator\":\"gt\",\"value\":\"{created}\"}]},\"boostFilters\":[{\"weight\":-100,\"filters\":{\"textFilters\":[{\"attribute\":\"brand\",\"mode\":\"include\",\"values\":[\"A-Brand\",\"B-Brand\",\"{brand}\"]}],\"rangeFilters\":[{\"attribute\":\"price\",\"operator\":\"gt\",\"value\":\"{price}\"}],\"datetimeFilters\":[{\"attribute\":\"created\",\"operator\":\"gt\",\"value\":\"{created}\"}]}}],\"topHitsFilters\":[{\"hitsNumber\":1,\"filters\":{\"textFilters\":[{\"attribute\":\"brand\",\"mode\":\"include\",\"values\":[\"A-Brand\",\"B-Brand\",\"{brand}\"]}],\"rangeFilters\":[{\"attribute\":\"price\",\"operator\":\"gt\",\"value\":\"{price}\"}],\"datetimeFilters\":[{\"attribute\":\"created\",\"operator\":\"gt\",\"value\":\"{created}\"}]}}],\"distinctFilter\":{\"attribute\":\"string\",\"maxNumItems\":0,\"categoryLevelModifier\":0},\"sortBy\":{\"attribute\":\"string\",\"ordering\":\"desc\"},\"customData\":\"{\\\"customLandingPage\\\": \\\"https://synerise.com/\\\"}\",\"returnNoData\":false,\"pinFacets\":[{\"attribute\":\"size\",\"position\":1},{\"attribute\":\"width\",\"position\":2},{\"attribute\":\"gift_wrap\"}],\"hideFacets\":[\"material\",\"fabric\",\"sleeve_length\"]}}}")
              .asString();
  /search/v2/indices/{indexId}/rules/{ruleId}:
    get:
      summary: Get rule
      description: |
        Retrieves a rule.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `QUERY_RULES_SEARCH_CREATE`

        **User role permission required:** `assets_search: create`
      operationId: GetRuleV2
      tags:
        - Query Rules
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/query-rules-v2-inPathIndexId"
        - $ref: "#/components/parameters/query-rules-v2-inPathRuleId"
      responses:
        "200":
          description: Query rule returned
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/query-rules-v2-RuleWithStatus"
        "500":
          description: An error occurred
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/query-rules-v2-Error"
      x-snr-doc-urls:
        - /api-reference/ai-search#tag/Query-Rules/operation/GetRuleV2
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("GET", "/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("GET", "https://api.synerise.com/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    put:
      summary: Update query rule
      description: |
        Updates a rule identified by `id`.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `QUERY_RULES_SEARCH_UPDATE`

        **User role permission required:** `assets_search: update`
      operationId: PutRuleV2
      tags:
        - Query Rules
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/query-rules-v2-inPathIndexId"
        - $ref: "#/components/parameters/query-rules-v2-inPathRuleId"
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  $ref: "#/components/schemas/query-rules-v2-RuleName"
                author:
                  $ref: "#/components/schemas/query-rules-v2-RuleAuthor"
                activeFrom:
                  $ref: "#/components/schemas/query-rules-v2-RuleActiveFromDatetime"
                activeTo:
                  $ref: "#/components/schemas/query-rules-v2-RuleActiveToDatetime"
                timezone:
                  $ref: "#/components/schemas/query-rules-v2-RuleTimezoneSchema"
                data:
                  $ref: "#/components/schemas/query-rules-v2-RuleDataSchema"
        description: Request for posting a new rule or updating an existing one
        required: true
      responses:
        "200":
          description: Query rule updated
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/query-rules-v2-RuleWithStatus"
        "500":
          description: An error occurred
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/query-rules-v2-Error"
      x-snr-doc-urls:
        - /api-reference/ai-search#tag/Query-Rules/operation/PutRuleV2
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request PUT \
              --url https://api.synerise.com/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"name":"string","author":0,"activeFrom":"string","activeTo":"string","timezone":"string","data":{"audience":{"segmentationIds":["34ab56cd-789be-22ee-11ab-123456789abc","12xy34z5-456b-33cc-7o52-987654321ece"]},"conditions":{"patterns":["phone","notebook","mouse {color} {brand}"],"matchingType":"is","contexts":["listing","web","mobile"],"filters":{"textFilters":{"color":{"values":["green","red"],"matchingType":"InUserFilters"}},"rangeFilters":{"price":{"ranges":[{"rightEnd":{"value":20,"inclusive":true}}],"matchingType":"Exact"}},"datetimeFilters":{"created":{"ranges":[{"rightEnd":{"value":"2024-01-01","inclusive":true}}],"matchingType":"Exact"}}}},"queryConsequences":[{"type":"removeWord","word":"string","replacement":"string"}],"postQueryConsequences":{"hideHits":["string"],"promoteHits":[{"id":"string","position":0}],"promoteHitsPositionStrategy":{"type":"custom"},"standardFilters":{"textFilters":[{"attribute":"brand","mode":"include","values":["A-Brand","B-Brand","{brand}"]}],"rangeFilters":[{"attribute":"price","operator":"gt","value":"{price}"}],"datetimeFilters":[{"attribute":"created","operator":"gt","value":"{created}"}]},"elasticFilters":{"textFilters":[{"attribute":"brand","mode":"include","values":["A-Brand","B-Brand","{brand}"]}],"rangeFilters":[{"attribute":"price","operator":"gt","value":"{price}"}],"datetimeFilters":[{"attribute":"created","operator":"gt","value":"{created}"}]},"boostFilters":[{"weight":-100,"filters":{"textFilters":[{"attribute":"brand","mode":"include","values":["A-Brand","B-Brand","{brand}"]}],"rangeFilters":[{"attribute":"price","operator":"gt","value":"{price}"}],"datetimeFilters":[{"attribute":"created","operator":"gt","value":"{created}"}]}}],"topHitsFilters":[{"hitsNumber":1,"filters":{"textFilters":[{"attribute":"brand","mode":"include","values":["A-Brand","B-Brand","{brand}"]}],"rangeFilters":[{"attribute":"price","operator":"gt","value":"{price}"}],"datetimeFilters":[{"attribute":"created","operator":"gt","value":"{created}"}]}}],"distinctFilter":{"attribute":"string","maxNumItems":0,"categoryLevelModifier":0},"sortBy":{"attribute":"string","ordering":"desc"},"customData":"{\"customLandingPage\": \"https://synerise.com/\"}","returnNoData":false,"pinFacets":[{"attribute":"size","position":1},{"attribute":"width","position":2},{"attribute":"gift_wrap"}],"hideFacets":["material","fabric","sleeve_length"]}}}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"name\":\"string\",\"author\":0,\"activeFrom\":\"string\",\"activeTo\":\"string\",\"timezone\":\"string\",\"data\":{\"audience\":{\"segmentationIds\":[\"34ab56cd-789be-22ee-11ab-123456789abc\",\"12xy34z5-456b-33cc-7o52-987654321ece\"]},\"conditions\":{\"patterns\":[\"phone\",\"notebook\",\"mouse {color} {brand}\"],\"matchingType\":\"is\",\"contexts\":[\"listing\",\"web\",\"mobile\"],\"filters\":{\"textFilters\":{\"color\":{\"values\":[\"green\",\"red\"],\"matchingType\":\"InUserFilters\"}},\"rangeFilters\":{\"price\":{\"ranges\":[{\"rightEnd\":{\"value\":20,\"inclusive\":true}}],\"matchingType\":\"Exact\"}},\"datetimeFilters\":{\"created\":{\"ranges\":[{\"rightEnd\":{\"value\":\"2024-01-01\",\"inclusive\":true}}],\"matchingType\":\"Exact\"}}}},\"queryConsequences\":[{\"type\":\"removeWord\",\"word\":\"string\",\"replacement\":\"string\"}],\"postQueryConsequences\":{\"hideHits\":[\"string\"],\"promoteHits\":[{\"id\":\"string\",\"position\":0}],\"promoteHitsPositionStrategy\":{\"type\":\"custom\"},\"standardFilters\":{\"textFilters\":[{\"attribute\":\"brand\",\"mode\":\"include\",\"values\":[\"A-Brand\",\"B-Brand\",\"{brand}\"]}],\"rangeFilters\":[{\"attribute\":\"price\",\"operator\":\"gt\",\"value\":\"{price}\"}],\"datetimeFilters\":[{\"attribute\":\"created\",\"operator\":\"gt\",\"value\":\"{created}\"}]},\"elasticFilters\":{\"textFilters\":[{\"attribute\":\"brand\",\"mode\":\"include\",\"values\":[\"A-Brand\",\"B-Brand\",\"{brand}\"]}],\"rangeFilters\":[{\"attribute\":\"price\",\"operator\":\"gt\",\"value\":\"{price}\"}],\"datetimeFilters\":[{\"attribute\":\"created\",\"operator\":\"gt\",\"value\":\"{created}\"}]},\"boostFilters\":[{\"weight\":-100,\"filters\":{\"textFilters\":[{\"attribute\":\"brand\",\"mode\":\"include\",\"values\":[\"A-Brand\",\"B-Brand\",\"{brand}\"]}],\"rangeFilters\":[{\"attribute\":\"price\",\"operator\":\"gt\",\"value\":\"{price}\"}],\"datetimeFilters\":[{\"attribute\":\"created\",\"operator\":\"gt\",\"value\":\"{created}\"}]}}],\"topHitsFilters\":[{\"hitsNumber\":1,\"filters\":{\"textFilters\":[{\"attribute\":\"brand\",\"mode\":\"include\",\"values\":[\"A-Brand\",\"B-Brand\",\"{brand}\"]}],\"rangeFilters\":[{\"attribute\":\"price\",\"operator\":\"gt\",\"value\":\"{price}\"}],\"datetimeFilters\":[{\"attribute\":\"created\",\"operator\":\"gt\",\"value\":\"{created}\"}]}}],\"distinctFilter\":{\"attribute\":\"string\",\"maxNumItems\":0,\"categoryLevelModifier\":0},\"sortBy\":{\"attribute\":\"string\",\"ordering\":\"desc\"},\"customData\":\"{\\\"customLandingPage\\\": \\\"https://synerise.com/\\\"}\",\"returnNoData\":false,\"pinFacets\":[{\"attribute\":\"size\",\"position\":1},{\"attribute\":\"width\",\"position\":2},{\"attribute\":\"gift_wrap\"}],\"hideFacets\":[\"material\",\"fabric\",\"sleeve_length\"]}}}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("PUT", "/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "name": "string",
              "author": 0,
              "activeFrom": "string",
              "activeTo": "string",
              "timezone": "string",
              "data": {
                "audience": {
                  "segmentationIds": [
                    "34ab56cd-789be-22ee-11ab-123456789abc",
                    "12xy34z5-456b-33cc-7o52-987654321ece"
                  ]
                },
                "conditions": {
                  "patterns": [
                    "phone",
                    "notebook",
                    "mouse {color} {brand}"
                  ],
                  "matchingType": "is",
                  "contexts": [
                    "listing",
                    "web",
                    "mobile"
                  ],
                  "filters": {
                    "textFilters": {
                      "color": {
                        "values": [
                          "green",
                          "red"
                        ],
                        "matchingType": "InUserFilters"
                      }
                    },
                    "rangeFilters": {
                      "price": {
                        "ranges": [
                          {
                            "rightEnd": {
                              "value": 20,
                              "inclusive": true
                            }
                          }
                        ],
                        "matchingType": "Exact"
                      }
                    },
                    "datetimeFilters": {
                      "created": {
                        "ranges": [
                          {
                            "rightEnd": {
                              "value": "2024-01-01",
                              "inclusive": true
                            }
                          }
                        ],
                        "matchingType": "Exact"
                      }
                    }
                  }
                },
                "queryConsequences": [
                  {
                    "type": "removeWord",
                    "word": "string",
                    "replacement": "string"
                  }
                ],
                "postQueryConsequences": {
                  "hideHits": [
                    "string"
                  ],
                  "promoteHits": [
                    {
                      "id": "string",
                      "position": 0
                    }
                  ],
                  "promoteHitsPositionStrategy": {
                    "type": "custom"
                  },
                  "standardFilters": {
                    "textFilters": [
                      {
                        "attribute": "brand",
                        "mode": "include",
                        "values": [
                          "A-Brand",
                          "B-Brand",
                          "{brand}"
                        ]
                      }
                    ],
                    "rangeFilters": [
                      {
                        "attribute": "price",
                        "operator": "gt",
                        "value": "{price}"
                      }
                    ],
                    "datetimeFilters": [
                      {
                        "attribute": "created",
                        "operator": "gt",
                        "value": "{created}"
                      }
                    ]
                  },
                  "elasticFilters": {
                    "textFilters": [
                      {
                        "attribute": "brand",
                        "mode": "include",
                        "values": [
                          "A-Brand",
                          "B-Brand",
                          "{brand}"
                        ]
                      }
                    ],
                    "rangeFilters": [
                      {
                        "attribute": "price",
                        "operator": "gt",
                        "value": "{price}"
                      }
                    ],
                    "datetimeFilters": [
                      {
                        "attribute": "created",
                        "operator": "gt",
                        "value": "{created}"
                      }
                    ]
                  },
                  "boostFilters": [
                    {
                      "weight": -100,
                      "filters": {
                        "textFilters": [
                          {
                            "attribute": "brand",
                            "mode": "include",
                            "values": [
                              "A-Brand",
                              "B-Brand",
                              "{brand}"
                            ]
                          }
                        ],
                        "rangeFilters": [
                          {
                            "attribute": "price",
                            "operator": "gt",
                            "value": "{price}"
                          }
                        ],
                        "datetimeFilters": [
                          {
                            "attribute": "created",
                            "operator": "gt",
                            "value": "{created}"
                          }
                        ]
                      }
                    }
                  ],
                  "topHitsFilters": [
                    {
                      "hitsNumber": 1,
                      "filters": {
                        "textFilters": [
                          {
                            "attribute": "brand",
                            "mode": "include",
                            "values": [
                              "A-Brand",
                              "B-Brand",
                              "{brand}"
                            ]
                          }
                        ],
                        "rangeFilters": [
                          {
                            "attribute": "price",
                            "operator": "gt",
                            "value": "{price}"
                          }
                        ],
                        "datetimeFilters": [
                          {
                            "attribute": "created",
                            "operator": "gt",
                            "value": "{created}"
                          }
                        ]
                      }
                    }
                  ],
                  "distinctFilter": {
                    "attribute": "string",
                    "maxNumItems": 0,
                    "categoryLevelModifier": 0
                  },
                  "sortBy": {
                    "attribute": "string",
                    "ordering": "desc"
                  },
                  "customData": "{\"customLandingPage\": \"https://synerise.com/\"}",
                  "returnNoData": false,
                  "pinFacets": [
                    {
                      "attribute": "size",
                      "position": 1
                    },
                    {
                      "attribute": "width",
                      "position": 2
                    },
                    {
                      "attribute": "gift_wrap"
                    }
                  ],
                  "hideFacets": [
                    "material",
                    "fabric",
                    "sleeve_length"
                  ]
                }
              }
            });

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("PUT", "https://api.synerise.com/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "PUT",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify({
              name: 'string',
              author: 0,
              activeFrom: 'string',
              activeTo: 'string',
              timezone: 'string',
              data: {
                audience: {
                  segmentationIds: [
                    '34ab56cd-789be-22ee-11ab-123456789abc',
                    '12xy34z5-456b-33cc-7o52-987654321ece'
                  ]
                },
                conditions: {
                  patterns: ['phone', 'notebook', 'mouse {color} {brand}'],
                  matchingType: 'is',
                  contexts: ['listing', 'web', 'mobile'],
                  filters: {
                    textFilters: {color: {values: ['green', 'red'], matchingType: 'InUserFilters'}},
                    rangeFilters: {
                      price: {ranges: [{rightEnd: {value: 20, inclusive: true}}], matchingType: 'Exact'}
                    },
                    datetimeFilters: {
                      created: {
                        ranges: [{rightEnd: {value: '2024-01-01', inclusive: true}}],
                        matchingType: 'Exact'
                      }
                    }
                  }
                },
                queryConsequences: [{type: 'removeWord', word: 'string', replacement: 'string'}],
                postQueryConsequences: {
                  hideHits: ['string'],
                  promoteHits: [{id: 'string', position: 0}],
                  promoteHitsPositionStrategy: {type: 'custom'},
                  standardFilters: {
                    textFilters: [
                      {attribute: 'brand', mode: 'include', values: ['A-Brand', 'B-Brand', '{brand}']}
                    ],
                    rangeFilters: [{attribute: 'price', operator: 'gt', value: '{price}'}],
                    datetimeFilters: [{attribute: 'created', operator: 'gt', value: '{created}'}]
                  },
                  elasticFilters: {
                    textFilters: [
                      {attribute: 'brand', mode: 'include', values: ['A-Brand', 'B-Brand', '{brand}']}
                    ],
                    rangeFilters: [{attribute: 'price', operator: 'gt', value: '{price}'}],
                    datetimeFilters: [{attribute: 'created', operator: 'gt', value: '{created}'}]
                  },
                  boostFilters: [
                    {
                      weight: -100,
                      filters: {
                        textFilters: [
                          {attribute: 'brand', mode: 'include', values: ['A-Brand', 'B-Brand', '{brand}']}
                        ],
                        rangeFilters: [{attribute: 'price', operator: 'gt', value: '{price}'}],
                        datetimeFilters: [{attribute: 'created', operator: 'gt', value: '{created}'}]
                      }
                    }
                  ],
                  topHitsFilters: [
                    {
                      hitsNumber: 1,
                      filters: {
                        textFilters: [
                          {attribute: 'brand', mode: 'include', values: ['A-Brand', 'B-Brand', '{brand}']}
                        ],
                        rangeFilters: [{attribute: 'price', operator: 'gt', value: '{price}'}],
                        datetimeFilters: [{attribute: 'created', operator: 'gt', value: '{created}'}]
                      }
                    }
                  ],
                  distinctFilter: {attribute: 'string', maxNumItems: 0, categoryLevelModifier: 0},
                  sortBy: {attribute: 'string', ordering: 'desc'},
                  customData: '{"customLandingPage": "https://synerise.com/"}',
                  returnNoData: false,
                  pinFacets: [
                    {attribute: 'size', position: 1},
                    {attribute: 'width', position: 2},
                    {attribute: 'gift_wrap'}
                  ],
                  hideFacets: ['material', 'fabric', 'sleeve_length']
                }
              }
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D');
            $request->setMethod(HTTP_METH_PUT);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"name":"string","author":0,"activeFrom":"string","activeTo":"string","timezone":"string","data":{"audience":{"segmentationIds":["34ab56cd-789be-22ee-11ab-123456789abc","12xy34z5-456b-33cc-7o52-987654321ece"]},"conditions":{"patterns":["phone","notebook","mouse {color} {brand}"],"matchingType":"is","contexts":["listing","web","mobile"],"filters":{"textFilters":{"color":{"values":["green","red"],"matchingType":"InUserFilters"}},"rangeFilters":{"price":{"ranges":[{"rightEnd":{"value":20,"inclusive":true}}],"matchingType":"Exact"}},"datetimeFilters":{"created":{"ranges":[{"rightEnd":{"value":"2024-01-01","inclusive":true}}],"matchingType":"Exact"}}}},"queryConsequences":[{"type":"removeWord","word":"string","replacement":"string"}],"postQueryConsequences":{"hideHits":["string"],"promoteHits":[{"id":"string","position":0}],"promoteHitsPositionStrategy":{"type":"custom"},"standardFilters":{"textFilters":[{"attribute":"brand","mode":"include","values":["A-Brand","B-Brand","{brand}"]}],"rangeFilters":[{"attribute":"price","operator":"gt","value":"{price}"}],"datetimeFilters":[{"attribute":"created","operator":"gt","value":"{created}"}]},"elasticFilters":{"textFilters":[{"attribute":"brand","mode":"include","values":["A-Brand","B-Brand","{brand}"]}],"rangeFilters":[{"attribute":"price","operator":"gt","value":"{price}"}],"datetimeFilters":[{"attribute":"created","operator":"gt","value":"{created}"}]},"boostFilters":[{"weight":-100,"filters":{"textFilters":[{"attribute":"brand","mode":"include","values":["A-Brand","B-Brand","{brand}"]}],"rangeFilters":[{"attribute":"price","operator":"gt","value":"{price}"}],"datetimeFilters":[{"attribute":"created","operator":"gt","value":"{created}"}]}}],"topHitsFilters":[{"hitsNumber":1,"filters":{"textFilters":[{"attribute":"brand","mode":"include","values":["A-Brand","B-Brand","{brand}"]}],"rangeFilters":[{"attribute":"price","operator":"gt","value":"{price}"}],"datetimeFilters":[{"attribute":"created","operator":"gt","value":"{created}"}]}}],"distinctFilter":{"attribute":"string","maxNumItems":0,"categoryLevelModifier":0},"sortBy":{"attribute":"string","ordering":"desc"},"customData":"{\\"customLandingPage\\": \\"https://synerise.com/\\"}","returnNoData":false,"pinFacets":[{"attribute":"size","position":1},{"attribute":"width","position":2},{"attribute":"gift_wrap"}],"hideFacets":["material","fabric","sleeve_length"]}}}');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.put("https://api.synerise.com/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"name\":\"string\",\"author\":0,\"activeFrom\":\"string\",\"activeTo\":\"string\",\"timezone\":\"string\",\"data\":{\"audience\":{\"segmentationIds\":[\"34ab56cd-789be-22ee-11ab-123456789abc\",\"12xy34z5-456b-33cc-7o52-987654321ece\"]},\"conditions\":{\"patterns\":[\"phone\",\"notebook\",\"mouse {color} {brand}\"],\"matchingType\":\"is\",\"contexts\":[\"listing\",\"web\",\"mobile\"],\"filters\":{\"textFilters\":{\"color\":{\"values\":[\"green\",\"red\"],\"matchingType\":\"InUserFilters\"}},\"rangeFilters\":{\"price\":{\"ranges\":[{\"rightEnd\":{\"value\":20,\"inclusive\":true}}],\"matchingType\":\"Exact\"}},\"datetimeFilters\":{\"created\":{\"ranges\":[{\"rightEnd\":{\"value\":\"2024-01-01\",\"inclusive\":true}}],\"matchingType\":\"Exact\"}}}},\"queryConsequences\":[{\"type\":\"removeWord\",\"word\":\"string\",\"replacement\":\"string\"}],\"postQueryConsequences\":{\"hideHits\":[\"string\"],\"promoteHits\":[{\"id\":\"string\",\"position\":0}],\"promoteHitsPositionStrategy\":{\"type\":\"custom\"},\"standardFilters\":{\"textFilters\":[{\"attribute\":\"brand\",\"mode\":\"include\",\"values\":[\"A-Brand\",\"B-Brand\",\"{brand}\"]}],\"rangeFilters\":[{\"attribute\":\"price\",\"operator\":\"gt\",\"value\":\"{price}\"}],\"datetimeFilters\":[{\"attribute\":\"created\",\"operator\":\"gt\",\"value\":\"{created}\"}]},\"elasticFilters\":{\"textFilters\":[{\"attribute\":\"brand\",\"mode\":\"include\",\"values\":[\"A-Brand\",\"B-Brand\",\"{brand}\"]}],\"rangeFilters\":[{\"attribute\":\"price\",\"operator\":\"gt\",\"value\":\"{price}\"}],\"datetimeFilters\":[{\"attribute\":\"created\",\"operator\":\"gt\",\"value\":\"{created}\"}]},\"boostFilters\":[{\"weight\":-100,\"filters\":{\"textFilters\":[{\"attribute\":\"brand\",\"mode\":\"include\",\"values\":[\"A-Brand\",\"B-Brand\",\"{brand}\"]}],\"rangeFilters\":[{\"attribute\":\"price\",\"operator\":\"gt\",\"value\":\"{price}\"}],\"datetimeFilters\":[{\"attribute\":\"created\",\"operator\":\"gt\",\"value\":\"{created}\"}]}}],\"topHitsFilters\":[{\"hitsNumber\":1,\"filters\":{\"textFilters\":[{\"attribute\":\"brand\",\"mode\":\"include\",\"values\":[\"A-Brand\",\"B-Brand\",\"{brand}\"]}],\"rangeFilters\":[{\"attribute\":\"price\",\"operator\":\"gt\",\"value\":\"{price}\"}],\"datetimeFilters\":[{\"attribute\":\"created\",\"operator\":\"gt\",\"value\":\"{created}\"}]}}],\"distinctFilter\":{\"attribute\":\"string\",\"maxNumItems\":0,\"categoryLevelModifier\":0},\"sortBy\":{\"attribute\":\"string\",\"ordering\":\"desc\"},\"customData\":\"{\\\"customLandingPage\\\": \\\"https://synerise.com/\\\"}\",\"returnNoData\":false,\"pinFacets\":[{\"attribute\":\"size\",\"position\":1},{\"attribute\":\"width\",\"position\":2},{\"attribute\":\"gift_wrap\"}],\"hideFacets\":[\"material\",\"fabric\",\"sleeve_length\"]}}}")
              .asString();
    delete:
      summary: Delete rule
      description: |
        Deletes a rule identified by `id`.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `QUERY_RULES_SEARCH_DELETE`

        **User role permission required:** `assets_search: delete`
      operationId: DeleteRuleV2
      tags:
        - Query Rules
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/query-rules-v2-inPathIndexId"
        - $ref: "#/components/parameters/query-rules-v2-inPathRuleId"
      responses:
        "204":
          description: Query rule deleted
        "500":
          description: An error occurred
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/query-rules-v2-Error"
      x-snr-doc-urls:
        - /api-reference/ai-search#tag/Query-Rules/operation/DeleteRuleV2
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request DELETE \
              --url https://api.synerise.com/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("DELETE", "/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("DELETE", "https://api.synerise.com/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "DELETE",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D');
            $request->setMethod(HTTP_METH_DELETE);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.delete("https://api.synerise.com/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /search/v2/indices/{indexId}/rules/{ruleId}/activate:
    post:
      summary: Activate rule
      description: |
        Activates a rule identified by `id`.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `QUERY_RULES_SEARCH_UPDATE`

        **User role permission required:** `assets_search: update`
      operationId: ActivateRuleV2
      tags:
        - Query Rules
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/query-rules-v2-inPathIndexId"
        - $ref: "#/components/parameters/query-rules-v2-inPathRuleId"
      responses:
        "204":
          description: Query rule activated
        "500":
          description: An error occurred
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/query-rules-v2-Error"
      x-snr-doc-urls:
        - /api-reference/ai-search#tag/Query-Rules/operation/ActivateRuleV2
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D/activate \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("POST", "/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D/activate", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("POST", "https://api.synerise.com/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D/activate");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D/activate",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D/activate');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D/activate")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /search/v2/indices/{indexId}/rules/{ruleId}/pause:
    post:
      summary: Pause rule
      description: |
        Pauses a rule identified by `id`.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `QUERY_RULES_SEARCH_UPDATE`

        **User role permission required:** `assets_search: update`
      operationId: PauseRuleV2
      tags:
        - Query Rules
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/query-rules-v2-inPathIndexId"
        - $ref: "#/components/parameters/query-rules-v2-inPathRuleId"
      responses:
        "204":
          description: Query rule paused
        "500":
          description: An error occurred
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/query-rules-v2-Error"
      x-snr-doc-urls:
        - /api-reference/ai-search#tag/Query-Rules/operation/PauseRuleV2
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D/pause \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("POST", "/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D/pause", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("POST", "https://api.synerise.com/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D/pause");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D/pause",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D/pause');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D/pause")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /search/v2/indices/{indexId}/rules/{ruleId}/draft:
    post:
      summary: Draft rule
      description: |
        Marks a rule as draft.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `QUERY_RULES_SEARCH_UPDATE`

        **User role permission required:** `assets_search: update`
      operationId: DraftRuleV2
      tags:
        - Query Rules
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/query-rules-v2-inPathIndexId"
        - $ref: "#/components/parameters/query-rules-v2-inPathRuleId"
      responses:
        "204":
          description: Query rule marked as draft
        "500":
          description: An error occurred
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/query-rules-v2-Error"
      x-snr-doc-urls:
        - /api-reference/ai-search#tag/Query-Rules/operation/DraftRuleV2
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D/draft \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("POST", "/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D/draft", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("POST", "https://api.synerise.com/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D/draft");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D/draft",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D/draft');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D/draft")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /search/v2/indices/{indexId}/rules/{ruleId}/finish:
    post:
      summary: Finish rule
      description: |
        Marks a rule as finished. The rule becomes inactive and can never be activated again.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `QUERY_RULES_SEARCH_UPDATE`

        **User role permission required:** `assets_search: update`
      operationId: FinishRuleV2
      tags:
        - Query Rules
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/query-rules-v2-inPathIndexId"
        - $ref: "#/components/parameters/query-rules-v2-inPathRuleId"
      responses:
        "204":
          description: Query rule marked as finished
        "500":
          description: An error occurred
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/query-rules-v2-Error"
      x-snr-doc-urls:
        - /api-reference/ai-search#tag/Query-Rules/operation/FinishRuleV2
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D/finish \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("POST", "/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D/finish", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("POST", "https://api.synerise.com/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D/finish");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D/finish",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D/finish');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D/finish")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /search/v2/indices/{indexId}/synonyms:
    get:
      summary: Get synonyms
      description: |
        Retrieve a list of synonyms.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `SYNONYMS_SEARCH_READ`

        **User role permission required:** `assets_search: read`
      operationId: GetSynonymsV2
      tags:
        - Synonyms
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/synonyms-crud-inPathIndexId"
        - $ref: "#/components/parameters/synonyms-crud-paginationPage"
        - $ref: "#/components/parameters/synonyms-crud-paginationLimit"
        - $ref: "#/components/parameters/synonyms-crud-paginationSortBy"
        - $ref: "#/components/parameters/synonyms-crud-paginationOrdering"
        - $ref: "#/components/parameters/synonyms-crud-paginationIncludeMeta"
        - $ref: "#/components/parameters/synonyms-crud-source"
        - $ref: "#/components/parameters/synonyms-crud-state"
        - $ref: "#/components/parameters/synonyms-crud-synonymType"
        - $ref: "#/components/parameters/synonyms-crud-search"
        - $ref: "#/components/parameters/synonyms-crud-confidence"
      responses:
        "200":
          description: List of synonyms returned
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/synonyms-crud-PaginatedSynonyms"
        "500":
          description: Some error occurred
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/synonyms-crud-Error"
      x-snr-doc-urls:
        - /api-reference/ai-search#tag/Synonyms/operation/GetSynonymsV2
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/search/v2/indices/%7BindexId%7D/synonyms?page=4&limit=100&sortBy=confidence%3Aasc&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&source=SOME_STRING_VALUE&state=SOME_STRING_VALUE&type=SOME_STRING_VALUE&search=SOME_STRING_VALUE&confidence=SOME_NUMBER_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("GET", "/search/v2/indices/%7BindexId%7D/synonyms?page=4&limit=100&sortBy=confidence%3Aasc&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&source=SOME_STRING_VALUE&state=SOME_STRING_VALUE&type=SOME_STRING_VALUE&search=SOME_STRING_VALUE&confidence=SOME_NUMBER_VALUE", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("GET", "https://api.synerise.com/search/v2/indices/%7BindexId%7D/synonyms?page=4&limit=100&sortBy=confidence%3Aasc&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&source=SOME_STRING_VALUE&state=SOME_STRING_VALUE&type=SOME_STRING_VALUE&search=SOME_STRING_VALUE&confidence=SOME_NUMBER_VALUE");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/search/v2/indices/%7BindexId%7D/synonyms?page=4&limit=100&sortBy=confidence%3Aasc&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&source=SOME_STRING_VALUE&state=SOME_STRING_VALUE&type=SOME_STRING_VALUE&search=SOME_STRING_VALUE&confidence=SOME_NUMBER_VALUE",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/search/v2/indices/%7BindexId%7D/synonyms');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'page' => '4',
              'limit' => '100',
              'sortBy' => 'confidence:asc',
              'ordering' => 'SOME_STRING_VALUE',
              'includeMeta' => 'SOME_BOOLEAN_VALUE',
              'source' => 'SOME_STRING_VALUE',
              'state' => 'SOME_STRING_VALUE',
              'type' => 'SOME_STRING_VALUE',
              'search' => 'SOME_STRING_VALUE',
              'confidence' => 'SOME_NUMBER_VALUE'
            ]);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/search/v2/indices/%7BindexId%7D/synonyms?page=4&limit=100&sortBy=confidence%3Aasc&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&source=SOME_STRING_VALUE&state=SOME_STRING_VALUE&type=SOME_STRING_VALUE&search=SOME_STRING_VALUE&confidence=SOME_NUMBER_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    post:
      summary: Create synonym
      description: |
        Creates a new synonym.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `SYNONYMS_SEARCH_CREATE`

        **User role permission required:** `assets_search: create`
      operationId: PostSynonymV2
      tags:
        - Synonyms
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/synonyms-crud-inPathIndexId"
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                type:
                  $ref: "#/components/schemas/synonyms-crud-Type"
                word:
                  $ref: "#/components/schemas/synonyms-crud-Word"
                synonyms:
                  $ref: "#/components/schemas/synonyms-crud-Synonyms"
                confidence:
                  $ref: "#/components/schemas/synonyms-crud-Confidence"
                reason:
                  $ref: "#/components/schemas/synonyms-crud-Reason"
                source:
                  $ref: "#/components/schemas/synonyms-crud-SynonymSource"
                state:
                  $ref: "#/components/schemas/synonyms-crud-SynonymState"
              required:
                - synonyms
        description: Request for creating new synonym
        required: true
      responses:
        "200":
          description: Id of created synonym returned
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/synonyms-crud-SingleSynonym"
        "500":
          description: Some error occurred
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/synonyms-crud-Error"
      x-snr-doc-urls:
        - /api-reference/ai-search#tag/Synonyms/operation/PostSynonymV2
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/search/v2/indices/%7BindexId%7D/synonyms \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"type":"oneway","word":"string","synonyms":["string"],"confidence":1,"reason":"string","source":"User","state":"New"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"type\":\"oneway\",\"word\":\"string\",\"synonyms\":[\"string\"],\"confidence\":1,\"reason\":\"string\",\"source\":\"User\",\"state\":\"New\"}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/search/v2/indices/%7BindexId%7D/synonyms", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "type": "oneway",
              "word": "string",
              "synonyms": [
                "string"
              ],
              "confidence": 1,
              "reason": "string",
              "source": "User",
              "state": "New"
            });

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("POST", "https://api.synerise.com/search/v2/indices/%7BindexId%7D/synonyms");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/search/v2/indices/%7BindexId%7D/synonyms",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify({
              type: 'oneway',
              word: 'string',
              synonyms: ['string'],
              confidence: 1,
              reason: 'string',
              source: 'User',
              state: 'New'
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/search/v2/indices/%7BindexId%7D/synonyms');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"type":"oneway","word":"string","synonyms":["string"],"confidence":1,"reason":"string","source":"User","state":"New"}');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/search/v2/indices/%7BindexId%7D/synonyms")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"type\":\"oneway\",\"word\":\"string\",\"synonyms\":[\"string\"],\"confidence\":1,\"reason\":\"string\",\"source\":\"User\",\"state\":\"New\"}")
              .asString();
  /search/v2/indices/{indexId}/synonyms/batch:
    post:
      summary: Batch insert synonyms
      description: |
        Insert multiple synonyms into an index at once.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `SYNONYMS_SEARCH_CREATE`

        **User role permission required:** `assets_search: create`
      operationId: BatchSynonyms
      tags:
        - Synonyms
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/synonyms-crud-sourceForImport"
        - $ref: "#/components/parameters/synonyms-crud-inPathIndexId"
      requestBody:
        $ref: "#/components/requestBodies/synonyms-crud-CsvBody"
      responses:
        "200":
          description: Summary of batch insertion
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/synonyms-crud-BatchResponse"
        "500":
          description: Some error occurred
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/synonyms-crud-Error"
      x-snr-doc-urls:
        - /api-reference/ai-search#tag/Synonyms/operation/BatchSynonyms
  /search/v2/indices/{indexId}/synonyms/replace-all:
    post:
      summary: Replace all synonyms
      description: |
        <span style="color:red"><strong>Deletes all existing synonyms</strong></span> from an index and then inserts multiple new synonyms at once.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `SYNONYMS_SEARCH_UPDATE`

        **User role permission required:** `assets_search: update`
      operationId: ReplaceAllSynonyms
      tags:
        - Synonyms
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/synonyms-crud-inPathIndexId"
        - $ref: "#/components/parameters/synonyms-crud-sourceForImport"
      requestBody:
        $ref: "#/components/requestBodies/synonyms-crud-CsvBody"
      responses:
        "204":
          description: All synonyms replaced
        "500":
          description: Some error occurred
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/synonyms-crud-Error"
      x-snr-doc-urls:
        - /api-reference/ai-search#tag/Synonyms/operation/ReplaceAllSynonyms
  /search/v2/indices/{indexId}/synonyms/{synonymId}:
    get:
      summary: Get synonym
      description: |
        Retrieves a synonym.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `SYNONYMS_SEARCH_READ`

        **User role permission required:** `assets_search: read`
      operationId: GetSynonymV2
      tags:
        - Synonyms
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/synonyms-crud-inPathSynonymId"
        - $ref: "#/components/parameters/synonyms-crud-inPathIndexId"
      responses:
        "200":
          description: Synonym returned.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/synonyms-crud-SingleSynonym"
        "500":
          description: Some error occurred
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/synonyms-crud-Error"
      x-snr-doc-urls:
        - /api-reference/ai-search#tag/Synonyms/operation/GetSynonymV2
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/search/v2/indices/%7BindexId%7D/synonyms/%7BsynonymId%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("GET", "/search/v2/indices/%7BindexId%7D/synonyms/%7BsynonymId%7D", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("GET", "https://api.synerise.com/search/v2/indices/%7BindexId%7D/synonyms/%7BsynonymId%7D");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/search/v2/indices/%7BindexId%7D/synonyms/%7BsynonymId%7D",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/search/v2/indices/%7BindexId%7D/synonyms/%7BsynonymId%7D');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/search/v2/indices/%7BindexId%7D/synonyms/%7BsynonymId%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    put:
      summary: Update synonym
      description: |
        Updates a synonym identified by `id`.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `SYNONYMS_SEARCH_UPDATE`

        **User role permission required:** `assets_search: update`
      operationId: PutSynonym
      tags:
        - Synonyms
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/synonyms-crud-inPathSynonymId"
        - $ref: "#/components/parameters/synonyms-crud-inPathIndexId"
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                type:
                  $ref: "#/components/schemas/synonyms-crud-Type"
                word:
                  $ref: "#/components/schemas/synonyms-crud-Word"
                synonyms:
                  $ref: "#/components/schemas/synonyms-crud-Synonyms"
                confidence:
                  $ref: "#/components/schemas/synonyms-crud-Confidence"
                reason:
                  $ref: "#/components/schemas/synonyms-crud-Reason"
                source:
                  $ref: "#/components/schemas/synonyms-crud-SynonymSource"
                state:
                  $ref: "#/components/schemas/synonyms-crud-SynonymState"
              required:
                - synonyms
        description: Request for creating new synonym
        required: true
      responses:
        "200":
          description: Updated synonym returned.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/synonyms-crud-SingleSynonym"
        "500":
          description: Some error occurred
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/synonyms-crud-Error"
      x-snr-doc-urls:
        - /api-reference/ai-search#tag/Synonyms/operation/PutSynonym
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request PUT \
              --url https://api.synerise.com/search/v2/indices/%7BindexId%7D/synonyms/%7BsynonymId%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"type":"oneway","word":"string","synonyms":["string"],"confidence":1,"reason":"string","source":"User","state":"New"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"type\":\"oneway\",\"word\":\"string\",\"synonyms\":[\"string\"],\"confidence\":1,\"reason\":\"string\",\"source\":\"User\",\"state\":\"New\"}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("PUT", "/search/v2/indices/%7BindexId%7D/synonyms/%7BsynonymId%7D", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "type": "oneway",
              "word": "string",
              "synonyms": [
                "string"
              ],
              "confidence": 1,
              "reason": "string",
              "source": "User",
              "state": "New"
            });

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("PUT", "https://api.synerise.com/search/v2/indices/%7BindexId%7D/synonyms/%7BsynonymId%7D");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "PUT",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/search/v2/indices/%7BindexId%7D/synonyms/%7BsynonymId%7D",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify({
              type: 'oneway',
              word: 'string',
              synonyms: ['string'],
              confidence: 1,
              reason: 'string',
              source: 'User',
              state: 'New'
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/search/v2/indices/%7BindexId%7D/synonyms/%7BsynonymId%7D');
            $request->setMethod(HTTP_METH_PUT);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"type":"oneway","word":"string","synonyms":["string"],"confidence":1,"reason":"string","source":"User","state":"New"}');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.put("https://api.synerise.com/search/v2/indices/%7BindexId%7D/synonyms/%7BsynonymId%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"type\":\"oneway\",\"word\":\"string\",\"synonyms\":[\"string\"],\"confidence\":1,\"reason\":\"string\",\"source\":\"User\",\"state\":\"New\"}")
              .asString();
    delete:
      summary: Delete synonym
      description: |
        Deletes a synonym with given id.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `SYNONYMS_SEARCH_DELETE`

        **User role permission required:** `assets_search: delete`
      operationId: DeleteSynonymV2
      tags:
        - Synonyms
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/synonyms-crud-inPathSynonymId"
        - $ref: "#/components/parameters/synonyms-crud-inPathIndexId"
      responses:
        "204":
          description: Synonym deleted
        "500":
          description: Some error occurred
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/synonyms-crud-Error"
      x-snr-doc-urls:
        - /api-reference/ai-search#tag/Synonyms/operation/DeleteSynonymV2
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request DELETE \
              --url https://api.synerise.com/search/v2/indices/%7BindexId%7D/synonyms/%7BsynonymId%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("DELETE", "/search/v2/indices/%7BindexId%7D/synonyms/%7BsynonymId%7D", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("DELETE", "https://api.synerise.com/search/v2/indices/%7BindexId%7D/synonyms/%7BsynonymId%7D");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "DELETE",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/search/v2/indices/%7BindexId%7D/synonyms/%7BsynonymId%7D",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/search/v2/indices/%7BindexId%7D/synonyms/%7BsynonymId%7D');
            $request->setMethod(HTTP_METH_DELETE);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.delete("https://api.synerise.com/search/v2/indices/%7BindexId%7D/synonyms/%7BsynonymId%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
components:
  securitySchemes:
    JWT:
      type: http
      scheme: bearer
      description: |-
        JWT Bearer token. The header looks like this: `Bearer {JWT}`

        Remember to include the space between 'Bearer' and the token.

        Generate a token via the **Authorization** endpoints.
    TrackerKey:
      type: apiKey
      name: token
      in: query
      description: Authorization by tracker key sent as a query parameter. This is the same key as used in the website tracking code.
  schemas:
    ai-stats-Error:
      type: object
      properties:
        httpStatus:
          type: integer
          example: 500
          description: HTTP status of the error.
        errorCode:
          type: integer
          description: Status code. See [error reference](https://developers.synerise.com/errors.html).
        timestamp:
          type: string
          format: date-time
          description: Time when the error occurred.
        message:
          type: string
          description: Description of the problem.
        traceId:
          type: string
          description: Trace ID for debugging.
        help:
          type: string
          description: Currently unused.
    ai-stats-QueriesSummarySchema:
      type: object
      description: Queries statistics
      properties:
        averageClickPosition:
          $ref: "#/components/schemas/ai-stats-averageClickPosition"
        averageOrderValue:
          $ref: "#/components/schemas/ai-stats-averageOrderValue"
        clickThroughRate:
          $ref: "#/components/schemas/ai-stats-clickThroughRate"
        conversionRate:
          $ref: "#/components/schemas/ai-stats-conversionRate"
        conversions:
          $ref: "#/components/schemas/ai-stats-conversions"
        noResultsCount:
          $ref: "#/components/schemas/ai-stats-noResultsCount"
        revenue:
          $ref: "#/components/schemas/ai-stats-revenue"
        totalClicks:
          $ref: "#/components/schemas/ai-stats-totalClicks"
        totalCount:
          $ref: "#/components/schemas/ai-stats-totalCount"
        totalSuggestionsUsed:
          $ref: "#/components/schemas/ai-stats-totalSuggestionsUsed"
    ai-stats-totalSuggestionsUsed:
      type: integer
      description: The number of times a user accepted a suggestion.
    ai-stats-totalCount:
      type: integer
      description: The number of times the search was performed.
    ai-stats-totalClicks:
      type: integer
      description: The number of times a result was clicked.
    ai-stats-revenue:
      type: number
      format: float
      description: Revenue generated from the search.
    ai-stats-noResultsCount:
      type: integer
      description: The number of searches which returned no results.
    ai-stats-conversions:
      type: integer
      description: The number of successful conversions.
    ai-stats-conversionRate:
      type: number
      format: float
      description: Conversion rate of the search.
    ai-stats-clickThroughRate:
      type: number
      format: float
      description: CTR of the search.
    ai-stats-averageOrderValue:
      type: number
      format: float
      description: The average value of orders resulting from the search.
    ai-stats-averageClickPosition:
      type: number
      format: float
      description: The average position of the clicked item on the list of results.
    ai-stats-QueriesTopSchema:
      type: array
      description: Top queries
      items:
        type: object
        properties:
          query:
            $ref: "#/components/schemas/ai-stats-query"
          count:
            $ref: "#/components/schemas/ai-stats-totalCount"
          clicks:
            $ref: "#/components/schemas/ai-stats-totalClicks"
          clickThroughRate:
            $ref: "#/components/schemas/ai-stats-clickThroughRate"
          revenue:
            $ref: "#/components/schemas/ai-stats-revenue"
          conversions:
            $ref: "#/components/schemas/ai-stats-conversions"
          conversionRate:
            $ref: "#/components/schemas/ai-stats-conversionRate"
    ai-stats-query:
      type: string
      description: Query used for search.
    ai-stats-FiltersSummarySchema:
      type: array
      description: Filters stats
      items:
        type: object
        properties:
          filterName:
            type: string
            description: Name of the filterable attribute
          count:
            type: integer
            description: The number of times the filter was used
    ai-stats-RulesSummarySchema:
      type: array
      description: Rules stats
      items:
        type: object
        properties:
          ruleId:
            type: integer
            description: Applied rule id
          count:
            type: integer
            description: The number of times the rule was applied
    ai-stats-QueriesSummaryMultipleIndicesSchema:
      type: array
      description: Queries statistics for multiple indices
      items:
        type: object
        properties:
          indexId:
            type: string
            description: ID of the index for which the stats are requested
            example: 4add1a1fa877c1651906bb22c9dfd37a1618852272
          stats:
            $ref: "#/components/schemas/ai-stats-QueriesSummarySchema"
    items-search-Error:
      type: object
      properties:
        timestamp:
          type: string
          format: date-time
          description: Time when the error occurred
        status:
          type: integer
          description: Status code
        error:
          type: string
          description: Summary of the error
        message:
          type: string
          description: Description of the problem
        path:
          type: string
          description: URL of the requested resource
      required:
        - timestamp
        - status
        - message
    items-search-VisualSearchResponse:
      type: object
      properties:
        data:
          $ref: "#/components/schemas/items-search-FoundItems"
        extras:
          type: object
          description: Additional information
          properties:
            filteredFacets:
              $ref: "#/components/schemas/items-search-ResultFacets"
            allFacets:
              $ref: "#/components/schemas/items-search-ResultFacets"
            customFilteredFacets:
              allOf:
                - type: object
                  description: Facets resulting from the `customFilteredFacets` setting. Only available in `POST` requests.
                - $ref: "#/components/schemas/items-search-ResultFacets"
            correlationId:
              $ref: "#/components/schemas/items-search-CorrelationIdInResponse"
            searchId:
              $ref: "#/components/schemas/items-search-SearchIdInResponse"
            facetsOrdering:
              $ref: "#/components/schemas/items-search-FacetsOrderingResponse"
        meta:
          $ref: "#/components/schemas/items-search-PaginationMeta"
    items-search-PaginationMeta:
      type: object
      description: Optional metadata, such as pagination. This is returned if the `includeMeta` parameter was set to true in the request.
      properties:
        totalPages:
          type: number
          description: The total number of pages
        totalCount:
          type: number
          description: The total number of search results
        page:
          type: number
          description: The current page
        limit:
          type: number
          description: The maximal number of items on a page
        sortedBy:
          type: string
          description: The column (attribute) that the campaigns were sorted by
        ordering:
          type: string
          description: Sorting order
        code:
          type: number
          description: HTTP response code
        link:
          type: array
          description: Links to neighboring pages, first page, and last page in pagination
          items:
            type: object
            properties:
              url:
                description: Page URL
                type: string
              rel:
                type: string
                description: Position of the linked page
                enum:
                  - first
                  - next
                  - prev
                  - last
    items-search-FacetsOrderingResponse:
      type: array
      description: |
        An ordered list of facet attribute names indicating the display order of facets in the response.
        When `facets=auto`, facets are ordered by coverage (most relevant first) unless `facetsOrderBy=name` is specified.
        When facets are specified explicitly, the ordering is by name.
        Empty when no facets are requested.

        Matching query rules can override the resulting set and order via two consequences:
        - `pinFacets` forces specific facets into the response, optionally at a specific 1-based slot.
          Pinned facets bypass the coverage threshold in `facets=auto`.
        - `hideFacets` removes specific facets from the response, also stripping them from
          `customFilteredFacets`. Hide takes precedence over pin and over explicit `facets=[...]`.

        The corresponding facet values appear in `filteredFacets`, `allFacets`, and `customFilteredFacets`
        only for attributes present in this list.
      items:
        type: string
      example:
        - brand
        - color
        - size
        - price
    items-search-SearchIdInResponse:
      type: string
      deprecated: true
      description: |
        **DEPRECATED - use correlationId instead**

        This ID is used:
        - for search result pagination
        - as `searchId` of the search event in events such as `items.search.click`

        Search results are cached for 10 minutes.

        The cached value will be used if the ID is provided in subsequent calls. This makes search faster and eliminates personalization non-determinism.
    items-search-CorrelationIdInResponse:
      type: string
      description: |
        This ID is used:
        - for search result pagination
        - as `correlationId` of the search event in events such as `items.search.click`

        Search results are cached for 10 minutes.

        The cached value will be used if the ID is provided in subsequent calls. This makes search faster and eliminates personalization non-determinism.
    items-search-ResultFacets:
      type: object
      description: Facet value mappings
      example:
        brand:
          X-brand: 1
          Y-brand: 3
        salePrice.value:
          max: 201.99
          min: 14.99
      additionalProperties:
        description: The type of facet, for example `category`
        type: object
        additionalProperties:
          description: 'The values for keys in this facet type, for example `"Home Appliances>Fridges": 12`'
          type: integer
    items-search-FoundItems:
      type: array
      description: A page of matching items as objects. The parameters of each item's object depend on the configuration of displayable attributes.
      items:
        type: object
        properties:
          _promotedByRules:
            type: array
            items:
              type: integer
              description: Rule id
            description: List of applied rules that had an effect in promoting this item. This field exists if and only if the item was promoted.
        additionalProperties:
          description: The names and value types of the item's properties depend on the configuration.
        example:
          itemName: TV
          itemId: 87257843345
          _promotedByRules:
            - 475
            - 477
    items-search-Params:
      type: object
      example:
        source: mobile
      description: Extra parameters that will be added to the `item.search` event. The total size must not exceed 500 bytes.
      additionalProperties: true
    items-search-ExcludeQueryRules:
      type: array
      example:
        - 2
        - 5
      items:
        type: integer
      description: List of query rules that will not be applied.
    items-search-IgnoreQueryRules:
      type: boolean
      description: If set to `true`, query rules are not applied.
      default: false
    items-search-DisplayAttributes:
      type: array
      description: List of ad hoc attributes that will be returned for each found item
      example:
        - title
        - price
      items:
        type: string
    items-search-Context:
      type: array
      description: List of context strings for a search query
      example:
        - mobile
        - listing
      items:
        type: string
    items-search-FacetsOrdering:
      type: string
      enum:
        - coverage
        - name
      description: |
        Controls the ordering of facets in the response.  
        When `facets=auto`, the default ordering is by coverage (most relevant facets first).  
        When facets are specified explicitly, the default ordering is by name.  
        When two facets have equal coverage, ties are resolved by name.
    items-search-IncludeFacets:
      type: string
      default: filtered
      enum:
        - all
        - filtered
        - unfiltered
        - none
      description: |
        Determines which groups of facets will be returned: both filtered and unfiltered; just filtered; just unfiltered; or no group at at all.

        To determine which attributes should be returned as facets in each group, use the `facets` and `customFilteredFacets` parameters.
    items-search-CaseSensitiveFacetValues:
      type: boolean
      default: false
      description: |
        Specifies whether facets aggregation should be case sensitive.
    items-search-MaxValuesPerFacet:
      type: integer
      default: 50
      minimum: 1
      maximum: 1000
      description: |
        Determines how many values will be retrieved per facet.
    items-search-FacetsSize:
      type: integer
      default: 2000
      minimum: 1
      maximum: 10000
      description: |
        Determines how many items will be used for facets aggregation.
    items-search-Facets:
      type: array
      description: |
        A list of attributes for which facets will be returned.
        - A single `*` value matches all facetable attributes.
        - A single `auto` value enables automatic facet selection based on the result set — the system picks the most relevant facets using the index's `dynamicFacets` configuration.

        To determine which groups of facets should be returned, use the `includeFacets` parameter.
      items:
        type: string
    items-search-Filters:
      type: string
      description: IQL query string. For details, see the [Help Center](https://help.synerise.com/developers/iql/).
    items-search-FilterAnchor:
      type: string
      example: 0.2,0.8
      description: |
        Anchor (`{width},{height}`) by which the visual results data will be filtered.
        `{width},{height}` correspond to normalized image coordinates, i.e. they are in range [0,1].
        Anchor (0,0) corresponds to the top-left pixel of an image.
    items-search-FilterAroundRadius:
      type: integer
      format: int32
      example: 2000
      default: 1000
      description: Radius in meters to be used when filtering using geo-location. Can only be used when filtering by a single geo-point.
    items-search-FilterGeoPoints:
      type: array
      example:
        - 34.052235,-118.243685
        - 15.0,65.0
      items:
        type: string
      description: |
        The definition of a geographical area to filter by.

        Given one geo-point, the results will be limited to a radius around a point. To override the default radius (1000 meters), provide the `filterAroundRadius` parameter.
        **Example input:** `["34.052235,-118.243685"]`

        Given two geo-points, the results will be limited to a rectangular area.
        **Example input:** `["50,-100", "25,150"]`

        Given three or more geo-points, the results will be limited to a polygonal area.
        **Example input:** `["50,0", "40,20", "-20,10"]`
    items-search-SortByGeoPoint:
      type: string
      example: 34.052235,-118.243685
      description: |
        <span style='color:red'><strong>IMPORTANT:</strong></span> Sorting disables boosting, elastic filters, and promoting search results.

        Geo-point (`{latitude},{longitude}`) for data sorting. Results are sorted by distance from this point. `ordering: asc` means "closest first".'
    items-search-SortByMetric:
      type: string
      enum:
        - TransactionsPopularity
        - PageVisitsPopularity
      description: |
        <span style='color:red'><strong>IMPORTANT:</strong></span> Sorting disables boosting, elastic filters, and promoting search results.

        Name of the metric by which the data will be sorted.
    items-search-SearchId:
      type: string
      deprecated: true
      description: |
        **DEPRECATED - use correlationId instead**

        Search ID for pagination. If a search with the ID was performed recently (last 10 minutes), the cached results will be used.

        Do not send this if sortBy/filters/sorting order, etc. have changed - the cached results may have different order or may match different filters.
    items-search-CorrelationId:
      type: string
      description: |
        Correlation ID for pagination. If a search with the ID was performed recently (last 10 minutes), the cached results will be used.

        Do not send this if sortBy/filters/sorting order, etc. have changed - the cached results may have different order or may match different filters.
    items-search-ClientUUID:
      type: string
      description: UUID of the profile for which the search is performed
    items-search-PaginationIncludeMeta:
      type: boolean
      description: |
        
        When `true`, pagination metadata is included in the response body.

        When `false`, the data is included in the response headers:

        - Link: links to neighbors, first, and last pages in pagination.

        - X-Pagination-Total-Count: total number of items on all pages

        - X-Pagination-Total-Pages: total number of pages

        - X-Pagination-Page: current page

        - X-Pagination-Limit: maximum number of items on a page

        - X-Pagination-Sorted-By: parameter that the items were sorted by

        - X-Pagination-Ordering: sorting direction
    items-search-PaginationOrdering:
      type: string
      default: asc
      enum:
        - desc
        - asc
      description: Sorting order
    items-search-PaginationSortBy:
      type: string
      description: |
        <span style='color:red'><strong>IMPORTANT:</strong></span> Sorting disables boosting, elastic filters, and promoting search results.

        Name of the attribute by which the data will be sorted.
    items-search-PaginationLimit:
      type: integer
      format: int32
      example: 10
      default: 20
      maximum: 500
      minimum: 0
      description: The number of items to return per page
    items-search-PaginationPage:
      type: integer
      format: int32
      description: Page number to return for pagination. The first page has the index `1`.
    items-search-VisualSearchRequest:
      type: object
      properties:
        url:
          $ref: "#/components/schemas/items-search-ImageUrl"
        page:
          $ref: "#/components/schemas/items-search-PaginationPage"
        limit:
          $ref: "#/components/schemas/items-search-PaginationLimit"
        sortBy:
          $ref: "#/components/schemas/items-search-PaginationSortBy"
        ordering:
          $ref: "#/components/schemas/items-search-PaginationOrdering"
        includeMeta:
          $ref: "#/components/schemas/items-search-PaginationIncludeMeta"
        clientUUID:
          $ref: "#/components/schemas/items-search-ClientUUID"
        personalize:
          $ref: "#/components/schemas/items-search-Personalize"
        correlationId:
          $ref: "#/components/schemas/items-search-CorrelationId"
        searchId:
          $ref: "#/components/schemas/items-search-SearchId"
        sortByMetric:
          $ref: "#/components/schemas/items-search-SortByMetric"
        sortByGeoPoints:
          $ref: "#/components/schemas/items-search-SortByGeoPoint"
        filterGeoPoints:
          $ref: "#/components/schemas/items-search-FilterGeoPoints"
        filterAroundRadius:
          $ref: "#/components/schemas/items-search-FilterAroundRadius"
        filterAnchor:
          $ref: "#/components/schemas/items-search-FilterAnchor"
        filters:
          $ref: "#/components/schemas/items-search-Filters"
        facets:
          $ref: "#/components/schemas/items-search-Facets"
        customFilteredFacets:
          $ref: "#/components/schemas/items-search-CustomFilteredFacets"
        facetsSize:
          $ref: "#/components/schemas/items-search-FacetsSize"
        maxValuesPerFacet:
          $ref: "#/components/schemas/items-search-MaxValuesPerFacet"
        caseSensitiveFacetValues:
          $ref: "#/components/schemas/items-search-CaseSensitiveFacetValues"
        includeFacets:
          $ref: "#/components/schemas/items-search-IncludeFacets"
        facetsOrderBy:
          $ref: "#/components/schemas/items-search-FacetsOrdering"
        context:
          $ref: "#/components/schemas/items-search-Context"
        displayAttributes:
          $ref: "#/components/schemas/items-search-DisplayAttributes"
        ignoreQueryRules:
          $ref: "#/components/schemas/items-search-IgnoreQueryRules"
        excludeQueryRules:
          $ref: "#/components/schemas/items-search-ExcludeQueryRules"
        params:
          $ref: "#/components/schemas/items-search-Params"
      required:
        - url
    items-search-CustomFilteredFacets:
      type: object
      description: |
        A key-value map that takes attributes as keys and IQL query strings as values.

        For each key a facet is returned that includes only the items filtered by the provided IQL query string.
      additionalProperties:
        name: value
        $ref: "#/components/schemas/items-search-Filters"
      example:
        brand: price > 100
        price: brand == foo
    items-search-Personalize:
      type: boolean
      description: If set to `false`, the search result is not personalized.
      default: true
    items-search-ImageUrl:
      type: string
      description: URL of the image to be used in the visual search
    items-search-VisualSearchResponseWithExplanation:
      type: object
      properties:
        data:
          $ref: "#/components/schemas/items-search-FoundItemsWithExplanation"
        extras:
          type: object
          description: Additional information
          properties:
            filteredFacets:
              $ref: "#/components/schemas/items-search-ResultFacets"
            allFacets:
              $ref: "#/components/schemas/items-search-ResultFacets"
            customFilteredFacets:
              allOf:
                - type: object
                  description: Facets resulting from the `customFilteredFacets` setting. Only available in `POST` requests.
                - $ref: "#/components/schemas/items-search-ResultFacets"
            correlationId:
              $ref: "#/components/schemas/items-search-CorrelationIdInResponse"
            searchId:
              $ref: "#/components/schemas/items-search-SearchIdInResponse"
            facetsOrdering:
              $ref: "#/components/schemas/items-search-FacetsOrderingResponse"
            explanation:
              $ref: "#/components/schemas/items-search-Explanation"
        meta:
          $ref: "#/components/schemas/items-search-PaginationMeta"
    items-search-Explanation:
      type: object
      description: Explanation for performed search.
      properties:
        rulesConsequences:
          $ref: "#/components/schemas/items-search-RulesConsequencesExplanation"
        sortDetails:
          oneOf:
            - $ref: "#/components/schemas/items-search-SortedByMetric"
            - $ref: "#/components/schemas/items-search-SortedByAttribute"
            - $ref: "#/components/schemas/items-search-SortedByGeoPoint"
          description: Applied sorting details.
        query:
          $ref: "#/components/schemas/items-search-FinalQuery"
        personalized:
          type: boolean
          description: Indicates whether the search results were personalized.
        promotedItemsCount:
          type: integer
          description: Promoted items count.
        wasFallbackMatchingUsed:
          type: boolean
          description: "`true` if fallback matching was used."
        facetSelectionExplanation:
          $ref: "#/components/schemas/items-search-FacetSelectionExplanation"
    items-search-FacetSelectionExplanation:
      type: object
      description: |
        Explanation of automatic facet selection. Only present when `facets=auto` is used on an `/explain` endpoint.
        Contains the raw coverage data from the result set that was used to select and rank facets.
        To compute coverage percentage, divide each value by the response's `total` field.
      properties:
        facetCoverage:
          type: object
          description: |
            Map of facetable attribute names to the number of results that have a value for that attribute.
            Includes all candidate facets (not just the ones that were returned in the item's data), so you can see what was considered and why some were excluded by `maxFacets`.
          additionalProperties:
            type: integer
          example:
            brand: 4800
            color: 4500
            price: 4900
            size: 3200
            material: 400
    items-search-FinalQuery:
      type: object
      properties:
        finalQuery:
          type: string
          description: Query that was ultimately used to perform the search.
        synonyms:
          type: array
          description: Used synonyms.
          items:
            type: object
            properties:
              word:
                type: string
                description: Phrase that the synonyms relate to.
              synonyms:
                type: array
                description: List of the synonyms.
                items:
                  type: string
    items-search-SortedByGeoPoint:
      type: object
      properties:
        point:
          type: string
          description: Point used to sort the items.
          example: 34.052235,-118.243685
        ordering:
          type: string
          description: Applied ordering.
          enum:
            - asc
            - desc
    items-search-SortedByAttribute:
      type: object
      properties:
        attribute:
          type: string
          description: Name of the attribute used to sort the items.
        ordering:
          type: string
          description: Applied ordering.
          enum:
            - asc
            - desc
        ruleId:
          type: integer
          description: Id of a query rule that set the sort, if applicable.
    items-search-SortedByMetric:
      type: object
      properties:
        metric:
          type: string
          description: Metric used to sort the items.
          enum:
            - TransactionsPopularity
            - PageVisitsPopularity
        ordering:
          type: string
          description: Applied ordering.
          enum:
            - asc
            - desc
    items-search-RulesConsequencesExplanation:
      type: object
      description: Applied rules consequences.
      properties:
        query:
          $ref: "#/components/schemas/items-search-TransformedQuery"
        hiddenHits:
          type: array
          items:
            $ref: "#/components/schemas/items-search-HideHit"
        filters:
          type: array
          items:
            $ref: "#/components/schemas/items-search-ExplanationFilters"
        boostFilters:
          type: array
          items:
            $ref: "#/components/schemas/items-search-ExplanationBoostFilters"
        returnNoData:
          $ref: "#/components/schemas/items-search-ReturnNoData"
        pinFacets:
          type: array
          description: |
            Per-rule pin facet consequences contributing to the final `facetsOrdering`.
            Reflects what the rules engine emitted; the contributing rule ids are also present in `appliedRules`.
          items:
            $ref: "#/components/schemas/items-search-ExplanationPinFacet"
        hideFacets:
          type: array
          description: |
            Per-attribute hide facet consequences contributing to the final `facetsOrdering`.
            Each entry lists every rule that hid that attribute.
          items:
            $ref: "#/components/schemas/items-search-ExplanationHideFacet"
    items-search-ExplanationHideFacet:
      type: object
      description: A single hide-facet consequence aggregated across all rules that hid the same attribute.
      properties:
        attribute:
          type: string
          description: Name of the hidden facet attribute.
          example: material
        ruleIds:
          type: array
          description: Ids of every query rule that hid this attribute.
          items:
            type: integer
    items-search-ExplanationPinFacet:
      type: object
      description: A single pin-facet consequence emitted by a matched query rule.
      properties:
        attribute:
          type: string
          description: Name of the pinned facet attribute.
          example: size
        position:
          type: integer
          minimum: 1
          maximum: 100
          description: |
            1-based slot the rule requested. Omitted when the rule pinned the attribute without a position.
          example: 1
        ruleId:
          type: integer
          description: Id of the query rule that emitted this pin.
    items-search-ReturnNoData:
      type: object
      description: Indicates if no data consequence is activated.
      properties:
        enabled:
          type: boolean
          description: Indicates if the consequence is enabled.
        ruleIds:
          type: array
          description: Ids of the query rules which activated the consequence.
          items:
            type: integer
    items-search-ExplanationBoostFilters:
      type: object
      description: Used boost filter.
      properties:
        filters:
          $ref: "#/components/schemas/items-search-QueryRuleFilters"
        weight:
          type: number
          description: Weight of the filter.
        ruleId:
          type: integer
          description: Id of the query rule from which the filter come.
    items-search-QueryRuleFilters:
      type: object
      description: Filters from query rules.
      properties:
        textFilters:
          type: array
          description: Text-type filters
          items:
            type: object
            properties:
              attribute:
                type: string
                description: Attribute to be filtered
              mode:
                type: string
                description: |
                  Information whether to include or exclude filtered results.

                  - `include`: includes filtered results
                  - `exclude`: excludes filtered results
                enum:
                  - include
                  - exclude
                example: include
              values:
                type: array
                description: Values to be used during filtering.
                example:
                  - A-Brand
                  - B-Brand
                items:
                  type: string
        rangeFilters:
          type: array
          description: Range-type filters
          items:
            type: object
            properties:
              attribute:
                type: string
                description: Attribute to be filtered
                example: price
              operator:
                type: string
                description: |
                  Operator to be used during filtering.

                  - `gt`: greater than
                  - `gte`: greater or equal
                  - `lt`: less than
                  - `lte`: less than or equal
                  - `eq`/`neq`: equal/not equal
                enum:
                  - gt
                  - gte
                  - lt
                  - lte
                  - eq
                  - neq
              value:
                description: Value to use during filtering
                type: number
                example: 19.99
    items-search-ExplanationFilters:
      type: object
      description: Used filter.
      properties:
        filters:
          $ref: "#/components/schemas/items-search-QueryRuleFilters"
        ruleId:
          type: integer
          description: Id of the query rule from which the filter come.
    items-search-HideHit:
      type: object
      properties:
        id:
          type: string
          description: Hidden item item.
        ruleIds:
          type: array
          description: Ids of query rules which caused the item to be hidden.
          items:
            type: integer
    items-search-TransformedQuery:
      type: object
      description: Query changes applied due to query rules.
      properties:
        originalQuery:
          type: string
          description: Query before applying query rules.
        finalQuery:
          type: string
          description: Query after applying query rules.
        modifications:
          type: array
          items:
            $ref: "#/components/schemas/items-search-QueryModification"
    items-search-QueryModification:
      type: object
      description: Describes a change in query.
      properties:
        slice:
          description: Query slice that was modified.
          allOf:
            - $ref: "#/components/schemas/items-search-QuerySlice"
        transformedSlice:
          description: Resulting query slice. Not present if the modification only removes words.
          allOf:
            - $ref: "#/components/schemas/items-search-QuerySlice"
        ruleId:
          type: integer
          description: Id of the query rule which caused this change.
    items-search-QuerySlice:
      type: object
      description: Describes a slice of query.
      properties:
        from:
          type: integer
          description: Number of the first word (zero-indexed, inclusive).
        to:
          type: integer
          description: Number of the last word (zero-indexed, inclusive).
    items-search-FoundItemsWithExplanation:
      type: array
      description: A page of matching items as objects with explanation included. The parameters of each item's object depend on the configuration of displayable attributes.
      items:
        type: object
        properties:
          _promotedByRules:
            type: array
            items:
              type: integer
              description: Rule id
            description: List of applied rules that had an effect in promoting this item. This field exists if and only if the item was promoted.
          _explanation:
            $ref: "#/components/schemas/items-search-PerItemExplanation"
        additionalProperties:
          description: The names and value types of the item's properties depend on the configuration.
        example:
          itemName: TV
          itemId: 87257843345
          _promotedByRules:
            - 475
            - 477
    items-search-PerItemExplanation:
      type: object
      description: Explanation of the scoring of this item
      properties:
        extendedScoreFactors:
          $ref: "#/components/schemas/items-search-ExtendedScores"
        scoreFactors:
          $ref: "#/components/schemas/items-search-ScoreFactors"
        score:
          type: number
          description: Final score.
        matchedElasticFilter:
          type: boolean
          description: Indicates if the item was matched by an elastic filter.
        sortValue:
          oneOf:
            - type: string
            - type: number
          description: Value used to sort the items, if applicable.
    items-search-ScoreFactors:
      type: object
      description: Influence of historical data and behavioral analysis.
      properties:
        pageVisitsPopularity:
          type: number
          description: Normalized page views popularity.
        transactionsPopularity:
          type: number
          description: Normalized transactions popularity.
        personalization:
          type: number
          description: Normalized value of personalization coefficient, if applicable.
        pageVisitsInfluence:
          type: number
          description: Page views impact on score.
        transactionsInfluence:
          type: number
          description: Purchases impact on score.
        personalizationInfluence:
          type: number
          description: Personalization impact on score, if applicable.
    items-search-ExtendedScores:
      type: object
      description: Extended score factors. Only included if it is possible to gather them.
      properties:
        attributes:
          type: object
          description: |
            Attribute values which influenced the score.  
            This object is separated into low/medium/high importance values (corresponding to attribute importance configuration in the search index configuration).  
            For each type, `token` is the search query (may be modified by query rules, suggestions, etc.) that matched an attribute or attributes of that importance.  
          properties:
            low:
              description: Low importance attributes score.
              allOf:
                - $ref: "#/components/schemas/items-search-TokenWithScore"
            medium:
              description: Medium importance attributes score.
              allOf:
                - $ref: "#/components/schemas/items-search-TokenWithScore"
            high:
              description: High importance attributes score.
              allOf:
                - $ref: "#/components/schemas/items-search-TokenWithScore"
        boostFilters:
          type: array
          description: Matched boost filters.
          items:
            type: object
            properties:
              filters:
                $ref: "#/components/schemas/items-search-QueryRuleFilters"
              weight:
                type: number
                description: Weight of the filter.
    items-search-TokenWithScore:
      type: object
      description: Token with its corresponding score.
      properties:
        token:
          type: string
          description: Token value.
        score:
          type: number
          description: Score of the token.
    items-search-CrossWorkspaceMode:
      type: object
      description: Cross-workspace personalization mode. When provided, overrides the index configuration setting.
      properties:
        enabled:
          type: boolean
          description: Whether cross-workspace personalization is enabled.
      required:
        - enabled
    items-search-SuggestionResponse:
      type: object
      title: Suggestion search
      properties:
        data:
          type: array
          description: A page of search query suggestions
          items:
            type: object
            description: A search suggestion
            properties:
              suggestion:
                type: string
                description: The suggested search phrase
        extras:
          type: object
          description: Additional information
          properties:
            correlationId:
              $ref: "#/components/schemas/items-search-CorrelationIdInResponse"
            searchId:
              $ref: "#/components/schemas/items-search-SearchIdInResponse"
            facetsOrdering:
              $ref: "#/components/schemas/items-search-FacetsOrderingResponse"
        meta:
          $ref: "#/components/schemas/items-search-PaginationMeta"
    items-search-FullTextSearchResponse:
      type: object
      title: Item search
      properties:
        data:
          $ref: "#/components/schemas/items-search-FoundItems"
        extras:
          type: object
          description: Additional information
          properties:
            filteredFacets:
              $ref: "#/components/schemas/items-search-ResultFacets"
            allFacets:
              $ref: "#/components/schemas/items-search-ResultFacets"
            customFilteredFacets:
              allOf:
                - type: object
                  description: Facets resulting from the `customFilteredFacets` setting. Only available in `POST` requests.
                - $ref: "#/components/schemas/items-search-ResultFacets"
            correlationId:
              $ref: "#/components/schemas/items-search-CorrelationIdInResponse"
            searchId:
              $ref: "#/components/schemas/items-search-SearchIdInResponse"
            facetsOrdering:
              $ref: "#/components/schemas/items-search-FacetsOrderingResponse"
            suggestions:
              type: array
              description: A list of search suggestions
              items:
                $ref: "#/components/schemas/items-search-FullTextSuggestionSchema"
            usedSuggestion:
              $ref: "#/components/schemas/items-search-UsedSuggestion"
        meta:
          $ref: "#/components/schemas/items-search-PaginationMeta"
    items-search-UsedSuggestion:
      type: object
      description: If the query did not return any matches, the AI engine tries to find an alternative similar query and use it for the search instead. If that happens, the `usedSuggestion` object contains information about that alternative query offered by the AI engine and used in the search.
      allOf:
        - $ref: "#/components/schemas/items-search-FullTextSuggestionSchema"
    items-search-FullTextSuggestionSchema:
      type: object
      description: If the query from the request doesn't return any matches (for example due to a spelling error in the query), the AI engine may suggest a similar query and use it instead. This object is included in the response only if that mechanism was triggered.
      properties:
        text:
          type: string
          description: The suggested text query
        highlighted:
          type: string
          description: The suggested text query with the HTML emphasis tag added
        score:
          type: number
          description: Estimated accuracy of the suggestion. `1.0` means 100%.
          format: float
          maximum: 1
    items-search-FullTextSearchRequest:
      type: object
      properties:
        query:
          $ref: "#/components/schemas/items-search-SearchQuery"
        page:
          $ref: "#/components/schemas/items-search-PaginationPage"
        limit:
          $ref: "#/components/schemas/items-search-PaginationLimit"
        sortBy:
          $ref: "#/components/schemas/items-search-PaginationSortBy"
        ordering:
          $ref: "#/components/schemas/items-search-PaginationOrdering"
        includeMeta:
          $ref: "#/components/schemas/items-search-PaginationIncludeMeta"
        clientUUID:
          $ref: "#/components/schemas/items-search-ClientUUID"
        personalize:
          $ref: "#/components/schemas/items-search-Personalize"
        correlationId:
          $ref: "#/components/schemas/items-search-CorrelationId"
        searchId:
          $ref: "#/components/schemas/items-search-SearchId"
        sortByMetric:
          $ref: "#/components/schemas/items-search-SortByMetric"
        sortByGeoPoints:
          $ref: "#/components/schemas/items-search-SortByGeoPoint"
        filterGeoPoints:
          $ref: "#/components/schemas/items-search-FilterGeoPoints"
        filterAroundRadius:
          $ref: "#/components/schemas/items-search-FilterAroundRadius"
        filters:
          $ref: "#/components/schemas/items-search-Filters"
        facets:
          $ref: "#/components/schemas/items-search-Facets"
        customFilteredFacets:
          $ref: "#/components/schemas/items-search-CustomFilteredFacets"
        facetsSize:
          $ref: "#/components/schemas/items-search-FacetsSize"
        maxValuesPerFacet:
          $ref: "#/components/schemas/items-search-MaxValuesPerFacet"
        caseSensitiveFacetValues:
          $ref: "#/components/schemas/items-search-CaseSensitiveFacetValues"
        includeFacets:
          $ref: "#/components/schemas/items-search-IncludeFacets"
        facetsOrderBy:
          $ref: "#/components/schemas/items-search-FacetsOrdering"
        context:
          $ref: "#/components/schemas/items-search-Context"
        displayAttributes:
          $ref: "#/components/schemas/items-search-DisplayAttributes"
        distinctFilter:
          $ref: "#/components/schemas/items-search-DistinctFilterSearch"
        ignoreQueryRules:
          $ref: "#/components/schemas/items-search-IgnoreQueryRules"
        excludeQueryRules:
          $ref: "#/components/schemas/items-search-ExcludeQueryRules"
        params:
          $ref: "#/components/schemas/items-search-Params"
        disableQueryClassification:
          $ref: "#/components/schemas/items-search-DisableQueryClassification"
        disableDynamicReranker:
          $ref: "#/components/schemas/items-search-DisableDynamicReranker"
      required:
        - query
    items-search-DisableDynamicReranker:
      type: boolean
      description: If set to `true`, q dynamic reranker is not applied.
      default: false
    items-search-DisableQueryClassification:
      type: boolean
      description: If set to `true`, query classification is not applied.
      default: false
    items-search-DistinctFilterSearch:
      type: object
      description: Distinct filters regulate how many items with the same value of a particular attribute can be returned.
      properties:
        attribute:
          type: string
          description: Name of the attribute to be used for distinct filter
        maxNumItems:
          type: integer
          description: Maximum number of items to be returned per each distinct attribute value
          minimum: 1
        levelRangeModifier:
          type: integer
          description: Level of the category, if the category attribute was used for distinct filter
          minimum: 0
      required:
        - attribute
        - maxNumItems
    items-search-SearchQuery:
      type: string
      description: Query text to use in the search
    items-search-SuggestionResponseWithExplanation:
      type: object
      title: Suggestion search
      properties:
        data:
          type: array
          description: A page of search query suggestions
          items:
            type: object
            description: A search suggestion
            properties:
              _explanation:
                type: object
                description: Explanation of the result
                properties:
                  origin:
                    type: array
                    description: The type of suggestion
                    items:
                      type: string
                      enum:
                        - Manual
                        - Attribute
                        - Event
                  popularityScore:
                    type: number
                    description: Popularity of the suggestion
                  score:
                    type: number
                    description: Score of the suggestion
              suggestion:
                type: string
                description: The suggested search phrase
        extras:
          type: object
          description: Additional information
          properties:
            correlationId:
              $ref: "#/components/schemas/items-search-CorrelationIdInResponse"
            searchId:
              $ref: "#/components/schemas/items-search-SearchIdInResponse"
            facetsOrdering:
              $ref: "#/components/schemas/items-search-FacetsOrderingResponse"
        meta:
          $ref: "#/components/schemas/items-search-PaginationMeta"
    items-search-FullTextSearchResponseWithExplanation:
      type: object
      title: Item search
      properties:
        data:
          $ref: "#/components/schemas/items-search-FoundItemsWithExplanation"
        extras:
          type: object
          description: Additional information
          properties:
            filteredFacets:
              $ref: "#/components/schemas/items-search-ResultFacets"
            allFacets:
              $ref: "#/components/schemas/items-search-ResultFacets"
            customFilteredFacets:
              allOf:
                - type: object
                  description: Facets resulting from the `customFilteredFacets` setting. Only available in `POST` requests.
                - $ref: "#/components/schemas/items-search-ResultFacets"
            correlationId:
              $ref: "#/components/schemas/items-search-CorrelationIdInResponse"
            searchId:
              $ref: "#/components/schemas/items-search-SearchIdInResponse"
            facetsOrdering:
              $ref: "#/components/schemas/items-search-FacetsOrderingResponse"
            suggestions:
              type: array
              description: A list of search suggestions
              items:
                $ref: "#/components/schemas/items-search-FullTextSuggestionSchema"
            usedSuggestion:
              $ref: "#/components/schemas/items-search-UsedSuggestion"
            explanation:
              $ref: "#/components/schemas/items-search-SearchExplanationWithRerankerExplanation"
        meta:
          $ref: "#/components/schemas/items-search-PaginationMeta"
    items-search-SearchExplanationWithRerankerExplanation:
      allOf:
        - $ref: "#/components/schemas/items-search-Explanation"
        - type: object
          properties:
            reranker:
              $ref: "#/components/schemas/items-search-RerankerExplanation"
    items-search-RerankerExplanation:
      type: object
      properties:
        queryClassificationApplied:
          type: boolean
          description: "`true` if query classification was applied."
        dynamicRerankerApplied:
          type: boolean
          description: "`true` if dynamic reranker was applied."
        queryClassificationResult:
          $ref: "#/components/schemas/items-search-QueryClassificationCategories"
    items-search-QueryClassificationCategories:
      type: array
      description: A list of predicted categories and their scores
      items:
        type: object
        properties:
          category:
            type: string
            description: The predicted category.
          score:
            type: number
            description: The score of the predicted category.
          ctr:
            type: number
            description: The CTR of the predicted category.
            format: float
          actions:
            type: array
            items:
              $ref: "#/components/schemas/items-search-SearchResultAction"
          reliabilityLevel:
            $ref: "#/components/schemas/items-search-ReliabilityLevel"
    items-search-ReliabilityLevel:
      type: string
      description: The reliability level indicates how confident we are that a given prediction is the best choice.
      enum:
        - certain
        - veryHigh
        - high
        - medium
        - low
    items-search-SearchResultAction:
      type: string
      description: |
        The action to perform when the reliability level from `minReliabilityLevel` is reached.
        - `staticFilter` will apply a static filter to limit the search results to the predicted category.
        - `elasticFilter` will apply an elastic filter - if there are not enough results from the predicted category, the AI engine will pick items from other categories to meet the minimum number of results.
        - `boosting` will increase the scores of items from the predicted category.

        If reliability levels are met for multiple actions, the priority is:
        1. static filter
        2. elastic filter
        3. boosting
      enum:
        - staticFilter
        - elasticFilter
        - boosting
    items-search-AutocompleteResponse:
      type: object
      title: Item search
      properties:
        data:
          $ref: "#/components/schemas/items-search-FoundItems"
        extras:
          type: object
          description: Additional information
          properties:
            filteredFacets:
              $ref: "#/components/schemas/items-search-ResultFacets"
            allFacets:
              $ref: "#/components/schemas/items-search-ResultFacets"
            customFilteredFacets:
              allOf:
                - type: object
                  description: Facets resulting from the `customFilteredFacets` setting. Only available in `POST` requests.
                - $ref: "#/components/schemas/items-search-ResultFacets"
            correlationId:
              $ref: "#/components/schemas/items-search-CorrelationIdInResponse"
            searchId:
              $ref: "#/components/schemas/items-search-SearchIdInResponse"
            facetsOrdering:
              $ref: "#/components/schemas/items-search-FacetsOrderingResponse"
            suggestions:
              type: array
              description: A list of search suggestions
              items:
                $ref: "#/components/schemas/items-search-FullTextSuggestionSchema"
            usedSuggestion:
              $ref: "#/components/schemas/items-search-UsedSuggestion"
        meta:
          $ref: "#/components/schemas/items-search-PaginationMeta"
    items-search-AutocompleteRequest:
      type: object
      properties:
        query:
          $ref: "#/components/schemas/items-search-SearchQuery"
        page:
          $ref: "#/components/schemas/items-search-PaginationPage"
        limit:
          $ref: "#/components/schemas/items-search-PaginationLimit"
        sortBy:
          $ref: "#/components/schemas/items-search-PaginationSortBy"
        ordering:
          $ref: "#/components/schemas/items-search-PaginationOrdering"
        includeMeta:
          $ref: "#/components/schemas/items-search-PaginationIncludeMeta"
        clientUUID:
          $ref: "#/components/schemas/items-search-ClientUUID"
        sortByMetric:
          $ref: "#/components/schemas/items-search-SortByMetric"
        sortByGeoPoints:
          $ref: "#/components/schemas/items-search-SortByGeoPoint"
        filterGeoPoints:
          $ref: "#/components/schemas/items-search-FilterGeoPoints"
        filterAroundRadius:
          $ref: "#/components/schemas/items-search-FilterAroundRadius"
        filters:
          $ref: "#/components/schemas/items-search-Filters"
        facets:
          $ref: "#/components/schemas/items-search-Facets"
        customFilteredFacets:
          $ref: "#/components/schemas/items-search-CustomFilteredFacets"
        facetsSize:
          $ref: "#/components/schemas/items-search-FacetsSize"
        maxValuesPerFacet:
          $ref: "#/components/schemas/items-search-MaxValuesPerFacet"
        caseSensitiveFacetValues:
          $ref: "#/components/schemas/items-search-CaseSensitiveFacetValues"
        includeFacets:
          $ref: "#/components/schemas/items-search-IncludeFacets"
        facetsOrderBy:
          $ref: "#/components/schemas/items-search-FacetsOrdering"
        context:
          $ref: "#/components/schemas/items-search-Context"
        displayAttributes:
          $ref: "#/components/schemas/items-search-DisplayAttributes"
        distinctFilter:
          $ref: "#/components/schemas/items-search-DistinctFilterSearch"
        ignoreQueryRules:
          $ref: "#/components/schemas/items-search-IgnoreQueryRules"
        excludeQueryRules:
          $ref: "#/components/schemas/items-search-ExcludeQueryRules"
        params:
          $ref: "#/components/schemas/items-search-Params"
        disableQueryClassification:
          $ref: "#/components/schemas/items-search-DisableQueryClassification"
        disableDynamicReranker:
          $ref: "#/components/schemas/items-search-DisableDynamicReranker"
      required:
        - query
    items-search-AutocompleteResponseWithExplanation:
      type: object
      title: Item search
      properties:
        data:
          $ref: "#/components/schemas/items-search-FoundItemsWithExplanation"
        extras:
          type: object
          description: Additional information
          properties:
            filteredFacets:
              $ref: "#/components/schemas/items-search-ResultFacets"
            allFacets:
              $ref: "#/components/schemas/items-search-ResultFacets"
            customFilteredFacets:
              allOf:
                - type: object
                  description: Facets resulting from the `customFilteredFacets` setting. Only available in `POST` requests.
                - $ref: "#/components/schemas/items-search-ResultFacets"
            correlationId:
              $ref: "#/components/schemas/items-search-CorrelationIdInResponse"
            searchId:
              $ref: "#/components/schemas/items-search-SearchIdInResponse"
            facetsOrdering:
              $ref: "#/components/schemas/items-search-FacetsOrderingResponse"
            suggestions:
              type: array
              description: A list of search suggestions
              items:
                $ref: "#/components/schemas/items-search-FullTextSuggestionSchema"
            usedSuggestion:
              $ref: "#/components/schemas/items-search-UsedSuggestion"
            explanation:
              $ref: "#/components/schemas/items-search-SearchExplanationWithRerankerExplanation"
        meta:
          $ref: "#/components/schemas/items-search-PaginationMeta"
    items-search-ListingResponse:
      type: object
      properties:
        data:
          $ref: "#/components/schemas/items-search-FoundItems"
        extras:
          type: object
          description: Additional information
          properties:
            filteredFacets:
              $ref: "#/components/schemas/items-search-ResultFacets"
            allFacets:
              $ref: "#/components/schemas/items-search-ResultFacets"
            customFilteredFacets:
              allOf:
                - type: object
                  description: Facets resulting from the `customFilteredFacets` setting. Only available in `POST` requests.
                - $ref: "#/components/schemas/items-search-ResultFacets"
            correlationId:
              $ref: "#/components/schemas/items-search-CorrelationIdInResponse"
            searchId:
              $ref: "#/components/schemas/items-search-SearchIdInResponse"
            facetsOrdering:
              $ref: "#/components/schemas/items-search-FacetsOrderingResponse"
        meta:
          $ref: "#/components/schemas/items-search-PaginationMeta"
    items-search-ListingRequest:
      type: object
      properties:
        page:
          $ref: "#/components/schemas/items-search-PaginationPage"
        limit:
          $ref: "#/components/schemas/items-search-PaginationLimit"
        sortBy:
          $ref: "#/components/schemas/items-search-PaginationSortBy"
        ordering:
          $ref: "#/components/schemas/items-search-PaginationOrdering"
        includeMeta:
          $ref: "#/components/schemas/items-search-PaginationIncludeMeta"
        clientUUID:
          $ref: "#/components/schemas/items-search-ClientUUID"
        personalize:
          $ref: "#/components/schemas/items-search-Personalize"
        correlationId:
          $ref: "#/components/schemas/items-search-CorrelationId"
        searchId:
          $ref: "#/components/schemas/items-search-SearchId"
        sortByMetric:
          $ref: "#/components/schemas/items-search-SortByMetric"
        sortByGeoPoints:
          $ref: "#/components/schemas/items-search-SortByGeoPoint"
        filterGeoPoints:
          $ref: "#/components/schemas/items-search-FilterGeoPoints"
        filterAroundRadius:
          $ref: "#/components/schemas/items-search-FilterAroundRadius"
        filters:
          $ref: "#/components/schemas/items-search-Filters"
        facets:
          $ref: "#/components/schemas/items-search-Facets"
        customFilteredFacets:
          $ref: "#/components/schemas/items-search-CustomFilteredFacets"
        facetsSize:
          $ref: "#/components/schemas/items-search-FacetsSize"
        maxValuesPerFacet:
          $ref: "#/components/schemas/items-search-MaxValuesPerFacet"
        caseSensitiveFacetValues:
          $ref: "#/components/schemas/items-search-CaseSensitiveFacetValues"
        includeFacets:
          $ref: "#/components/schemas/items-search-IncludeFacets"
        facetsOrderBy:
          $ref: "#/components/schemas/items-search-FacetsOrdering"
        context:
          $ref: "#/components/schemas/items-search-Context"
        displayAttributes:
          $ref: "#/components/schemas/items-search-DisplayAttributes"
        distinctFilter:
          $ref: "#/components/schemas/items-search-DistinctFilterSearch"
        ignoreQueryRules:
          $ref: "#/components/schemas/items-search-IgnoreQueryRules"
        excludeQueryRules:
          $ref: "#/components/schemas/items-search-ExcludeQueryRules"
        params:
          $ref: "#/components/schemas/items-search-Params"
    items-search-ListingResponseWithExplanation:
      type: object
      properties:
        data:
          $ref: "#/components/schemas/items-search-FoundItemsWithExplanation"
        extras:
          type: object
          description: Additional information
          properties:
            filteredFacets:
              $ref: "#/components/schemas/items-search-ResultFacets"
            allFacets:
              $ref: "#/components/schemas/items-search-ResultFacets"
            customFilteredFacets:
              allOf:
                - type: object
                  description: Facets resulting from the `customFilteredFacets` setting. Only available in `POST` requests.
                - $ref: "#/components/schemas/items-search-ResultFacets"
            correlationId:
              $ref: "#/components/schemas/items-search-CorrelationIdInResponse"
            searchId:
              $ref: "#/components/schemas/items-search-SearchIdInResponse"
            facetsOrdering:
              $ref: "#/components/schemas/items-search-FacetsOrderingResponse"
            explanation:
              $ref: "#/components/schemas/items-search-Explanation"
        meta:
          $ref: "#/components/schemas/items-search-PaginationMeta"
    items-search-FilterableAttributesValues:
      type: object
      additionalProperties:
        type: array
        description: The name of the array is the attribute name. The values in the array are the possible values of that attribute.
        items:
          type: string
      example:
        brand:
          - foo
          - bar
        color:
          - red
          - green
          - blue
    items-search-SearchableAttributesMatchResponse:
      type: object
      title: Searchable attributes match
      properties:
        query:
          type: object
          description: Search query with tokens
          properties:
            value:
              type: string
              description: Search query
            tokens:
              type: array
              description: A list of search query tokens and their positions
              items:
                $ref: "#/components/schemas/items-search-SearchQueryTokens"
        attributes:
          $ref: "#/components/schemas/items-search-ExplainMatchSearchableAttributes"
    items-search-ExplainMatchSearchableAttributes:
      type: array
      description: A list of searchable attributes with value and matched tokens
      items:
        type: object
        properties:
          attribute:
            type: string
            description: Attribute name
          value:
            description: Attribute value
            type: string
          tokens:
            type: array
            description: A list of matched tokens
            items:
              type: object
              properties:
                queryToken:
                  type: string
                  description: Matched token
                type:
                  description: Token type
                  type: string
                  enum:
                    - word
                    - synonym
                start:
                  type: number
                  description: Start position
                end:
                  type: number
                  description: Start position
    items-search-SearchQueryTokens:
      type: object
      title: Search query tokens
      properties:
        token:
          type: string
          description: Search query token
        positions:
          type: array
          description: A list of query token positions
          items:
            type: object
            properties:
              start:
                type: number
                description: Start position
              end:
                type: number
                description: Start position
    items-search-config-Error:
      type: object
      properties:
        timestamp:
          type: string
          format: date-time
          description: Time when the error occurred
        status:
          type: integer
          description: Status code
        error:
          type: string
          description: Summary of the error
        message:
          type: string
          description: Description of the problem
        path:
          type: string
          description: URL of the requested resource
      required:
        - timestamp
        - status
        - message
    items-search-config-PaginatedSearchConfigsSchema:
      type: object
      properties:
        data:
          type: array
          description: A list of indices' configurations
          items:
            $ref: "#/components/schemas/items-search-config-SearchConfigSchema"
        meta:
          $ref: "#/components/schemas/items-search-config-PaginationMeta"
        extras:
          $ref: "#/components/schemas/items-search-config-IndicesLimitsSchema"
    items-search-config-IndicesLimitsSchema:
      type: object
      description: Search-indices limit info for the requesting business profile
      required:
        - indexLimit
        - indexLimitReached
      properties:
        indexLimit:
          type: integer
          description: Maximum number of search indices allowed for this business profile (capped by hard limit)
        indexLimitReached:
          type: boolean
          description: True if the current number of search indices is at or above indexLimit
    items-search-config-PaginationMeta:
      type: object
      description: 'Optional pagination metadata (sent if `"includeMeta": true`)'
      properties:
        totalPages:
          type: number
          description: The total number of pages
        totalCount:
          type: number
          description: The total number of campaigns
        page:
          type: number
          description: The current page
        limit:
          type: number
          description: The maximal number of items on a page
        sortedBy:
          type: string
          description: The column (attribute) that the campaigns were sorted by
        ordering:
          type: string
          description: Sorting order
        code:
          type: number
          description: HTTP response code
        link:
          type: array
          description: Links to neighboring pages, first page, and last page in pagination
          items:
            type: object
            properties:
              url:
                description: Page URL
                type: string
              rel:
                type: string
                description: Position of the linked page
                enum:
                  - first
                  - next
                  - prev
                  - last
    items-search-config-SearchConfigSchema:
      type: object
      description: Details of a single index
      properties:
        indexId:
          $ref: "#/components/schemas/items-search-config-IndexIdSchema"
        indexName:
          $ref: "#/components/schemas/items-search-config-IndexNameSchema"
        description:
          $ref: "#/components/schemas/items-search-config-IndexDescriptionSchema"
        itemsCatalogId:
          $ref: "#/components/schemas/items-search-config-ItemsCatalogIdSchema"
        language:
          $ref: "#/components/schemas/items-search-config-LanguageSchema"
        enabled:
          $ref: "#/components/schemas/items-search-config-EnabledSchema"
        ignoreUnavailableItems:
          $ref: "#/components/schemas/items-search-config-IgnoreUnavailableItemsSchema"
        scoring:
          $ref: "#/components/schemas/items-search-config-ScoringSchema"
        suggestions:
          $ref: "#/components/schemas/items-search-config-Suggestions"
        tokenizer:
          $ref: "#/components/schemas/items-search-config-Tokenizer"
        analyzers:
          $ref: "#/components/schemas/items-search-config-Analyzers"
        attributesWithoutPrefixSearch:
          $ref: "#/components/schemas/items-search-config-AttributesWithoutPrefixSearchSchema"
        attributesWithoutTypoTolerance:
          $ref: "#/components/schemas/items-search-config-AttributesWithoutTypoToleranceSchema"
        valuesWithoutTypoTolerance:
          $ref: "#/components/schemas/items-search-config-ValuesWithoutTypoToleranceSchema"
        typoToleranceOnNumericValues:
          $ref: "#/components/schemas/items-search-config-TypoToleranceOnNumericValuesSchema"
        searchableAttributes:
          $ref: "#/components/schemas/items-search-config-SearchableAttributesSchema"
        displayableAttributes:
          $ref: "#/components/schemas/items-search-config-DisplayableAttributesSchema"
        facetableAttributes:
          $ref: "#/components/schemas/items-search-config-FacetableAttributesSchema"
        filterableAttributes:
          $ref: "#/components/schemas/items-search-config-FilterableAttributesSchema"
        sortableAttributes:
          $ref: "#/components/schemas/items-search-config-SortableAttributesSchema"
        distinctFilterAttributes:
          $ref: "#/components/schemas/items-search-config-DistinctFilterAttributesSchema"
        recentSearches:
          $ref: "#/components/schemas/items-search-config-RecentSearchesConfig"
        reranking:
          $ref: "#/components/schemas/items-search-config-RerankingSchema"
        dynamicSynonyms:
          $ref: "#/components/schemas/items-search-config-DynamicSynonymsConfigurationSchema"
        dynamicFacets:
          $ref: "#/components/schemas/items-search-config-DynamicFacetsSchema"
        geoSearch:
          $ref: "#/components/schemas/items-search-config-GeoSearchSchema"
        queryRules:
          $ref: "#/components/schemas/items-search-config-QueryRulesSchema"
        updatedAt:
          $ref: "#/components/schemas/items-search-config-UpdatedAtSchema"
        createdAt:
          $ref: "#/components/schemas/items-search-config-CreatedAtSchema"
    items-search-config-CreatedAtSchema:
      type: string
      format: date-time
      description: Creation time in YYYY-MM-DDThh:mm:ssZ format (ISO 8601, UTC)
    items-search-config-UpdatedAtSchema:
      type: string
      format: date-time
      description: Last update time in YYYY-MM-DDThh:mm:ssZ format (ISO 8601, UTC)
    items-search-config-QueryRulesSchema:
      description: Configuration for custom behavior of query rules at the index level.
      type: object
      properties:
        consequencesJoinOperators:
          type: object
          description: |
            Defines how filter consequences from multiple query rules are logically combined.
            This setting determines whether those filters are joined using the AND or OR operator.
          properties:
            standardFilters:
              type: string
              description: |
                Logical operator used to combine standard filters defined in the consequences of multiple query rules.
                If not specified, the default operator is OR.
              enum:
                - AND
                - OR
              default: OR
            elasticFilters:
              type: string
              description: |
                Logical operator used to combine elastic filters defined in the consequences of multiple query rules.
                If not specified, the default operator is OR.
              enum:
                - AND
                - OR
              default: OR
    items-search-config-GeoSearchSchema:
      type: object
      description: Geo search configuration
      properties:
        geoSearchableAttribute:
          type: string
          description: |
            Attribute that contains the geolocation of the product.
            The attribute's value must be one of the following types:
            - JSON object with `lat` and `lon` properties
            - JSON array of objects containing `lat` and `lon` properties
            - JSON string of format `latitude,longitude`
            - JSON array of strings of format `latitude,longitude`
    items-search-config-DynamicFacetsSchema:
      type: object
      description: Dynamic facets configuration
      required:
        - enabled
        - maxFacets
      properties:
        enabled:
          type: boolean
          description: When `true`, dynamic facets are enabled.
        maxFacets:
          type: integer
          description: Maximum number of dynamic facets to return. Must be non-negative.
          minimum: 0
          example: 10
        minCoverageThreshold:
          type: number
          format: float
          description: |
            Minimum coverage threshold for a facet to be included. Must be in [0, 1] range. 
            Coverage is `M/N`, where:
            - `M` is the number of occurrences of a facet in the search results.
            - `N` is the total number of results.
            Higher coverage values mean that a facet is more relevant.
          minimum: 0
          maximum: 1
          example: 0.1
    items-search-config-DynamicSynonymsConfigurationSchema:
      type: object
      description: Dynamic synonyms configuration
      required:
        - enabled
        - workflowIntervalDays
      properties:
        enabled:
          type: boolean
          description: When `true`, dynamic synonyms are enabled
        workflowIntervalDays:
          type: integer
          description: Interval in days between synonym workflow runs
          minimum: 7
          maximum: 31
          example: 14
        coldStart:
          type: boolean
          description: Enables cold start mode for dynamic synonyms. Once enabled, it cannot be disabled. When enabled for the first time, a cold-start-agent resource is created with NOT READY state.
          default: false
          example: false
        autoAcceptThreshold:
          type: number
          format: float
          description: Threshold for automatic synonym acceptance. Must be in [0, 1] range.
          minimum: 0
          maximum: 1
          example: 0.8
    items-search-config-RerankingSchema:
      type: object
      description: Reranking configuration
      properties:
        dynamicReranker:
          $ref: "#/components/schemas/items-search-config-DynamicRerankerSchema"
        queryClassification:
          $ref: "#/components/schemas/items-search-config-QueryClassificationSchema"
    items-search-config-QueryClassificationSchema:
      type: object
      description: Query classification configuration
      properties:
        enabled:
          type: boolean
          description: When `true`, the query classification is enabled.
        actions:
          type: array
          description: Search result actions with a minimum reliability level
          items:
            type: object
            properties:
              action:
                $ref: "#/components/schemas/items-search-config-SearchResultAction"
              minReliabilityLevel:
                $ref: "#/components/schemas/items-search-config-ReliabilityLevel"
        excludedPhrases:
          type: array
          description: Phrases that will be excluded from query classification
          items:
            type: string
        excludedCategories:
          type: array
          description: Categories that will be excluded from query classification
          items:
            type: string
    items-search-config-ReliabilityLevel:
      type: string
      description: |
        For each type of action, you can specify the minimum level required to trigger that action. A reliability level indicates how confident we are that a given prediction is the best choice.
      enum:
        - certain
        - veryHigh
        - high
        - medium
        - low
    items-search-config-SearchResultAction:
      type: string
      description: |
        The action to perform when the reliability level from `minReliabilityLevel` is reached.
        - `staticFilter` will apply a static filter to limit the search results to the predicted category.
        - `elasticFilter` will apply an elastic filter - if there are not enough results from the predicted category, the AI engine will pick items from other categories to meet the minimum number of results.
        - `boosting` will increase the scores of items from the predicted category.

        If reliability levels are met for multiple actions, the priority is:
        1. static filter
        2. elastic filter
        3. boosting
      enum:
        - staticFilter
        - elasticFilter
        - boosting
    items-search-config-DynamicRerankerSchema:
      type: object
      description: Dynamic reranker configuration
      required:
        - enabled
        - numberOfItems
      properties:
        enabled:
          type: boolean
          description: When `true`, the dynamic reranker is enabled
        filter:
          type: string
          description: Only items that meet this filter will be considered by the reranker
        numberOfItems:
          type: integer
          description: Number of items that can be reranked in search results
          minimum: 1
          maximum: 50
        minNumberOfEvents:
          type: integer
          description: If present, items with fewer events than this value will be filtered out from reranking.
    items-search-config-RecentSearchesConfig:
      type: object
      description: Recent searches configuration
      properties:
        windowSize:
          description: Amount of recent searches items to be returned
          type: integer
          example: 100
        timeSpan:
          type: object
          description: Defines period for which recent searches are to be returned
          properties:
            type:
              description: One of the following time units
              type: string
              enum:
                - YEARS
                - MONTHS
                - WEEKS
                - DAYS
                - HOURS
                - MINUTES
                - SECONDS
              example: DAYS
            value:
              description: Value corresponding with the time unit
              type: integer
              example: 30
    items-search-config-DistinctFilterAttributesSchema:
      description: Attributes for which distinct can be used
      type: object
      properties:
        range:
          $ref: "#/components/schemas/items-search-config-RangeAttributesSchema"
        text:
          $ref: "#/components/schemas/items-search-config-TextAttributesSchema"
        datetime:
          $ref: "#/components/schemas/items-search-config-DatetimeAttributesSchema"
    items-search-config-DatetimeAttributesSchema:
      type: array
      description: Array of datetime attributes
      example:
        - created
        - attributes.modifiedAt
      default: []
      items:
        type: string
    items-search-config-TextAttributesSchema:
      type: array
      description: Array of text attributes
      example:
        - brand
        - color
        - promotion.type
      default: []
      items:
        type: string
    items-search-config-RangeAttributesSchema:
      type: array
      description: Array of range attributes
      example:
        - age
        - customScore.value
        - salePrice.value
      default: []
      items:
        type: string
    items-search-config-SortableAttributesSchema:
      description: Attributes using which search results can be sorted
      type: object
      properties:
        range:
          $ref: "#/components/schemas/items-search-config-RangeAttributesSchema"
        text:
          $ref: "#/components/schemas/items-search-config-TextAttributesSchema"
        datetime:
          $ref: "#/components/schemas/items-search-config-DatetimeAttributesSchema"
    items-search-config-FilterableAttributesSchema:
      description: Attributes for which filters can be used
      type: object
      properties:
        range:
          $ref: "#/components/schemas/items-search-config-RangeAttributesSchema"
        text:
          $ref: "#/components/schemas/items-search-config-TextAttributesSchema"
        datetime:
          $ref: "#/components/schemas/items-search-config-DatetimeAttributesSchema"
    items-search-config-FacetableAttributesSchema:
      description: Attributes for which facets are returned in the search response. By default, all facetable attributes are also filterable and sortable.
      type: object
      properties:
        range:
          $ref: "#/components/schemas/items-search-config-RangeAttributesSchema"
        text:
          $ref: "#/components/schemas/items-search-config-TextAttributesSchema"
        datetime:
          $ref: "#/components/schemas/items-search-config-DatetimeAttributesSchema"
    items-search-config-DisplayableAttributesSchema:
      description: Attributes shown in the search results
      example:
        - brand
        - color
        - promotion.type
      type: array
      items:
        type: string
    items-search-config-SearchableAttributesSchema:
      description: |
        The attributes that are taken into account as full text search terms
      type: object
      properties:
        fullText:
          type: array
          description: The least important parameters
          example:
            - brand
            - color
            - promotion.type
          items:
            type: string
        fullTextBoosted:
          type: array
          description: Medium-importance parameters
          example:
            - brand
            - color
            - promotion.type
          items:
            type: string
        fullTextStronglyBoosted:
          type: array
          description: The most important parameters
          example:
            - brand
            - color
            - promotion.type
          items:
            type: string
    items-search-config-TypoToleranceOnNumericValuesSchema:
      type: boolean
      description: When `true`, typo tolerance is active on numbers
      default: true
    items-search-config-ValuesWithoutTypoToleranceSchema:
      type: array
      description: Attributes values for which typo tolerance is off
      example:
        - Nike
        - blue
        - "74997"
      items:
        type: string
    items-search-config-AttributesWithoutTypoToleranceSchema:
      type: array
      description: Searchable attributes for which typo tolerance is off
      example:
        - itemId
        - link
      items:
        type: string
    items-search-config-AttributesWithoutPrefixSearchSchema:
      type: array
      description: Searchable attributes which will not be used in a prefix search
      example:
        - brand
        - color
        - promotion.type
      items:
        type: string
    items-search-config-Analyzers:
      type: object
      description: Controls analyzer settings.
      required:
        - autocomplete
      properties:
        autocomplete:
          type: string
          description: The completion method used.
          enum:
            - Ngram
            - EdgeNgram
            - NgramWithSynonyms
            - EdgeNgramWithSynonyms
            - DefaultWithSynonyms
    items-search-config-Tokenizer:
      description: Used for tokenizing full text into individual words
      oneOf:
        - $ref: "#/components/schemas/items-search-config-WhitespaceTokenizer"
        - $ref: "#/components/schemas/items-search-config-StandardTokenizer"
        - $ref: "#/components/schemas/items-search-config-PatternTokenizer"
    items-search-config-PatternTokenizer:
      type: object
      description: The pattern tokenizer uses a regular expression to either split text into terms whenever it matches a word separator
      properties:
        type:
          type: string
          enum:
            - Pattern
        pattern:
          type: string
          example: "[.,;]"
    items-search-config-StandardTokenizer:
      type: object
      description: The standard tokenizer divides text into terms on word boundaries
      properties:
        type:
          type: string
          enum:
            - Standard
    items-search-config-WhitespaceTokenizer:
      type: object
      description: The whitespace tokenizer divides text into terms whenever it encounters any whitespace character
      properties:
        type:
          type: string
          enum:
            - Whitespace
    items-search-config-Suggestions:
      type: object
      description: Controls manner in which suggestions are generated
      properties:
        smoothingModel:
          type: string
          description: Controls balance weight between infrequent grams and frequent grams
          enum:
            - Popularity
            - Accuracy
        gramSize:
          type: integer
          description: Describes max size of the n-grams in the field
          default: 3
          minimum: 1
          maximum: 10
        maxErrors:
          type: integer
          description: Maximum number of errors for terms to be considered as misspelling in order to for a correction
          default: 2
          minimum: 1
          maximum: 5
        minWordLength:
          type: integer
          description: The minimum length a suggest text term must have in order to be included
          default: 4
          minimum: 1
        useAlways:
          type: boolean
          description: Controls is suggestions are used only if no documents match, or always
          default: false
    items-search-config-ScoringSchema:
      description: |
        Item scoring settings that affect the presentation order of the results.

        `0` means the lowest importance of a parameter, `1` is the highest importance.
      type: object
      properties:
        pageVisitsPopularity:
          description: The importance of how often the item page is visited
          type: number
          format: float
          default: 0
          minimum: 0
          maximum: 1
        transactionsPopularity:
          description: The importance of how often the item is included in transactions
          type: number
          format: float
          default: 0
          minimum: 0
          maximum: 1
        personalized:
          description: The importance of how relevant a item is to a profile according to the AI model
          type: number
          format: float
          default: 0
          minimum: 0
          maximum: 1
        tieBreaker:
          description: The importance of lesser phrase matches
          type: number
          format: float
          default: 0
          minimum: 0
          maximum: 1
        matching:
          $ref: "#/components/schemas/items-search-config-Matching"
        fallbackMatching:
          $ref: "#/components/schemas/items-search-config-FallbackMatching"
        similarity:
          $ref: "#/components/schemas/items-search-config-Similarity"
        crossWorkspaceMode:
          $ref: "#/components/schemas/items-search-config-CrossWorkspaceModeSchema"
    items-search-config-CrossWorkspaceModeSchema:
      description: Cross workspace mode configuration
      type: object
      required:
        - enabled
      properties:
        enabled:
          description: When `true`, cross workspace search personalization mode is enabled
          type: boolean
    items-search-config-Similarity:
      description: Defines how matching documents are scored
      oneOf:
        - $ref: "#/components/schemas/items-search-config-BM25Similarity"
        - $ref: "#/components/schemas/items-search-config-IDFSimilarity"
    items-search-config-IDFSimilarity:
      type: object
      description: Term frequency-inverse document frequency scoring model
      properties:
        type:
          type: string
          enum:
            - IDF
    items-search-config-BM25Similarity:
      type: object
      description: Enhanced TF-IDF scoring model
      properties:
        type:
          type: string
          enum:
            - BM25
        k1:
          type: number
          description: Controls non-linear term frequency normalization (saturation)
          format: float
          default: 1.2
          minimum: 0
          maximum: 10
        b:
          type: number
          description: Controls to what degree document length normalizes tf values
          format: float
          default: 0.75
          minimum: 0
          maximum: 1
    items-search-config-FallbackMatching:
      description: |
        Backup matching mode used in cases where the main matching mode
        (specified in `matching` parameter) does not provide enough results (at least 5)
      oneOf:
        - $ref: "#/components/schemas/items-search-config-MinimumMatching"
        - $ref: "#/components/schemas/items-search-config-MaximumNotMatching"
        - $ref: "#/components/schemas/items-search-config-AnyMatching"
        - $ref: "#/components/schemas/items-search-config-AdaptiveMatching"
    items-search-config-AdaptiveMatching:
      type: object
      description: |
        Matching that works differently depending on the number of terms in the search query.
      properties:
        type:
          type: string
          enum:
            - AdaptiveMatching
        termsToMatch:
          type: number
          format: float
          minimum: 0
          exclusiveMinimum: true
          maximum: 1
          exclusiveMaximum: true
          description: |
            Indicates the percentage of all query terms that should be matched.
            This matching is done using MinimumMatching with the value set to:
            `termsToMatch * n`, where n is a number of all terms in the search query.
            **If you define termsToMatch, you can't define termsToSubtract.**
        termsToSubtract:
          type: integer
          minimum: 1
          default: 1
          description: |
            Indicates a fixed number that should be subtracted from
            the number of query terms that should match. This matching is done using
            MinimumMatching with the value set to `n - termsToSubtract`, where n is
            a number of all terms in the search query.
            **If you define termsToSubtract, you can't define termsToMatch.**
        termsToActivate:
          type: integer
          minimum: 1
          default: 3
          description: |
            Indicates how long (number of words) a search query must be to activate this mechanism.
            All queries that are shorter than termsToActivate will use AllMatching.
    items-search-config-AnyMatching:
      type: object
      description: Any of clauses should match
      properties:
        type:
          type: string
          enum:
            - AnyMatching
    items-search-config-MaximumNotMatching:
      type: object
      description: Indicates number of optional clauses
      properties:
        type:
          type: string
          enum:
            - MaximumNotMatching
        value:
          type: integer
          minimum: 1
    items-search-config-MinimumMatching:
      type: object
      description: Indicates number of mandatory clauses
      properties:
        type:
          type: string
          enum:
            - MinimumMatching
        value:
          type: integer
          minimum: 1
    items-search-config-Matching:
      description: Controls how many clauses should be present in query
      oneOf:
        - $ref: "#/components/schemas/items-search-config-MinimumMatching"
        - $ref: "#/components/schemas/items-search-config-MaximumNotMatching"
        - $ref: "#/components/schemas/items-search-config-AnyMatching"
        - $ref: "#/components/schemas/items-search-config-AllMatching"
        - $ref: "#/components/schemas/items-search-config-AdaptiveMatching"
    items-search-config-AllMatching:
      type: object
      description: All clauses should match
      properties:
        type:
          type: string
          enum:
            - AllMatching
    items-search-config-IgnoreUnavailableItemsSchema:
      type: boolean
      description: When `true`, unavailable items are not indexed, which makes the search run faster.
      default: true
    items-search-config-EnabledSchema:
      type: boolean
      description: When `true`, the index is enabled and can be queried.
    items-search-config-LanguageSchema:
      type: string
      description: Search language as ISO 639-1 code
    items-search-config-ItemsCatalogIdSchema:
      type: string
      description: ID of the item catalog from which the index will be created
    items-search-config-IndexDescriptionSchema:
      type: string
      description: Description of the index
    items-search-config-IndexNameSchema:
      type: string
      description: Human-friendly name of the index
    items-search-config-IndexIdSchema:
      type: string
      description: ID of the index
    items-search-config-IndexStateResponseSchema:
      type: object
      description: State of a single index
      properties:
        indexId:
          $ref: "#/components/schemas/items-search-config-IndexIdSchema"
        state:
          $ref: "#/components/schemas/items-search-config-IndexStateSchema"
        lastConfigChange:
          $ref: "#/components/schemas/items-search-config-UpdatedAtSchema"
        errorReason:
          type: string
          description: Reason why index was not rebuild successfully
        log:
          type: string
          description: Error log with additional information
    items-search-config-IndexStateSchema:
      type: string
      enum:
        - NotReady
        - ReadyUpToDate
        - ReadyNotUpToDate
      description: State of the index
    items-search-config-SupportedLanguages:
      type: object
      description: Supported search languages as ISO 639-1 codes
      example:
        pl: Polish
        ro: Romanian
        ru: Russian
      additionalProperties:
        type: string
        description: Human-readable label for the ISO code
    items-search-config-GetSuggestionIndicesResponseSchema:
      type: object
      properties:
        data:
          type: array
          description: An array of suggestion indices
          items:
            $ref: "#/components/schemas/items-search-config-SuggestionIndexSchema"
        meta:
          $ref: "#/components/schemas/items-search-config-PaginationMeta"
    items-search-config-SuggestionIndexSchema:
      type: object
      properties:
        indexId:
          $ref: "#/components/schemas/items-search-config-IndexIdSchema"
        indexName:
          $ref: "#/components/schemas/items-search-config-SuggestionIndexNameSchema"
        description:
          $ref: "#/components/schemas/items-search-config-SuggestionIndexDescriptionSchema"
        author:
          $ref: "#/components/schemas/items-search-config-SuggestionIndexAuthorSchema"
        enabled:
          $ref: "#/components/schemas/items-search-config-SuggestionIndexEnabledSchema"
        sources:
          $ref: "#/components/schemas/items-search-config-SuggestionIndexSourcesSchema"
        denylist:
          $ref: "#/components/schemas/items-search-config-SuggestionIndexDenylistSchema"
        updatedAt:
          $ref: "#/components/schemas/items-search-config-UpdatedAtSchema"
        createdAt:
          $ref: "#/components/schemas/items-search-config-CreatedAtSchema"
    items-search-config-SuggestionIndexDenylistSchema:
      type: array
      description: Suggestions that will be ignored and *not* shown
      items:
        type: object
        properties:
          pattern:
            type: string
            description: Pattern (text) to be used while denylisting suggestions. If the suggestion matches the pattern in a way defined by `matchingType`, it's not shown.
          matchingType:
            type: string
            description: |
              
              <span style="color:red"><strong>IMPORTANT</strong></span>: All patterns are case-**in**sensitive, including regex.

              - Using Phrase matching, the suggestion must match the whole pattern exactly.

              - Using FullWord matching, any word of the suggestion must exactly match the pattern.

              - Using PartialWord matching, any word of the suggestion must partially match the pattern.

              - Using RegularExpression matching, the pattern is treated as a regular expression and must match the suggestion.
            enum:
              - Phrase
              - FullWord
              - PartialWord
              - RegularExpression
            example: Phrase
    items-search-config-SuggestionIndexSourcesSchema:
      type: object
      description: Sources for the suggestions
      properties:
        indices:
          $ref: "#/components/schemas/items-search-config-SuggestionIndexSourceIndicesSchema"
        external:
          $ref: "#/components/schemas/items-search-config-SuggestionIndexExternalSchema"
        generate:
          $ref: "#/components/schemas/items-search-config-SuggestionIndexGenerateSchema"
    items-search-config-SuggestionIndexGenerateSchema:
      type: array
      description: |
        A group of attributes to use for generating suggestions.

        If the group consists of single facet, all values of the facet are used as suggestions.

        If the group consists of more than one facet, all combinations of the facets' values are used.

        **Example 1:**
        - Given the `["brand"]` group, the generated suggestions are: `["apple", "samsung", "nokia"]`

        - Given the `["color"]` group, the generated suggestions are: `["red", "blue"]`

        **Example 2:**

        Given the `["color", "brand"]` group, the generated suggestions are:<br/>
        `["red apple", "red samsung", "red nokia", "blue apple", "blue samsung", "blue nokia"]`
      items:
        type: object
        properties:
          itemsCatalogId:
            type: string
            description: Id of a catalog from which attributes will be taken
          attributes:
            type: array
            items:
              type: string
    items-search-config-SuggestionIndexExternalSchema:
      type: array
      description: An array of external queries that can be used as suggestions
      items:
        type: object
        properties:
          query:
            type: string
            description: External query to be used as a suggestion
          count:
            type: integer
            description: Hits of the external query - used to create the weight of the suggested query.
        required:
          - query
          - count
    items-search-config-SuggestionIndexSourceIndicesSchema:
      type: array
      description: A list of search indices
      items:
        type: object
        properties:
          indexId:
            $ref: "#/components/schemas/items-search-config-IndexIdSchema"
          minPopularity:
            type: integer
            description: Minimum popularity of a query to be used as a suggestion
            default: 5
          minHits:
            type: integer
            description: Minimum search hits of a query to be used as a suggestion
            default: 1
          minLetters:
            type: integer
            description: Minimum required number of letters for a suggestion to remain
            default: 2
          daysInterval:
            type: integer
            description: Suggestions will be created from search statistics from last `daysInterval` days
            default: 30
          validate:
            type: boolean
            description: When `true`, the suggestions presence in searchable attributes is verified
            default: false
        required:
          - indexId
    items-search-config-SuggestionIndexEnabledSchema:
      type: boolean
      description: When `true`, index is enabled and can be queried.
    items-search-config-SuggestionIndexAuthorSchema:
      type: integer
      description: ID of the user who created the suggestion index
    items-search-config-SuggestionIndexDescriptionSchema:
      type: string
      description: Description of the suggestion index
    items-search-config-SuggestionIndexNameSchema:
      type: string
      description: Name of the suggestion index
    items-search-recent-Error:
      type: object
      properties:
        timestamp:
          type: string
          format: date-time
          description: Time when the error occurred
        status:
          type: integer
          description: Status code
        error:
          type: string
          description: Summary of the error
        message:
          type: string
          description: Description of the problem
        path:
          type: string
          description: URL of the requested resource
      required:
        - timestamp
        - status
        - message
    items-search-recent-DeletedSearch:
      type: object
      properties:
        query:
          type: string
          description: Deleted search query. Required if `match` field is set to `query`.
        match:
          type: string
          description: |
            Tells how to match this deleted search on recent searches.

            - `query`: matches only recent searches with provided query
            - `all`: matches all recent searches
          default: query
        timestamp:
          type: string
          format: date-time
          description: Time when the search was deleted. If not present current time is taken.
    query-rules-v2-Error:
      type: object
      properties:
        timestamp:
          type: string
          format: date-time
          description: Time when the error occurred
        status:
          type: integer
          description: Status code
        error:
          type: string
          description: Summary of the error
        message:
          type: string
          description: Description of the problem
        path:
          type: string
          description: URL of the requested resource
      required:
        - timestamp
        - status
        - message
    query-rules-v2-PaginatedRules:
      type: object
      properties:
        data:
          type: array
          description: A list of rules
          items:
            $ref: "#/components/schemas/query-rules-v2-RuleWithStatus"
        extras:
          type: object
          description: Additional information
          properties:
            statuses:
              type: object
              description: The number of rules with each status. All rules are considered.
              properties:
                Finished:
                  type: integer
                Draft:
                  type: integer
                Paused:
                  type: integer
                Scheduled:
                  type: integer
                Active:
                  type: integer
        meta:
          $ref: "#/components/schemas/query-rules-v2-PaginationMeta"
    query-rules-v2-PaginationMeta:
      type: object
      description: 'Optional pagination metadata (sent if `"includeMeta": true`)'
      properties:
        totalPages:
          type: number
          description: The total number of pages
        totalCount:
          type: number
          description: The total number of campaigns
        page:
          type: number
          description: The current page
        limit:
          type: number
          description: The maximal number of items on a page
        sortedBy:
          type: string
          description: The column (attribute) that the campaigns were sorted by
        ordering:
          type: string
          description: Sorting order
        code:
          type: number
          description: HTTP response code
        link:
          type: array
          description: Links to neighboring pages, first page, and last page in pagination
          items:
            type: object
            properties:
              url:
                description: Page URL
                type: string
              rel:
                type: string
                description: Position of the linked page
                enum:
                  - first
                  - next
                  - prev
                  - last
    query-rules-v2-RuleWithStatus:
      type: object
      description: Details of the rule
      properties:
        status:
          description: Status of the rule
          type: string
        rule:
          type: object
          description: Configuration of the rule
          properties:
            id:
              $ref: "#/components/schemas/query-rules-v2-RuleId"
            name:
              $ref: "#/components/schemas/query-rules-v2-RuleName"
            author:
              $ref: "#/components/schemas/query-rules-v2-RuleAuthor"
            state:
              $ref: "#/components/schemas/query-rules-v2-RuleState"
            activeFrom:
              $ref: "#/components/schemas/query-rules-v2-RuleActiveFromDatetime"
            activeTo:
              $ref: "#/components/schemas/query-rules-v2-RuleActiveToDatetime"
            timezone:
              $ref: "#/components/schemas/query-rules-v2-RuleTimezoneSchema"
            updatedAt:
              $ref: "#/components/schemas/query-rules-v2-RuleUpdateDatetime"
            createdAt:
              $ref: "#/components/schemas/query-rules-v2-RuleCreatedDatetime"
            data:
              $ref: "#/components/schemas/query-rules-v2-RuleDataSchema"
    query-rules-v2-RuleDataSchema:
      type: object
      description: This object contains the details of what the rule does
      required:
        - conditions
        - queryConsequences
        - postQueryConsequences
      properties:
        audience:
          type: object
          description: Optional audience the rule will be applied to
          properties:
            segmentationIds:
              type: array
              description: Ids of segmentations to which client belongs
              example:
                - 34ab56cd-789be-22ee-11ab-123456789abc
                - 12xy34z5-456b-33cc-7o52-987654321ece
              items:
                type: string
        conditions:
          type: object
          description: Additional conditions
          properties:
            patterns:
              type: array
              description: Strings that trigger this rule when included in the query
              example:
                - phone
                - notebook
                - mouse {color} {brand}
              items:
                type: string
            matchingType:
              $ref: "#/components/schemas/query-rules-v2-RuleMatchingType"
            contexts:
              type: array
              description: Contexts for which the rule will be considered during matching
              example:
                - listing
                - web
                - mobile
              items:
                type: string
            filters:
              type: object
              description: You can configure a condition so that the rule only applies depending on the filters used in a search query.
              properties:
                textFilters:
                  $ref: "#/components/schemas/query-rules-v2-ConditionsTextFiltersSchema"
                rangeFilters:
                  $ref: "#/components/schemas/query-rules-v2-ConditionsRangeFiltersSchema"
                datetimeFilters:
                  $ref: "#/components/schemas/query-rules-v2-ConditionsDatetimeFiltersSchema"
        queryConsequences:
          type: array
          description: An array of transformations to be performed on the query
          items:
            type: object
            properties:
              type:
                type: string
                description: |
                  The action to perform

                  - `removeWord` removes a word from the query.
                  - `replaceWord` replaces a word from the query with a string.
                  - `replaceQuery` replaces the entire query.

                  **IMPORTANT:**

                  These operations are performed on strings that match the pattern exactly. For example:

                  1. The pattern is `foo bar`.
                  1. The operation is set to `removeWord` and `word` is set to `foo`.
                  1. The user searches for `foo bar bar foo`.

                  **The result:** "foo" is removed from "foo bar" and the transformed query is now "bar bar foo".
                enum:
                  - removeWord
                  - replaceWord
                  - replaceQuery
              word:
                type: string
                description: The word to replace or remove
              replacement:
                type: string
                description: The string that replaces the word/query
        postQueryConsequences:
          type: object
          description: This object describes how the rule affects the search results
          properties:
            hideHits:
              type: array
              description: An array of items to hide from the results, identified by `itemId`
              items:
                type: string
            promoteHits:
              type: array
              description: An array of items to show first in the results
              items:
                type: object
                properties:
                  id:
                    description: "`productRetailerPartNo`"
                    type: string
                  position:
                    description: Item's position on the list of results
                    type: integer
            promoteHitsPositionStrategy:
              $ref: "#/components/schemas/query-rules-v2-PositionStrategy"
            standardFilters:
              $ref: "#/components/schemas/query-rules-v2-RuleFilters"
            elasticFilters:
              $ref: "#/components/schemas/query-rules-v2-RuleFilters"
            boostFilters:
              $ref: "#/components/schemas/query-rules-v2-BoostFilters"
            topHitsFilters:
              $ref: "#/components/schemas/query-rules-v2-TopHitsFilters"
            distinctFilter:
              $ref: "#/components/schemas/query-rules-v2-DistinctFilter"
            sortBy:
              type: object
              description: Sorting info
              properties:
                attribute:
                  type: string
                  description: Name of the attribute by which the data will be sorted
                ordering:
                  description: Sorting order
                  type: string
                  enum:
                    - desc
                    - asc
            customData:
              type: string
              description: Custom JSON that will be returned with the search results
              example: '{"customLandingPage": "https://synerise.com/"}'
            returnNoData:
              type: boolean
              description: When set to `true`, forces the search result to be empty
              example: false
            pinFacets:
              type: array
              description: |
                Forces specific facets to be included in the response, regardless of coverage score or
                automatic facet selection. Each entry may optionally specify a 1-based `position` to pin
                the facet at a specific slot in the response `facetsOrdering`.

                A pin without `position` is placed before any non-pinned facets (in input order).
                A pin with `position` greater than the final list size is appended at the tail; multiple
                such pins keep their relative ordering by ascending `position`.
                A facet that is also `hideFacets` is dropped (hide wins).
                A pin's attribute must exist in the index's facetable attributes; positions cannot exceed
                the number of facetable attributes.
              items:
                type: object
                required:
                  - attribute
                properties:
                  attribute:
                    type: string
                    description: Name of the facet attribute to pin.
                    example: size
                  position:
                    type: integer
                    minimum: 1
                    maximum: 100
                    description: |
                      Optional 1-based slot in `facetsOrdering`. Omit to pin without specifying a slot.
                    example: 1
              example:
                - attribute: size
                  position: 1
                - attribute: width
                  position: 2
                - attribute: gift_wrap
            hideFacets:
              type: array
              description: |
                Forces specific facets to be excluded from the response, even if they would otherwise be
                selected by automatic facet selection or were explicitly requested by the API caller.
                Hidden attributes are also stripped from `customFilteredFacets` for the matched request.
              items:
                type: string
                description: Facet attribute to hide.
              example:
                - material
                - fabric
                - sleeve_length
    query-rules-v2-DistinctFilter:
      type: object
      required:
        - attribute
        - maxNumItems
      description: Distinct filter definition
      properties:
        attribute:
          type: string
          description: Name of the attribute for distinct filter
        maxNumItems:
          type: integer
          description: Max number of items having the same attribute value
        categoryLevelModifier:
          type: integer
          description: Category level modifier to use with `category` attribute
    query-rules-v2-TopHitsFilters:
      type: array
      description: Filters that move a specified number of items to the front
      items:
        type: object
        properties:
          hitsNumber:
            type: integer
            description: |
              Number of top-scoring items that match the provided filters 
              and will be moved to the front of the results
            minimum: 1
            maximum: 20
          filters:
            $ref: "#/components/schemas/query-rules-v2-RuleFilters"
    query-rules-v2-RuleFilters:
      type: object
      description: Filters for the query
      properties:
        textFilters:
          type: array
          description: Text-type filters
          items:
            type: object
            properties:
              attribute:
                type: string
                description: Attribute to be filtered
                example: brand
              mode:
                type: string
                description: |
                  Information whether to include or exclude filtered results.

                  - `include`: includes filtered results
                  - `exclude`: excludes filtered results
                enum:
                  - include
                  - exclude
                example: include
            oneOf:
              - properties:
                  values:
                    type: array
                    description: Values to be used during filtering. May contain both strings and patterns.
                    example:
                      - A-Brand
                      - B-Brand
                      - "{brand}"
                    items:
                      type: string
              - properties:
                  aggregateId:
                    type: string
                    description: Uuid of an aggregate to be used during filtering.
                    example: 32be9640-37e5-3196-abb6-6dc192002dab
              - properties:
                  expressionId:
                    type: string
                    description: Uuid of an expression to be used during filtering.
                    example: ad29ff7a-7148-4a5c-8a2a-4491e3ae7e9d
        rangeFilters:
          type: array
          description: Range-type filters
          items:
            type: object
            properties:
              attribute:
                type: string
                description: Attribute to be filtered
                example: price
              operator:
                type: string
                description: |
                  Operator to be used during filtering.

                  - `gt`: greater than
                  - `gte`: greater or equal
                  - `lt`: less than
                  - `lte`: less than or equal
                  - `eq`/`neq`: equal/not equal
                enum:
                  - gt
                  - gte
                  - lt
                  - lte
                  - eq
                  - neq
            oneOf:
              - properties:
                  value:
                    description: Value to use during filtering
                    oneOf:
                      - type: string
                        description: Placeholder value to use during filtering. The placeholder must be included in all of the patterns defined in the `conditions` object.
                        example: "{price}"
                      - type: number
                        format: float
                        description: Float value to use during filtering
                        example: 19.99
              - properties:
                  aggregateId:
                    type: string
                    description: Uuid of an aggregate to be used during filtering.
                    example: 32be9640-37e5-3196-abb6-6dc192002dab
              - properties:
                  expressionId:
                    type: string
                    description: Uuid of an expression to be used during filtering.
                    example: ad29ff7a-7148-4a5c-8a2a-4491e3ae7e
        datetimeFilters:
          type: array
          description: Range-type datetime filters
          items:
            type: object
            properties:
              attribute:
                type: string
                description: Attribute to be filtered
                example: created
              operator:
                type: string
                description: |
                  Operator to be used during filtering.

                  - `gt`: greater than
                  - `gte`: greater or equal
                  - `lt`: less than
                  - `lte`: less than or equal
                  - `eq`/`neq`: equal/not equal
                enum:
                  - gt
                  - gte
                  - lt
                  - lte
                  - eq
                  - neq
            oneOf:
              - properties:
                  value:
                    description: Value to use during filtering
                    oneOf:
                      - type: string
                        description: Placeholder value to use during filtering. The placeholder must be included in all of the patterns defined in the `conditions` object.
                        example: "{created}"
                      - type: string
                        description: ISO datetime value to use during filtering
                        example: 2024-01-01T00:00:00Z
              - properties:
                  aggregateId:
                    type: string
                    description: Uuid of an aggregate to be used during filtering.
                    example: 32be9640-37e5-3196-abb6-6dc192002dab
              - properties:
                  expressionId:
                    type: string
                    description: Uuid of an expression to be used during filtering.
                    example: ad29ff7a-7148-4a5c-8a2a-4491e3ae7e
              - properties:
                  relativeValue:
                    $ref: "#/components/schemas/query-rules-v2-RelativeDatetime"
    query-rules-v2-RelativeDatetime:
      type: object
      required:
        - value
        - unit
      properties:
        value:
          type: integer
          description: The numerical duration value.
        unit:
          type: string
          description: The unit of duration.
          enum:
            - seconds
            - minutes
            - hours
            - days
      example:
        value: 2
        unit: days
    query-rules-v2-BoostFilters:
      type: array
      description: Filters that boost the results
      items:
        type: object
        properties:
          weight:
            type: integer
            description: |
              The boost percentage. Positive values boost scores of results that match
              the provided filters. Negative values demotes scores of matching items.
            minimum: -100
            maximum: 100
            not:
              enum:
                - 0
          filters:
            $ref: "#/components/schemas/query-rules-v2-RuleFilters"
    query-rules-v2-PositionStrategy:
      oneOf:
        - $ref: "#/components/schemas/query-rules-v2-ManualType"
        - $ref: "#/components/schemas/query-rules-v2-CustomType"
        - $ref: "#/components/schemas/query-rules-v2-AscendingType"
      discriminator:
        propertyName: type
        mapping:
          manual: "#/components/schemas/query-rules-v2-ManualType"
          custom: "#/components/schemas/query-rules-v2-CustomType"
          ascending: "#/components/schemas/query-rules-v2-AscendingType"
      example:
        type: custom
    query-rules-v2-AscendingType:
      type: object
      properties:
        type:
          type: string
          enum:
            - ascending
          example: ascending
        start:
          type: integer
          example: 1
        step:
          type: integer
          example: 2
      required:
        - type
        - start
        - step
      additionalProperties: false
    query-rules-v2-CustomType:
      type: object
      properties:
        type:
          type: string
          enum:
            - custom
          example: custom
      required:
        - type
      additionalProperties: false
    query-rules-v2-ManualType:
      type: object
      properties:
        type:
          type: string
          enum:
            - manual
          example: manual
      required:
        - type
      additionalProperties: false
    query-rules-v2-ConditionsDatetimeFiltersSchema:
      type: object
      description: Condition filters for datetime attributes
      example:
        created:
          ranges:
            - rightEnd:
                value: 2024-01-01
                inclusive: true
          matchingType: Exact
      additionalProperties:
        $ref: "#/components/schemas/query-rules-v2-SingleDatetimeFiltersSchema"
    query-rules-v2-SingleDatetimeFiltersSchema:
      type: object
      description: Ranges and a matching type for a single datetime attribute. The name of this object must be the same as the name of the attribute.
      properties:
        ranges:
          type: array
          description: An array of ranges to match the attribute value with.
          items:
            type: object
            properties:
              leftEnd:
                description: Lower boundary of the range. If not defined (this object is not sent at all), defaults to infinity.
                allOf:
                  - $ref: "#/components/schemas/query-rules-v2-DatetimeEndSchema"
              rightEnd:
                description: Upper boundary of the range. If not defined (this object is not sent at all), defaults to infinity.
                allOf:
                  - $ref: "#/components/schemas/query-rules-v2-DatetimeEndSchema"
        matchingType:
          $ref: "#/components/schemas/query-rules-v2-ConditionsFiltersMatchingType"
    query-rules-v2-ConditionsFiltersMatchingType:
      type: string
      description: |
        Match logic of the filters for a given attribute. Condition filters and customer search filters are compared as mathematical sets.

        - `Exact`: the customer's search filters must be exactly the same as this condition filter.
        - `ContainsUserFilters`: this condition filter must contain all the customer's search filters (but can also contain other filters).
        - `InUserFilters`: the customer's search filter must contain all of this condition filter (but can also contain other filters)
        - `NonEmptyIntersectionWithUserFilters`: at least one of the customer's search filters must match a value from this condition filter.

        **Example:**:

        - The customer's filters are `color == "green" OR color == "white" OR color == "red"`.
        - The condition filter is `color == ["green","red"]`.

        The result is:
        - `Exact`: does not match, the sets are different.
        - `ContainsUserFilters`: does not match, some customer filters are not included in the condition filters
        - `InUserFilters`: matches, `"green"` and `"red"` are included in `["green","white","red"]`.
        - `NonEmptyIntersectionWithUserFilters`: matches, there is at least one common element
      enum:
        - Exact
        - ContainsUserFilters
        - InUserFilters
        - NonEmptyIntersectionWithUserFilters
    query-rules-v2-DatetimeEndSchema:
      type: object
      properties:
        value:
          type: string
          description: ISO datetime value
        inclusive:
          type: boolean
          description: If TRUE, `<` becomes `<=` and `>` becomes `>=`.
    query-rules-v2-ConditionsRangeFiltersSchema:
      type: object
      description: Condition filters for range attributes
      example:
        price:
          ranges:
            - rightEnd:
                value: 20
                inclusive: true
          matchingType: Exact
      additionalProperties:
        $ref: "#/components/schemas/query-rules-v2-SingleRangeFiltersSchema"
    query-rules-v2-SingleRangeFiltersSchema:
      type: object
      description: Ranges and a matching type for a single range attribute. The name of this object must be the same as the name of the attribute.
      properties:
        ranges:
          type: array
          description: An array of ranges to match the attribute value with.
          items:
            type: object
            properties:
              leftEnd:
                description: Lower boundary of the range. If not defined (this object is not sent at all), defaults to infinity.
                allOf:
                  - $ref: "#/components/schemas/query-rules-v2-RangeEndSchema"
              rightEnd:
                description: Upper boundary of the range. If not defined (this object is not sent at all), defaults to infinity.
                allOf:
                  - $ref: "#/components/schemas/query-rules-v2-RangeEndSchema"
        matchingType:
          $ref: "#/components/schemas/query-rules-v2-ConditionsFiltersMatchingType"
    query-rules-v2-RangeEndSchema:
      type: object
      properties:
        value:
          type: number
          description: Numerical value
        inclusive:
          type: boolean
          description: If TRUE, `<` becomes `<=` and `>` becomes `>=`.
    query-rules-v2-ConditionsTextFiltersSchema:
      type: object
      description: Condition filters for text attributes
      example:
        color:
          values:
            - green
            - red
          matchingType: InUserFilters
      additionalProperties:
        $ref: "#/components/schemas/query-rules-v2-SingleTextFiltersSchema"
    query-rules-v2-SingleTextFiltersSchema:
      type: object
      description: Values and a matching type for a single text attribute. The name of this object must be the same as the name of the attribute.
      properties:
        values:
          type: array
          description: An array of strings to match the attribute value with
          items:
            type: string
        matchingType:
          $ref: "#/components/schemas/query-rules-v2-ConditionsFiltersMatchingType"
    query-rules-v2-RuleMatchingType:
      type: string
      description: Match logic of the rule
      enum:
        - is
        - startsWith
        - endsWith
        - contains
    query-rules-v2-RuleCreatedDatetime:
      type: string
      description: Creation time in YYYY-MM-DD HH-MM-SS format
    query-rules-v2-RuleUpdateDatetime:
      type: string
      description: Last update time in YYYY-MM-DD HH-MM-SS format
    query-rules-v2-RuleTimezoneSchema:
      type: string
      description: Timezone in `UTC[+/-]X` format, for example `UTC+4`, `UTC+0`, `UTC-3`
    query-rules-v2-RuleActiveToDatetime:
      type: string
      description: Time when the rule becomes inactive, in YYYY-MM-DD HH-MM-SS format
    query-rules-v2-RuleActiveFromDatetime:
      type: string
      description: Time when the rules becomes active, in YYYY-MM-DD HH-MM-SS format
    query-rules-v2-RuleState:
      type: string
      description: State of the rule
      enum:
        - draft
        - active
        - paused
        - finished
    query-rules-v2-RuleAuthor:
      description: The user who created the rule
      type: integer
    query-rules-v2-RuleName:
      type: string
      description: Name of the rule
    query-rules-v2-RuleId:
      type: integer
      description: ID of the rule
    synonyms-crud-Error:
      type: object
      properties:
        timestamp:
          type: string
          format: date-time
          description: Time when the error occurred
        status:
          type: integer
          description: Status code
        error:
          type: string
          description: Summary of the error
        message:
          type: string
          description: Description of the problem
        path:
          type: string
          description: URL of the requested resource
      required:
        - timestamp
        - status
        - message
    synonyms-crud-PaginatedSynonyms:
      type: object
      properties:
        data:
          type: array
          description: A list of synonyms
          items:
            $ref: "#/components/schemas/synonyms-crud-SingleSynonym"
        meta:
          $ref: "#/components/schemas/synonyms-crud-PaginationMeta"
    synonyms-crud-PaginationMeta:
      type: object
      description: 'Optional pagination metadata (sent if `"includeMeta": true`)'
      properties:
        totalPages:
          type: number
          description: The total number of pages
        totalCount:
          type: number
          description: The total number of campaigns
        page:
          type: number
          description: The current page
        limit:
          type: number
          description: The maximal number of items on a page
        sortedBy:
          type: string
          description: The column (attribute) that the campaigns were sorted by
        ordering:
          type: string
          description: Sorting order
        code:
          type: number
          description: HTTP response code
        link:
          type: array
          description: Links to neighboring pages, first page, and last page in pagination
          items:
            type: object
            properties:
              url:
                description: Page URL
                type: string
              rel:
                type: string
                description: Position of the linked page
                enum:
                  - first
                  - next
                  - prev
                  - last
    synonyms-crud-SingleSynonym:
      type: object
      description: Details of a single synonym
      properties:
        id:
          $ref: "#/components/schemas/synonyms-crud-SynonymId"
        type:
          $ref: "#/components/schemas/synonyms-crud-Type"
        word:
          $ref: "#/components/schemas/synonyms-crud-Word"
        synonyms:
          $ref: "#/components/schemas/synonyms-crud-Synonyms"
        createdAt:
          type: string
          description: Creation timestamp
        updatedAt:
          type: string
          description: Last update timestamp
        confidence:
          $ref: "#/components/schemas/synonyms-crud-Confidence"
        reason:
          $ref: "#/components/schemas/synonyms-crud-Reason"
        source:
          $ref: "#/components/schemas/synonyms-crud-SynonymSource"
        state:
          $ref: "#/components/schemas/synonyms-crud-SynonymState"
    synonyms-crud-SynonymState:
      type: string
      description: Current state of the synonym
      enum:
        - New
        - Accepted
        - Pending
        - Rejected
      default: Accepted
    synonyms-crud-SynonymSource:
      type: string
      description: Origin of the synonym
      enum:
        - User
        - Agent
        - Import
      default: User
    synonyms-crud-Reason:
      type: string
      nullable: true
      maxLength: 1024
      description: Reason or explanation for the synonym suggestion
    synonyms-crud-Confidence:
      type: number
      format: float
      minimum: 0
      maximum: 1
      nullable: true
      description: Confidence score of the synonym (0.0 to 1.0)
    synonyms-crud-Synonyms:
      type: array
      description: A list of synonyms
      items:
        type: string
    synonyms-crud-Word:
      type: string
      description: "The phrase that the synonym relates to. If `type: synonyms`, do not send this value."
    synonyms-crud-Type:
      type: string
      description: |
        Type of the synonym.

          - `oneway`: when the word is searched, the results show the results as if the synonyms were searched. Searching for the synonyms does NOT return results for the word or the other synonyms.
          - `synonyms`: the `word` column is empty, all phrases in `synonym` return results for every other phrase in the list.
      enum:
        - oneway
        - synonyms
      default: oneway
    synonyms-crud-SynonymId:
      type: integer
      description: Identifier of the synonym
    synonyms-crud-BatchResponse:
      type: object
      properties:
        attemptedInserts:
          type: integer
          description: The number of attempted insertions
        actualInserts:
          type: integer
          description: The number of successful insertions
        errors:
          type: array
          description: A list of errors
          items:
            type: string
  parameters:
    ai-stats-searchGroupBy:
      name: groupBy
      in: query
      required: false
      description: Attribute for which retrieved stats will be grouped.
      schema:
        type: string
        enum:
          - date
    ai-stats-searchType:
      name: searchType
      in: query
      required: false
      description: Search type for which stats will be retrieved.
      schema:
        type: string
        default: all
        enum:
          - fullTextSearch
          - autocomplete
          - listing
          - visual
          - all
    ai-stats-query:
      name: query
      in: query
      required: false
      description: Query for which stats will be returned. If not provided, the results are returned for the most popular queries.
      schema:
        type: string
    ai-stats-dateTo:
      name: dateTo
      in: query
      required: false
      description: |
        Lower bound of the interval for which the statistics will be retrieved.
        If not specified, the interval is last 7 days.
      schema:
        type: string
        format: date
    ai-stats-dateFrom:
      name: dateFrom
      in: query
      required: false
      description: |
        Upper bound of the interval for which the statistics will be retrieved.  
        Must be provided with `to`, otherwise the filter is treated as unspecified.  
        If not specified, the interval is last 7 days.
      schema:
        type: string
        format: date
    ai-stats-indexId:
      name: indexId
      in: path
      required: true
      description: ID of the index for which the stats are requested
      schema:
        type: string
        example: 4add1a1fa877c1651906bb22c9dfd37a1618852272
    ai-stats-searchOrdering:
      name: ordering
      in: query
      required: false
      description: Sort order direction.
      schema:
        type: string
        default: desc
        enum:
          - asc
          - desc
    ai-stats-searchSortBy:
      name: SortBy
      in: query
      required: false
      description: Field by which results should be sorted.
      schema:
        type: string
        default: count
        enum:
          - count
          - clicks
          - conversions
          - clickThroughRate
          - revenue
          - conversionRate
    ai-stats-withFilters:
      name: withFilters
      in: query
      required: false
      description: Switch to display search statistics with enabled filters or without filters.
      schema:
        type: string
        enum:
          - true
          - false
    ai-stats-queryFilter:
      name: queryFilter
      in: query
      required: false
      description: Queries for which stats will be retrieved.
      schema:
        type: string
        default: queries
        enum:
          - queries
          - queriesWithNoResults
          - queriesWithUsedSuggestions
    ai-stats-filterName:
      name: filterName
      in: query
      required: false
      description: Name of the filterable attribute. If present top values of this filter are returned.
      schema:
        type: string
        example: brand
    ai-stats-indexIdArray:
      name: indexId
      in: query
      required: true
      description: List of indices ids for which the stats are requested.
      schema:
        type: array
        items:
          type: string
    items-search-params:
      name: params
      in: query
      required: false
      description: |
        List of extra params that will be added to the `item.search` event. They must be in the `name:value` format. The total size must not exceed 500 bytes when written as a JSON object.
      example:
        - source:mobile
      schema:
        type: array
        items:
          type: string
    items-search-excludeQueryRules:
      name: excludeQueryRules
      in: query
      required: false
      description: |
        List of query rules that will not be applied.
      example:
        - 2
        - 5
      schema:
        type: array
        items:
          type: integer
    items-search-ignoreQueryRules:
      name: ignoreQueryRules
      in: query
      required: false
      description: |
        If set to `true`, query rules are not applied.
      schema:
        type: boolean
        default: false
    items-search-paginationIncludeMeta:
      name: includeMeta
      in: query
      required: false
      description: |
        
        When `true`, pagination metadata is included in the response body.

        When `false`, the data is included in the response headers:

        - Link: links to neighbors, first, and last pages in pagination.

        - X-Pagination-Total-Count: total number of items on all pages

        - X-Pagination-Total-Pages: total number of pages

        - X-Pagination-Page: current page

        - X-Pagination-Limit: maximum number of items on a page

        - X-Pagination-Sorted-By: parameter that the items were sorted by

        - X-Pagination-Ordering: sorting direction
      schema:
        type: boolean
        default: false
    items-search-paginationOrdering:
      name: ordering
      in: query
      required: false
      description: Sorting order
      schema:
        type: string
        default: asc
        enum:
          - desc
          - asc
    items-search-paginationSortBy:
      name: sortBy
      in: query
      required: false
      description: |
        <span style='color:red'><strong>IMPORTANT:</strong></span> Sorting disables boosting, elastic filters, and promoting search results.

        Name of the attribute by which the data will be sorted.      
      schema:
        type: string
    items-search-paginationLimit:
      name: limit
      in: query
      description: The number of items to return per page
      required: false
      schema:
        type: integer
        format: int32
        example: 10
        default: 20
        minimum: 0
        maximum: 500
    items-search-paginationPage:
      name: page
      in: query
      description: Page number to return for pagination. The first page has the index `1`.
      required: false
      schema:
        type: integer
        format: int32
        example: 4
        default: 1
    items-search-facetsOrderBy:
      name: facetsOrderBy
      in: query
      required: false
      description: |
        Controls the ordering of facets in the response.  
        When `facets=auto`, the default ordering is by coverage (most relevant facets first).  
        When facets are specified explicitly, the default ordering is by name.  
        When two facets have equal coverage, ties are resolved by name.
      schema:
        type: string
        enum:
          - coverage
          - name
    items-search-includeFacets:
      name: includeFacets
      in: query
      required: false
      description: |
        Determines which groups of facets will be returned: both filtered and unfiltered; just filtered; just unfiltered; or no group at at all.

        To determine which attributes should be returned as facets in each group, use the `facets` parameter.
      schema:
        type: string
        default: filtered
        enum:
          - all
          - filtered
          - unfiltered
          - none
    items-search-context:
      name: context
      in: query
      required: false
      description: List of context strings for a search query
      example:
        - mobile
        - listing
      schema:
        type: array
        items:
          type: string
    items-search-displayAttributes:
      name: displayAttributes
      in: query
      required: false
      description: List of ad hoc attributes that will be returned for each found item
      example:
        - title
        - price
      schema:
        type: array
        items:
          type: string
    items-search-caseSensitiveFacetValues:
      name: caseSensitiveFacetValues
      in: query
      required: false
      description: |
        Specifies whether facets aggregation should be case sensitive.
      schema:
        type: boolean
        default: false
    items-search-maxValuesPerFacet:
      name: maxValuesPerFacet
      in: query
      required: false
      description: |
        Determines how many values will be retrieved per facet.
      schema:
        type: integer
        default: 50
        minimum: 1
        maximum: 1000
    items-search-facetsSize:
      name: facetsSize
      in: query
      required: false
      description: |
        Determines how many items will be used for facets aggregation.
      schema:
        type: integer
        default: 2000
        minimum: 1
        maximum: 10000
    items-search-facets:
      name: facets
      in: query
      required: false
      description: |
        A list of attributes for which facets will be returned. A single `*` value matches all facetable attributes.
        A single `auto` value enables automatic facet selection based on the result set — the system picks the most relevant facets using the index's `dynamicFacets` configuration.

        To determine which groups of facets should be returned, use the `includeFacets` parameter.
      schema:
        type: array
        items:
          type: string
    items-search-filters:
      name: filters
      in: query
      required: false
      description: IQL query string. For details, see the [Help Center](https://help.synerise.com/developers/iql/).
      schema:
        type: string
    items-search-filterAnchor:
      name: filterAnchor
      in: query
      required: false
      description: |
        Anchor (`{width},{height}`) by which the visual results data will be filtered.
        `{width},{height}` correspond to normalized image coordinates, i.e. they are in range [0,1].
        Anchor (0,0) corresponds to the top-left pixel of an image.
      schema:
        type: string
        example: 0.2,0.8
    items-search-filterAroundRadius:
      name: filterAroundRadius
      in: query
      required: false
      description: Radius in meters to be used when filtering using geo-location. Can only be used when filtering by a single geo-point.
      schema:
        type: integer
        format: int32
        example: 5000
        default: 1000
    items-search-filterGeoPoints:
      name: filterGeoPoints
      in: query
      required: false
      description: |
        The definition of a geographical area to filter by.

        Given one geo-point, the results will be limited to a radius around a point. To override the default radius (1000 meters), provide the `filterAroundRadius` parameter.
        **Example input:** `["34.052235,-118.243685"]`

        Given two geo-points, the results will be limited to a rectangular area.
        **Example input:** `["50,-100", "25,150"]`

        Given three or more geo-points, the results will be limited to a polygonal area.
        **Example input:** `["50,0", "40,20", "-20,10"]`
      schema:
        type: array
        example:
          - 34.052235,-118.243685
          - 15.0,65.0
        items:
          type: string
    items-search-sortByGeoPoint:
      name: sortByGeoPoint
      in: query
      required: false
      description: |
        <span style='color:red'><strong>IMPORTANT:</strong></span> Sorting disables boosting, elastic filters, and promoting search results.

        Geo-point (`{latitude},{longitude}`) for data sorting. Results are sorted by distance from this point. `ordering: asc` means "closest first".'
      schema:
        type: string
        example: 34.052235,-118.243685
    items-search-sortByMetric:
      name: sortByMetric
      in: query
      required: false
      description: |
        <span style='color:red'><strong>IMPORTANT:</strong></span> Sorting disables boosting, elastic filters, and promoting search results.

        Name of the metric by which the data will be sorted.
      schema:
        type: string
        enum:
          - TransactionsPopularity
          - PageVisitsPopularity
    items-search-searchId:
      name: searchId
      in: query
      required: false
      deprecated: true
      description: |
        **DEPRECATED - use correlationId instead**

        Search ID for pagination. If a search with the ID was performed recently (last 10 minutes), the cached results will be used.

        Do not send this if sortBy/filters/sorting order, etc. have changed - the cached results may have different order or may match different filters.
      schema:
        type: string
    items-search-correlationId:
      name: correlationId
      in: query
      required: false
      description: |
        Correlation ID for pagination. If a search with the ID was performed recently (last 10 minutes), the cached results will be used.

        Do not send this if sortBy/filters/sorting order, etc. have changed - the cached results may have different order or may match different filters.
      schema:
        type: string
    items-search-personalize:
      name: personalize
      in: query
      required: false
      description: |
        If set to `false`, the search result is not personalized.
      schema:
        type: boolean
        default: true
    items-search-clientUUID:
      name: clientUUID
      in: query
      required: false
      description: UUID of the profile for which the search is performed
      schema:
        type: string
    items-search-inPathIndexId:
      name: indexId
      in: path
      required: true
      description: ID of the index to be used in the search operation
      schema:
        type: string
    items-search-imageUrl:
      name: url
      in: query
      required: true
      description: URL of the image to be used in the visual search
      schema:
        type: string
    items-search-crossWorkspaceModeEnabled:
      name: crossWorkspaceModeEnabled
      in: query
      required: false
      description: |
        If set, overrides the cross-workspace mode from the index configuration. When `true`, cross-workspace personalization is enabled. When `false`, it is disabled.
      schema:
        type: boolean
    items-search-disableDynamicReranker:
      name: disableDynamicReranker
      in: query
      required: false
      description: |
        If set to `true`, dynamic reranker is not applied.
      schema:
        type: boolean
        default: false
    items-search-disableQueryClassification:
      name: disableQueryClassification
      in: query
      required: false
      description: |
        If set to `true`, query classification is not applied.
      schema:
        type: boolean
        default: false
    items-search-distinctFilter:
      name: distinctFilter
      in: query
      required: false
      schema:
        type: string
        example: '{"attribute": "color", "maxNumItems": 3}'
      description: |
        DistinctFilter JSON as an URL-encoded string
    items-search-searchQuery:
      name: query
      in: query
      required: true
      description: Query text to use in the search
      schema:
        type: string
    items-search-filterableAttributes:
      name: attribute
      in: query
      description: List of attributes for which values will be fetched
      required: true
      explode: true
      schema:
        type: array
        items:
          type: string
    items-search-itemId:
      name: itemId
      in: query
      required: true
      description: Item ID
      schema:
        type: string
    items-search-config-inQueryType:
      in: query
      name: type
      required: false
      description: Requested type of the rule.
      schema:
        type: string
        enum:
          - Keyword
          - Hybrid
          - Semantic
    items-search-config-inQueryDirectoryId:
      in: query
      name: directoryId
      required: false
      description: Requested directoryId of the rule.
      schema:
        type: string
        format: uuid
    items-search-config-excludeAbTests:
      name: excludeAbTests
      in: query
      required: false
      description: Only indices not involved in currently running AB tests will be retrieved.
      schema:
        type: boolean
    items-search-config-queryFilter:
      name: query
      in: query
      required: false
      description: If an index has an `id` equal to the value of this parameter, only that index will be retrieved. Otherwise, all indices containing this value in their `name` will be retrieved. This parameter replaces the deprecated `name` parameter.
      schema:
        type: string
    items-search-config-nameFilter:
      name: name
      in: query
      required: false
      deprecated: true
      description: |
        Deprecated parameter. If `query` is provided, this parameter is ignored.
        If an index has an `id` equal to the value of this parameter, only that index will be retrieved. Otherwise, all indices containing this value in their `name` will be retrieved.
      schema:
        type: string
    items-search-config-paginationIncludeMeta:
      name: includeMeta
      in: query
      required: false
      description: |
        
        When `true`, pagination metadata is included in the response body.

        When `false`, the data is included in the response headers:

        - Link: links to neighbors, first, and last pages in pagination.

        - X-Pagination-Total-Count: total number of items on all pages

        - X-Pagination-Total-Pages: total number of pages

        - X-Pagination-Page: current page

        - X-Pagination-Limit: maximum number of items on a page

        - X-Pagination-Sorted-By: parameter that the items were sorted by

        - X-Pagination-Ordering: sorting direction
      schema:
        type: boolean
        default: false
    items-search-config-paginationOrdering:
      name: ordering
      in: query
      required: false
      description: Sorting order
      schema:
        type: string
        default: desc
        enum:
          - desc
          - asc
    items-search-config-paginationSortBy:
      name: sortBy
      in: query
      required: false
      description: Name of the attribute by which the data will be sorted
      schema:
        type: string
    items-search-config-paginationLimit:
      name: limit
      in: query
      description: The number of items to return per page
      required: false
      schema:
        type: integer
        format: int32
        example: 100
        default: 1000
        maximum: 1000
    items-search-config-paginationPage:
      name: page
      in: query
      description: Page number to return for pagination. The first page has the index `1`.
      required: false
      schema:
        type: integer
        format: int32
        example: 4
        default: 1
    items-search-config-InPathIndexId:
      in: path
      name: indexId
      required: true
      description: ID of the index
      schema:
        type: string
    items-search-recent-clientUUID:
      name: clientUUID
      in: query
      required: true
      description: UUID of the profile for which the query is performed
      schema:
        type: string
        example: e0097757-d1e2-44ac-ba3c-d97979a354c1
    items-search-recent-indexId:
      name: indexId
      in: path
      required: true
      description: ID of the index that the query relates to
      schema:
        type: string
        example: 4add1a1fa877c1651906bb22c9dfd37a1618852272
    items-search-recent-timeValue:
      name: timeValue
      in: query
      required: false
      description: The amount of time units. Used in conjunction with `timeUnit`.<br><strong>NOTE:</strong><br> The provided query parameter has priority over the configuration provided in [this endpoint](#operation/postIndexConfigV2). If the parameter is not provided, the default value does **not** override the configuration.
      schema:
        type: integer
        minimum: 1
        default: 30
    items-search-recent-timeUnit:
      name: timeUnit
      in: query
      required: false
      description: The time unit. Used in conjunction with `timeValue`.<br><strong>NOTE:</strong><br> The provided query parameter has priority over the configuration provided in [this endpoint](#operation/postIndexConfigV2). If the parameter is not provided, the default value does **not** override the configuration.
      schema:
        type: string
        default: DAYS
        enum:
          - YEARS
          - MONTHS
          - WEEKS
          - DAYS
          - HOURS
          - MINUTES
          - SECONDS
    items-search-recent-windowSize:
      name: windowSize
      in: query
      required: false
      description: Maximum number of recent searches to be returned. <br><strong>NOTE:</strong><br> The provided query parameter has priority over the configuration provided in [this endpoint](#operation/postIndexConfigV2). If the parameter is not provided, the default value does **not** override the configuration.
      schema:
        type: integer
        minimum: 1
        default: 15
    query-rules-v2-consequenceTypeFilter:
      name: consequenceType
      in: query
      required: false
      description: Only rules producing at least one of the given consequence types will be retrieved. May be repeated.
      style: form
      explode: true
      schema:
        type: array
        items:
          type: string
          enum:
            - hide
            - promote
            - standardFilter
            - elasticFilter
            - boost
            - topHits
            - sortBy
            - customData
            - returnNoData
            - distinctFilter
            - pinFacet
            - hideFacet
            - replaceWord
            - removeWord
            - replaceQuery
    query-rules-v2-InQuerySearch:
      in: query
      name: search
      required: false
      description: Requested part of the name or the id of the rule.
      schema:
        type: string
    query-rules-v2-inQueryDirectoryId:
      in: query
      name: directoryId
      required: false
      description: Requested directoryId of the rule.
      schema:
        type: string
        format: uuid
    query-rules-v2-paginationIncludeMeta:
      name: includeMeta
      in: query
      required: false
      description: |
        
        When `true`, pagination metadata is included in the response body.

        When `false`, the data is included in the response headers:

        - Link: links to neighbors, first, and last pages in pagination.

        - X-Pagination-Total-Count: total number of items on all pages

        - X-Pagination-Total-Pages: total number of pages

        - X-Pagination-Page: current page

        - X-Pagination-Limit: maximum number of items on a page

        - X-Pagination-Sorted-By: parameter that the items were sorted by

        - X-Pagination-Ordering: sorting direction
      schema:
        type: boolean
        default: false
    query-rules-v2-paginationOrdering:
      name: ordering
      in: query
      required: false
      description: Sorting order
      schema:
        type: string
        default: desc
        enum:
          - desc
          - asc
    query-rules-v2-paginationSortBy:
      name: sortBy
      in: query
      required: false
      description: Name of the attribute by which the data will be sorted
      schema:
        type: string
    query-rules-v2-paginationLimit:
      name: limit
      in: query
      description: The number of items to return per page
      required: false
      schema:
        type: integer
        format: int32
        example: 100
        default: 1000
        maximum: 1000
    query-rules-v2-paginationPage:
      name: page
      in: query
      description: Page number to return for pagination. The first page has the index `1`.
      required: false
      schema:
        type: integer
        format: int32
        example: 4
        default: 1
    query-rules-v2-nameFilter:
      name: name
      in: query
      required: false
      description: Only rules containing this name will be retrieved.
      schema:
        type: string
    query-rules-v2-statusFilter:
      name: status
      in: query
      required: false
      description: Only rules with this status will be retrieved.
      schema:
        type: string
        enum:
          - finished
          - draft
          - paused
          - scheduled
          - active
    query-rules-v2-inPathIndexId:
      in: path
      name: indexId
      required: true
      description: ID of the index
      schema:
        type: string
    query-rules-v2-inPathRuleId:
      in: path
      name: ruleId
      required: true
      description: Rule identifier
      schema:
        type: integer
    synonyms-crud-confidence:
      name: confidence
      in: query
      required: false
      description: Filter synonyms with confidence greater than or equal to this value
      schema:
        type: number
        format: float
        minimum: 0
        maximum: 1
    synonyms-crud-search:
      name: search
      in: query
      required: false
      description: Search synonyms by word or synonym phrase (case-insensitive partial match)
      schema:
        type: string
    synonyms-crud-synonymType:
      name: type
      in: query
      required: false
      description: Filter synonyms by type
      schema:
        type: string
        description: |
          Type of the synonym.

            - `oneway`: when the word is searched, the results show the results as if the synonyms were searched. Searching for the synonyms does NOT return results for the word or the other synonyms.
            - `synonyms`: the `word` column is empty, all phrases in `synonym` return results for every other phrase in the list.
        enum:
          - oneway
          - synonyms
        default: oneway
    synonyms-crud-state:
      name: state
      in: query
      required: false
      description: Filter synonyms by state
      schema:
        type: string
        description: Current state of the synonym
        enum:
          - New
          - Accepted
          - Pending
          - Rejected
        default: Accepted
    synonyms-crud-source:
      name: source
      in: query
      required: false
      description: Filter synonyms by source
      schema:
        type: string
        description: Origin of the synonym
        enum:
          - User
          - Agent
          - Import
        default: User
    synonyms-crud-paginationIncludeMeta:
      name: includeMeta
      in: query
      required: false
      description: |
        
        When `true`, pagination metadata is included in the response body.

        When `false`, the data is included in the response headers:

        - Link: links to neighbors, first, and last pages in pagination.

        - X-Pagination-Total-Count: total number of items on all pages

        - X-Pagination-Total-Pages: total number of pages

        - X-Pagination-Page: current page

        - X-Pagination-Limit: maximum number of items on a page

        - X-Pagination-Sorted-By: parameter that the items were sorted by

        - X-Pagination-Ordering: sorting direction
      schema:
        type: boolean
        default: false
    synonyms-crud-paginationOrdering:
      name: ordering
      in: query
      required: false
      description: Sorting order
      schema:
        type: string
        default: desc
        enum:
          - desc
          - asc
    synonyms-crud-paginationSortBy:
      name: sortBy
      in: query
      required: false
      description: "Name of the attribute by which the data will be sorted and ordered by. Supported values: `indexId`, `updatedAt`, `createdAt`, `confidence`. Defaults to `updatedAt`."
      schema:
        type: string
        example:
          - confidence:asc
    synonyms-crud-paginationLimit:
      name: limit
      in: query
      description: The number of items to return per page
      required: false
      schema:
        type: integer
        format: int32
        example: 100
        default: 1000
        maximum: 1000
    synonyms-crud-paginationPage:
      name: page
      in: query
      description: Page number to return for pagination. The first page has the index `1`.
      required: false
      schema:
        type: integer
        format: int32
        example: 4
        default: 1
    synonyms-crud-inPathIndexId:
      in: path
      name: indexId
      required: true
      description: Index identifier
      schema:
        type: string
        format: uuid
    synonyms-crud-sourceForImport:
      name: source
      in: query
      required: false
      description: Source to assign to imported synonyms
      schema:
        allOf:
          - $ref: "#/components/schemas/synonyms-crud-SynonymSource"
          - default: Import
    synonyms-crud-inPathSynonymId:
      in: path
      name: synonymId
      required: true
      description: Synonym identifier
      schema:
        type: integer
  responses:
    items-search-FullTextSearchResponse200:
      description: Search result
      content:
        application/json:
          schema:
            oneOf:
              - $ref: "#/components/schemas/items-search-FullTextSearchResponse"
              - $ref: "#/components/schemas/items-search-SuggestionResponse"
    items-search-FullTextSearchResponse200WithExplanation:
      description: Search result
      content:
        application/json:
          schema:
            oneOf:
              - $ref: "#/components/schemas/items-search-FullTextSearchResponseWithExplanation"
              - $ref: "#/components/schemas/items-search-SuggestionResponseWithExplanation"
    items-search-AutocompleteSearchResponse200:
      description: Search result
      content:
        application/json:
          schema:
            oneOf:
              - $ref: "#/components/schemas/items-search-AutocompleteResponse"
              - $ref: "#/components/schemas/items-search-SuggestionResponse"
    items-search-AutocompleteSearchResponse200WithExplanation:
      description: Search result
      content:
        application/json:
          schema:
            oneOf:
              - $ref: "#/components/schemas/items-search-AutocompleteResponseWithExplanation"
              - $ref: "#/components/schemas/items-search-SuggestionResponseWithExplanation"
    items-search-ListingResponse200:
      description: Listing result
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/items-search-ListingResponse"
    items-search-ListingResponse200WithExplanation:
      description: Listing result
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/items-search-ListingResponseWithExplanation"
    items-search-SearchableAttributesMatchResponse200:
      description: Searchable attributes match result
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/items-search-SearchableAttributesMatchResponse"
  requestBodies:
    synonyms-crud-CsvBody:
      description: |
        
        The CSV has three columns: 
        - `word`: the phrase to replace with a synonym
        - `synonyms`: the synonyms of the word (if more than one, the list is comma-separated and enclosed with `""`)
        - `type`: the relation type:
          - `oneway`: when the word is searched, the results show the results as if the synonyms were searched. Searching for the synonyms does NOT return results for the word or the other synonyms.
          - `synonyms`: the `word` column is empty, all phrases in `synonym` return results for every other phrase in the list.
      required: true
      content:
        text/csv:
          schema:
            type: object
            properties:
              word:
                $ref: "#/components/schemas/synonyms-crud-Word"
              synonyms:
                $ref: "#/components/schemas/synonyms-crud-Synonyms"
              type:
                $ref: "#/components/schemas/synonyms-crud-Type"
          example: |
            word,synonyms,type
            dog,"doggy,puppy",oneway
            small horse,pony,oneway
            ,"cat,kitten,kitty,tabby cat",synonyms
        multipart/form-data:
          schema:
            type: object
            properties:
              synonyms:
                type: string
                format: binary
                description: Uploaded CSV file to be used in synonyms update
