openapi: 3.0.0
info:
  title: Campaigns - 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: Recommendation campaigns
  - name: Recommendation statistics
  - name: Recommendations
  - name: Screen views
  - name: Screen views (legacy)
  - name: Templates
  - name: Template directories
x-tagGroups:
  - name: Campaigns
    tags:
      - Recommendation campaigns
      - Recommendation statistics
      - Recommendations
      - Screen views
      - Screen views (legacy)
      - Templates
      - Template directories
paths:
  /recommendations/v2/campaigns/stats:
    post:
      summary: Get recommendation campaign statistics
      description: |
        Retrieves the statistics of campaigns 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:** `campaigns_recommendations: read`
      operationId: PostCampaignsStats
      tags:
        - Recommendation statistics
      security:
        - JWT: []
        - TrackerKey: []
      requestBody:
        description: Request for recommendation campaigns stats.
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                campaignIds:
                  type: array
                  minItems: 1
                  items:
                    type: string
                  description: List of campaign IDs for which the statistics are requested. Must not be empty.
                from:
                  type: string
                  format: date
                  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.
                to:
                  type: string
                  format: date
                  description: |
                    Lower bound of the interval for which the statistics will be retrieved.  
                    Must be provided with `from`, otherwise the filter is treated as unspecified.  
                    If not specified, the interval is last 7 days.
                timeZone:
                  type: string
                  description: Time zone identifier.
                  default: UTC
                  example: Europe/Warsaw
              required:
                - campaignIds
      responses:
        "200":
          description: Statistics returned
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ai-stats-RecoStatsByCampaignSchema"
        "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-recommendations#tag/Recommendation-statistics/operation/PostCampaignsStats
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/recommendations/v2/campaigns/stats \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"campaignIds":["string"],"from":"2019-08-24","to":"2019-08-24","timeZone":"Europe/Warsaw"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"campaignIds\":[\"string\"],\"from\":\"2019-08-24\",\"to\":\"2019-08-24\",\"timeZone\":\"Europe/Warsaw\"}"

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

            conn.request("POST", "/recommendations/v2/campaigns/stats", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "campaignIds": [
                "string"
              ],
              "from": "2019-08-24",
              "to": "2019-08-24",
              "timeZone": "Europe/Warsaw"
            });

            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/recommendations/v2/campaigns/stats");
            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": "/recommendations/v2/campaigns/stats",
              "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({
              campaignIds: ['string'],
              from: '2019-08-24',
              to: '2019-08-24',
              timeZone: 'Europe/Warsaw'
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

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

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

            $request->setBody('{"campaignIds":["string"],"from":"2019-08-24","to":"2019-08-24","timeZone":"Europe/Warsaw"}');

            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/recommendations/v2/campaigns/stats")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"campaignIds\":[\"string\"],\"from\":\"2019-08-24\",\"to\":\"2019-08-24\",\"timeZone\":\"Europe/Warsaw\"}")
              .asString();
  /recommendations/v2/campaigns/stats/global:
    get:
      summary: Get global recommendation campaign statistics
      description: |
        Retrieves the statistics of all recommendation campaigns.

        ---

        **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:** `campaigns_recommendations: read`
      operationId: GetCampaignsGlobalStats
      tags:
        - Recommendation statistics
      security:
        - JWT: []
        - TrackerKey: []
      parameters:
        - $ref: "#/components/parameters/ai-stats-from"
        - $ref: "#/components/parameters/ai-stats-to"
        - $ref: "#/components/parameters/ai-stats-timeZone"
      responses:
        "200":
          description: Statistics returned
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ai-stats-RecoStatsByDateSchema"
        "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-recommendations#tag/Recommendation-statistics/operation/GetCampaignsGlobalStats
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/recommendations/v2/campaigns/stats/global?from=SOME_STRING_VALUE&to=SOME_STRING_VALUE&timeZone=Europe%2FWarsaw' \
              --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", "/recommendations/v2/campaigns/stats/global?from=SOME_STRING_VALUE&to=SOME_STRING_VALUE&timeZone=Europe%2FWarsaw", 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/recommendations/v2/campaigns/stats/global?from=SOME_STRING_VALUE&to=SOME_STRING_VALUE&timeZone=Europe%2FWarsaw");
            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": "/recommendations/v2/campaigns/stats/global?from=SOME_STRING_VALUE&to=SOME_STRING_VALUE&timeZone=Europe%2FWarsaw",
              "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/recommendations/v2/campaigns/stats/global');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'from' => 'SOME_STRING_VALUE',
              'to' => 'SOME_STRING_VALUE',
              'timeZone' => 'Europe/Warsaw'
            ]);

            $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/recommendations/v2/campaigns/stats/global?from=SOME_STRING_VALUE&to=SOME_STRING_VALUE&timeZone=Europe%2FWarsaw")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /recommendations/v2/campaigns/{campaignId}/stats:
    get:
      summary: Get recommendation campaign statistics
      description: |
        Retrieves the statistics of a single recommendation campaign.

        ---

        **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:** `campaigns_recommendations: read`
      operationId: GetCampaignStats
      tags:
        - Recommendation statistics
      security:
        - JWT: []
        - TrackerKey: []
      parameters:
        - $ref: "#/components/parameters/ai-stats-campaignIdPath"
        - $ref: "#/components/parameters/ai-stats-from"
        - $ref: "#/components/parameters/ai-stats-to"
        - $ref: "#/components/parameters/ai-stats-timeZone"
      responses:
        "200":
          description: Statistics returned
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ai-stats-RecoStatsByDateSchema"
        "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-recommendations#tag/Recommendation-statistics/operation/GetCampaignStats
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/recommendations/v2/campaigns/50NCGoRK0VRb/stats?from=SOME_STRING_VALUE&to=SOME_STRING_VALUE&timeZone=Europe%2FWarsaw' \
              --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", "/recommendations/v2/campaigns/50NCGoRK0VRb/stats?from=SOME_STRING_VALUE&to=SOME_STRING_VALUE&timeZone=Europe%2FWarsaw", 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/recommendations/v2/campaigns/50NCGoRK0VRb/stats?from=SOME_STRING_VALUE&to=SOME_STRING_VALUE&timeZone=Europe%2FWarsaw");
            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": "/recommendations/v2/campaigns/50NCGoRK0VRb/stats?from=SOME_STRING_VALUE&to=SOME_STRING_VALUE&timeZone=Europe%2FWarsaw",
              "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/recommendations/v2/campaigns/50NCGoRK0VRb/stats');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'from' => 'SOME_STRING_VALUE',
              'to' => 'SOME_STRING_VALUE',
              'timeZone' => 'Europe/Warsaw'
            ]);

            $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/recommendations/v2/campaigns/50NCGoRK0VRb/stats?from=SOME_STRING_VALUE&to=SOME_STRING_VALUE&timeZone=Europe%2FWarsaw")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /recommendations/v2/campaigns/{campaignId}/products/stats:
    get:
      summary: Get statistics for top items in a campaign
      description: |
        Retrieves the statistics of top products for a single recommendation campaign.

        ---

        **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:** `campaigns_recommendations: read`
      operationId: GetRecoTopProductsStats
      tags:
        - Recommendation statistics
      security:
        - JWT: []
        - TrackerKey: []
      parameters:
        - $ref: "#/components/parameters/ai-stats-campaignIdPath"
        - $ref: "#/components/parameters/ai-stats-from"
        - $ref: "#/components/parameters/ai-stats-to"
        - $ref: "#/components/parameters/ai-stats-timeZone"
        - $ref: "#/components/parameters/ai-stats-productMetricName"
      responses:
        "200":
          description: Statistics returned
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ai-stats-RecoTopProductsStatsSchema"
        "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-recommendations#tag/Recommendation-statistics/operation/GetRecoTopProductsStats
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/recommendations/v2/campaigns/50NCGoRK0VRb/products/stats?from=SOME_STRING_VALUE&to=SOME_STRING_VALUE&timeZone=Europe%2FWarsaw&metric=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", "/recommendations/v2/campaigns/50NCGoRK0VRb/products/stats?from=SOME_STRING_VALUE&to=SOME_STRING_VALUE&timeZone=Europe%2FWarsaw&metric=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/recommendations/v2/campaigns/50NCGoRK0VRb/products/stats?from=SOME_STRING_VALUE&to=SOME_STRING_VALUE&timeZone=Europe%2FWarsaw&metric=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": "/recommendations/v2/campaigns/50NCGoRK0VRb/products/stats?from=SOME_STRING_VALUE&to=SOME_STRING_VALUE&timeZone=Europe%2FWarsaw&metric=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/recommendations/v2/campaigns/50NCGoRK0VRb/products/stats');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'from' => 'SOME_STRING_VALUE',
              'to' => 'SOME_STRING_VALUE',
              'timeZone' => 'Europe/Warsaw',
              'metric' => '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/recommendations/v2/campaigns/50NCGoRK0VRb/products/stats?from=SOME_STRING_VALUE&to=SOME_STRING_VALUE&timeZone=Europe%2FWarsaw&metric=SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /recommendations/v2/campaigns:
    get:
      summary: Get all recommendation campaigns
      description: |
        Fetch all recommendation campaigns.

        ---

        **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:** `RECOMMENDATIONS_V2_MANY_CAMPAIGN_READ`

        **User role permission required:** `campaigns_recommendations: read`
      operationId: GetRecommendationCampaignsV2
      tags:
        - Recommendation campaigns
      security:
        - JWT: []
      parameters:
        - name: page
          in: query
          required: false
          description: Page number
          schema:
            type: integer
            default: 0
        - name: limit
          in: query
          required: false
          description: Maximum number of campaigns on a page
          schema:
            type: integer
            default: 50
        - name: sortBy
          in: query
          required: false
          description: Name of the field by which data will be sorted
          schema:
            type: string
            default: createdAt
            enum:
              - createdAt
              - updatedAt
              - startDate
              - endDate
              - state
              - type
        - name: ordering
          in: query
          required: false
          description: Sorting order
          schema:
            type: string
            default: desc
            enum:
              - asc
              - desc
        - name: includeMeta
          in: query
          required: false
          description: |
            If true, a `meta` JSON block with pagination data is included in the response body.
            If false, the pagination data is included in the response headers.
          schema:
            type: boolean
            default: false
        - name: type
          in: query
          required: false
          description: Filters the results by campaign type.
          schema:
            type: string
        - name: state
          in: query
          required: false
          description: Shows only results with states matching this parameter. When this parameter is omitted, all campaigns are returned regardless of state.
          schema:
            type: array
            items:
              type: string
              enum:
                - draft
                - active
                - paused
        - name: search
          in: query
          required: false
          description: Searches campaigns by the specified phrase in their `id` and `title`.
          schema:
            type: string
      responses:
        "200":
          description: Returns paginated campaigns. If `showMeta` was set to `true`, the metadata is included in the JSON response. If it was set to `false`, the metadata is included in the headers.
          headers:
            Link:
              description: Links to neighboring pages, first page, and last page in pagination
              schema:
                type: string
            X-Pagination-Total-Count:
              description: Total number of campaigns
              schema:
                type: integer
            X-Pagination-Total-Pages:
              description: Total number of pages
              schema:
                type: integer
            X-Pagination-Page:
              description: The current page
              schema:
                type: integer
            X-Pagination-Limit:
              description: Maximal number of items on a page
              schema:
                type: integer
            X-Pagination-Sorted-By:
              description: The column (attribute) that the campaigns were sorted by
              schema:
                type: string
            X-Pagination-Ordering:
              description: Sorting order
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/recommendation-campaigns-RecommendationCampaignsResponseV2"
        "404":
          description: Could not find campaigns
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/recommendation-campaigns-Error"
        "500":
          description: An error occurred
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/recommendation-campaigns-Error"
      x-snr-doc-urls:
        - /api-reference/ai-recommendations#tag/Recommendation-campaigns/operation/GetRecommendationCampaignsV2
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/recommendations/v2/campaigns?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&type=SOME_STRING_VALUE&state=SOME_ARRAY_VALUE&search=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", "/recommendations/v2/campaigns?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&type=SOME_STRING_VALUE&state=SOME_ARRAY_VALUE&search=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/recommendations/v2/campaigns?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&type=SOME_STRING_VALUE&state=SOME_ARRAY_VALUE&search=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": "/recommendations/v2/campaigns?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&type=SOME_STRING_VALUE&state=SOME_ARRAY_VALUE&search=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/recommendations/v2/campaigns');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'page' => 'SOME_INTEGER_VALUE',
              'limit' => 'SOME_INTEGER_VALUE',
              'sortBy' => 'SOME_STRING_VALUE',
              'ordering' => 'SOME_STRING_VALUE',
              'includeMeta' => 'SOME_BOOLEAN_VALUE',
              'type' => 'SOME_STRING_VALUE',
              'state' => 'SOME_ARRAY_VALUE',
              'search' => '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/recommendations/v2/campaigns?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&type=SOME_STRING_VALUE&state=SOME_ARRAY_VALUE&search=SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    post:
      summary: Create a recommendation campaign
      description: |
        Create a new recommendation campaign.

        ---

        **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:** `RECOMMENDATIONS_V2_CAMPAIGN_CREATE`

        **User role permission required:** `campaigns_recommendations: create`
      operationId: CreateRecommendationCampaignV2
      tags:
        - Recommendation campaigns
      security:
        - JWT: []
      requestBody:
        content:
          application/json:
            schema:
              oneOf:
                - $ref: "#/components/schemas/recommendation-campaigns-SimilarRecommendationCampaignsCreateRequestV2"
                - $ref: "#/components/schemas/recommendation-campaigns-MetricsRecommendationCampaignsCreateRequestV2"
                - $ref: "#/components/schemas/recommendation-campaigns-CrossSellRecommendationCampaignsCreateRequestV2"
                - $ref: "#/components/schemas/recommendation-campaigns-SetComplementRecommendationCampaignsCreateRequestV2"
                - $ref: "#/components/schemas/recommendation-campaigns-LastViewedRecommendationCampaignsCreateRequestV2"
                - $ref: "#/components/schemas/recommendation-campaigns-PersonalizedRecommendationCampaignsCreateRequestV2"
                - $ref: "#/components/schemas/recommendation-campaigns-VisuallySimilarRecommendationCampaignsCreateRequestV2"
                - $ref: "#/components/schemas/recommendation-campaigns-ItemComparisonRecommendationCampaignsCreateRequestV2"
                - $ref: "#/components/schemas/recommendation-campaigns-RecentInteractionsRecommendationCampaignsCreateRequestV2"
                - $ref: "#/components/schemas/recommendation-campaigns-SectionRecommendationCampaignsCreateRequestV2"
                - $ref: "#/components/schemas/recommendation-campaigns-AttributeRecommendationCampaignsCreateRequestV2"
                - $ref: "#/components/schemas/recommendation-campaigns-ExternalItemsRecommendationCampaignCreateRequestV2"
                - $ref: "#/components/schemas/recommendation-campaigns-NextInteractionRecommendationCampaignsCreateRequestV2"
        description: All the details of a campaign
        required: true
      responses:
        "200":
          description: OK campaign has been returned
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/recommendation-campaigns-RecommendationCampaignDefinitionV2"
        "500":
          description: An error occurred
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/recommendation-campaigns-Error"
      x-snr-doc-urls:
        - /api-reference/ai-recommendations#tag/Recommendation-campaigns/operation/CreateRecommendationCampaignV2
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/recommendations/v2/campaigns \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"type":"similar","parameters":{"additionalResponseAttributes":["string"],"boostMetric":"string","sortMetric":"string","boostMetricStrength":-100,"shuffleNumItems":0,"personalizedBoostingStrength":0},"title":"string","slug":"string","description":"string","startDate":"string","endDate":"string","state":"draft","filterRules":{"excludePurchasedItems":true,"excludePurchasedItemsSinceDays":0,"elasticExcludePurchasedItems":true,"elasticExcludePurchasedItemsSinceDays":0},"itemsCatalogId":"string","slots":[{"name":"string","itemMin":0,"itemMax":0,"filterRules":{"filters":"string","elasticFilters":"string"},"distinctFilter":{"elastic":true,"filters":[{"field":"string","maxNumItems":0,"levelRangeModifier":0}]},"attribute":{"name":"string","levelRangeModifier":0},"numRows":0,"numItems":0,"useDefaultDistinctFilters":true,"useDefaultItemFilters":true}],"keepSlotsOrder":true,"personalizeSlotsOrder":false,"boostingStrategies":[{"name":"string","condition":"string","strength":1}],"itemsSource":{"type":"aggregate","id":"string"}}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"type\":\"similar\",\"parameters\":{\"additionalResponseAttributes\":[\"string\"],\"boostMetric\":\"string\",\"sortMetric\":\"string\",\"boostMetricStrength\":-100,\"shuffleNumItems\":0,\"personalizedBoostingStrength\":0},\"title\":\"string\",\"slug\":\"string\",\"description\":\"string\",\"startDate\":\"string\",\"endDate\":\"string\",\"state\":\"draft\",\"filterRules\":{\"excludePurchasedItems\":true,\"excludePurchasedItemsSinceDays\":0,\"elasticExcludePurchasedItems\":true,\"elasticExcludePurchasedItemsSinceDays\":0},\"itemsCatalogId\":\"string\",\"slots\":[{\"name\":\"string\",\"itemMin\":0,\"itemMax\":0,\"filterRules\":{\"filters\":\"string\",\"elasticFilters\":\"string\"},\"distinctFilter\":{\"elastic\":true,\"filters\":[{\"field\":\"string\",\"maxNumItems\":0,\"levelRangeModifier\":0}]},\"attribute\":{\"name\":\"string\",\"levelRangeModifier\":0},\"numRows\":0,\"numItems\":0,\"useDefaultDistinctFilters\":true,\"useDefaultItemFilters\":true}],\"keepSlotsOrder\":true,\"personalizeSlotsOrder\":false,\"boostingStrategies\":[{\"name\":\"string\",\"condition\":\"string\",\"strength\":1}],\"itemsSource\":{\"type\":\"aggregate\",\"id\":\"string\"}}"

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

            conn.request("POST", "/recommendations/v2/campaigns", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "type": "similar",
              "parameters": {
                "additionalResponseAttributes": [
                  "string"
                ],
                "boostMetric": "string",
                "sortMetric": "string",
                "boostMetricStrength": -100,
                "shuffleNumItems": 0,
                "personalizedBoostingStrength": 0
              },
              "title": "string",
              "slug": "string",
              "description": "string",
              "startDate": "string",
              "endDate": "string",
              "state": "draft",
              "filterRules": {
                "excludePurchasedItems": true,
                "excludePurchasedItemsSinceDays": 0,
                "elasticExcludePurchasedItems": true,
                "elasticExcludePurchasedItemsSinceDays": 0
              },
              "itemsCatalogId": "string",
              "slots": [
                {
                  "name": "string",
                  "itemMin": 0,
                  "itemMax": 0,
                  "filterRules": {
                    "filters": "string",
                    "elasticFilters": "string"
                  },
                  "distinctFilter": {
                    "elastic": true,
                    "filters": [
                      {
                        "field": "string",
                        "maxNumItems": 0,
                        "levelRangeModifier": 0
                      }
                    ]
                  },
                  "attribute": {
                    "name": "string",
                    "levelRangeModifier": 0
                  },
                  "numRows": 0,
                  "numItems": 0,
                  "useDefaultDistinctFilters": true,
                  "useDefaultItemFilters": true
                }
              ],
              "keepSlotsOrder": true,
              "personalizeSlotsOrder": false,
              "boostingStrategies": [
                {
                  "name": "string",
                  "condition": "string",
                  "strength": 1
                }
              ],
              "itemsSource": {
                "type": "aggregate",
                "id": "string"
              }
            });

            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/recommendations/v2/campaigns");
            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": "/recommendations/v2/campaigns",
              "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: 'similar',
              parameters: {
                additionalResponseAttributes: ['string'],
                boostMetric: 'string',
                sortMetric: 'string',
                boostMetricStrength: -100,
                shuffleNumItems: 0,
                personalizedBoostingStrength: 0
              },
              title: 'string',
              slug: 'string',
              description: 'string',
              startDate: 'string',
              endDate: 'string',
              state: 'draft',
              filterRules: {
                excludePurchasedItems: true,
                excludePurchasedItemsSinceDays: 0,
                elasticExcludePurchasedItems: true,
                elasticExcludePurchasedItemsSinceDays: 0
              },
              itemsCatalogId: 'string',
              slots: [
                {
                  name: 'string',
                  itemMin: 0,
                  itemMax: 0,
                  filterRules: {filters: 'string', elasticFilters: 'string'},
                  distinctFilter: {
                    elastic: true,
                    filters: [{field: 'string', maxNumItems: 0, levelRangeModifier: 0}]
                  },
                  attribute: {name: 'string', levelRangeModifier: 0},
                  numRows: 0,
                  numItems: 0,
                  useDefaultDistinctFilters: true,
                  useDefaultItemFilters: true
                }
              ],
              keepSlotsOrder: true,
              personalizeSlotsOrder: false,
              boostingStrategies: [{name: 'string', condition: 'string', strength: 1}],
              itemsSource: {type: 'aggregate', id: 'string'}
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

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

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

            $request->setBody('{"type":"similar","parameters":{"additionalResponseAttributes":["string"],"boostMetric":"string","sortMetric":"string","boostMetricStrength":-100,"shuffleNumItems":0,"personalizedBoostingStrength":0},"title":"string","slug":"string","description":"string","startDate":"string","endDate":"string","state":"draft","filterRules":{"excludePurchasedItems":true,"excludePurchasedItemsSinceDays":0,"elasticExcludePurchasedItems":true,"elasticExcludePurchasedItemsSinceDays":0},"itemsCatalogId":"string","slots":[{"name":"string","itemMin":0,"itemMax":0,"filterRules":{"filters":"string","elasticFilters":"string"},"distinctFilter":{"elastic":true,"filters":[{"field":"string","maxNumItems":0,"levelRangeModifier":0}]},"attribute":{"name":"string","levelRangeModifier":0},"numRows":0,"numItems":0,"useDefaultDistinctFilters":true,"useDefaultItemFilters":true}],"keepSlotsOrder":true,"personalizeSlotsOrder":false,"boostingStrategies":[{"name":"string","condition":"string","strength":1}],"itemsSource":{"type":"aggregate","id":"string"}}');

            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/recommendations/v2/campaigns")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"type\":\"similar\",\"parameters\":{\"additionalResponseAttributes\":[\"string\"],\"boostMetric\":\"string\",\"sortMetric\":\"string\",\"boostMetricStrength\":-100,\"shuffleNumItems\":0,\"personalizedBoostingStrength\":0},\"title\":\"string\",\"slug\":\"string\",\"description\":\"string\",\"startDate\":\"string\",\"endDate\":\"string\",\"state\":\"draft\",\"filterRules\":{\"excludePurchasedItems\":true,\"excludePurchasedItemsSinceDays\":0,\"elasticExcludePurchasedItems\":true,\"elasticExcludePurchasedItemsSinceDays\":0},\"itemsCatalogId\":\"string\",\"slots\":[{\"name\":\"string\",\"itemMin\":0,\"itemMax\":0,\"filterRules\":{\"filters\":\"string\",\"elasticFilters\":\"string\"},\"distinctFilter\":{\"elastic\":true,\"filters\":[{\"field\":\"string\",\"maxNumItems\":0,\"levelRangeModifier\":0}]},\"attribute\":{\"name\":\"string\",\"levelRangeModifier\":0},\"numRows\":0,\"numItems\":0,\"useDefaultDistinctFilters\":true,\"useDefaultItemFilters\":true}],\"keepSlotsOrder\":true,\"personalizeSlotsOrder\":false,\"boostingStrategies\":[{\"name\":\"string\",\"condition\":\"string\",\"strength\":1}],\"itemsSource\":{\"type\":\"aggregate\",\"id\":\"string\"}}")
              .asString();
  /recommendations/v2/campaigns/{campaignId}:
    get:
      summary: Get recommendation campaign details
      description: |
        Retrieve the details of a single campaign.

        ---

        **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:** `RECOMMENDATIONS_V2_SINGLE_CAMPAIGN_READ`

        **User role permission required:** `campaigns_recommendations: read`
      operationId: GetRecommendationCampaignV2
      tags:
        - Recommendation campaigns
      security:
        - JWT: []
      responses:
        "200":
          description: Data of a single campaign
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/recommendation-campaigns-RecommendationCampaignDefinitionV2"
        "404":
          description: Could not find campaign
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/recommendation-campaigns-Error"
        "500":
          description: An error occurred
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/recommendation-campaigns-Error"
      x-snr-doc-urls:
        - /api-reference/ai-recommendations#tag/Recommendation-campaigns/operation/GetRecommendationCampaignV2
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/recommendations/v2/campaigns/%7BcampaignId%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", "/recommendations/v2/campaigns/%7BcampaignId%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/recommendations/v2/campaigns/%7BcampaignId%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": "/recommendations/v2/campaigns/%7BcampaignId%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/recommendations/v2/campaigns/%7BcampaignId%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/recommendations/v2/campaigns/%7BcampaignId%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    post:
      summary: Update a recommendation campaign
      description: |
        Update a recommendation campaign by changing the parameters or copying the definition from another campaign.

        When you copy from another campaign:
        - the following campaign data is NOT updated:
          - `title`
          - `state`
          - `start_date`
          - `end_date`
          - `campaignId`
          - `createdAt`
        - `modified_by_user_id` changes to the user who performed the update


        ---

        **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:** `RECOMMENDATIONS_V2_CAMPAIGN_UPDATE`

        **User role permission required:** `campaigns_recommendations: update`
      operationId: UpdateRecommendationCampaignV2
      tags:
        - Recommendation campaigns
      security:
        - JWT: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/recommendation-campaigns-RecommendationCampaignUpdateRequest"
        description: Definition of the updated campaign.
        required: true
      responses:
        "200":
          description: Campaign updated and returned
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/recommendation-campaigns-RecommendationCampaignDefinitionV2"
        "404":
          description: Could not find campaign
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/recommendation-campaigns-Error"
        "500":
          description: An error occurred
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/recommendation-campaigns-Error"
      x-snr-doc-urls:
        - /api-reference/ai-recommendations#tag/Recommendation-campaigns/operation/UpdateRecommendationCampaignV2
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/recommendations/v2/campaigns/%7BcampaignId%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"type":"similar","parameters":{"additionalResponseAttributes":["string"],"boostMetric":"string","sortMetric":"string","boostMetricStrength":-100,"shuffleNumItems":0},"campaignId":"string","title":"string","slug":"string","description":"string","startDate":"string","endDate":"string","createdAt":"string","updatedAt":"string","state":"draft","filterRules":{"excludePurchasedItems":true,"excludePurchasedItemsSinceDays":0,"elasticExcludePurchasedItems":true,"elasticExcludePurchasedItemsSinceDays":0},"itemsCatalogId":"string","additionalResponseAttributes":["string"],"slots":[{"name":"string","itemMin":0,"itemMax":0,"filterRules":{"filters":"string","elasticFilters":"string"},"distinctFilter":{"elastic":true,"filters":[{"field":"string","maxNumItems":0,"levelRangeModifier":0}]},"attribute":{"name":"string","levelRangeModifier":0},"numRows":0,"numItems":0,"useDefaultDistinctFilters":true,"useDefaultItemFilters":true}],"keepSlotsOrder":true,"personalizeSlotsOrder":false,"boostingStrategies":[{"name":"string","condition":"string","strength":1}],"itemsSource":{"type":"aggregate","id":"string"},"abTest":{"experimentId":0,"variantId":0,"status":"NotStarted","isBaseline":true},"crossWorkspaceMode":{"enabled":true}}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"type\":\"similar\",\"parameters\":{\"additionalResponseAttributes\":[\"string\"],\"boostMetric\":\"string\",\"sortMetric\":\"string\",\"boostMetricStrength\":-100,\"shuffleNumItems\":0},\"campaignId\":\"string\",\"title\":\"string\",\"slug\":\"string\",\"description\":\"string\",\"startDate\":\"string\",\"endDate\":\"string\",\"createdAt\":\"string\",\"updatedAt\":\"string\",\"state\":\"draft\",\"filterRules\":{\"excludePurchasedItems\":true,\"excludePurchasedItemsSinceDays\":0,\"elasticExcludePurchasedItems\":true,\"elasticExcludePurchasedItemsSinceDays\":0},\"itemsCatalogId\":\"string\",\"additionalResponseAttributes\":[\"string\"],\"slots\":[{\"name\":\"string\",\"itemMin\":0,\"itemMax\":0,\"filterRules\":{\"filters\":\"string\",\"elasticFilters\":\"string\"},\"distinctFilter\":{\"elastic\":true,\"filters\":[{\"field\":\"string\",\"maxNumItems\":0,\"levelRangeModifier\":0}]},\"attribute\":{\"name\":\"string\",\"levelRangeModifier\":0},\"numRows\":0,\"numItems\":0,\"useDefaultDistinctFilters\":true,\"useDefaultItemFilters\":true}],\"keepSlotsOrder\":true,\"personalizeSlotsOrder\":false,\"boostingStrategies\":[{\"name\":\"string\",\"condition\":\"string\",\"strength\":1}],\"itemsSource\":{\"type\":\"aggregate\",\"id\":\"string\"},\"abTest\":{\"experimentId\":0,\"variantId\":0,\"status\":\"NotStarted\",\"isBaseline\":true},\"crossWorkspaceMode\":{\"enabled\":true}}"

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

            conn.request("POST", "/recommendations/v2/campaigns/%7BcampaignId%7D", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "type": "similar",
              "parameters": {
                "additionalResponseAttributes": [
                  "string"
                ],
                "boostMetric": "string",
                "sortMetric": "string",
                "boostMetricStrength": -100,
                "shuffleNumItems": 0
              },
              "campaignId": "string",
              "title": "string",
              "slug": "string",
              "description": "string",
              "startDate": "string",
              "endDate": "string",
              "createdAt": "string",
              "updatedAt": "string",
              "state": "draft",
              "filterRules": {
                "excludePurchasedItems": true,
                "excludePurchasedItemsSinceDays": 0,
                "elasticExcludePurchasedItems": true,
                "elasticExcludePurchasedItemsSinceDays": 0
              },
              "itemsCatalogId": "string",
              "additionalResponseAttributes": [
                "string"
              ],
              "slots": [
                {
                  "name": "string",
                  "itemMin": 0,
                  "itemMax": 0,
                  "filterRules": {
                    "filters": "string",
                    "elasticFilters": "string"
                  },
                  "distinctFilter": {
                    "elastic": true,
                    "filters": [
                      {
                        "field": "string",
                        "maxNumItems": 0,
                        "levelRangeModifier": 0
                      }
                    ]
                  },
                  "attribute": {
                    "name": "string",
                    "levelRangeModifier": 0
                  },
                  "numRows": 0,
                  "numItems": 0,
                  "useDefaultDistinctFilters": true,
                  "useDefaultItemFilters": true
                }
              ],
              "keepSlotsOrder": true,
              "personalizeSlotsOrder": false,
              "boostingStrategies": [
                {
                  "name": "string",
                  "condition": "string",
                  "strength": 1
                }
              ],
              "itemsSource": {
                "type": "aggregate",
                "id": "string"
              },
              "abTest": {
                "experimentId": 0,
                "variantId": 0,
                "status": "NotStarted",
                "isBaseline": true
              },
              "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/recommendations/v2/campaigns/%7BcampaignId%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": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/recommendations/v2/campaigns/%7BcampaignId%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: 'similar',
              parameters: {
                additionalResponseAttributes: ['string'],
                boostMetric: 'string',
                sortMetric: 'string',
                boostMetricStrength: -100,
                shuffleNumItems: 0
              },
              campaignId: 'string',
              title: 'string',
              slug: 'string',
              description: 'string',
              startDate: 'string',
              endDate: 'string',
              createdAt: 'string',
              updatedAt: 'string',
              state: 'draft',
              filterRules: {
                excludePurchasedItems: true,
                excludePurchasedItemsSinceDays: 0,
                elasticExcludePurchasedItems: true,
                elasticExcludePurchasedItemsSinceDays: 0
              },
              itemsCatalogId: 'string',
              additionalResponseAttributes: ['string'],
              slots: [
                {
                  name: 'string',
                  itemMin: 0,
                  itemMax: 0,
                  filterRules: {filters: 'string', elasticFilters: 'string'},
                  distinctFilter: {
                    elastic: true,
                    filters: [{field: 'string', maxNumItems: 0, levelRangeModifier: 0}]
                  },
                  attribute: {name: 'string', levelRangeModifier: 0},
                  numRows: 0,
                  numItems: 0,
                  useDefaultDistinctFilters: true,
                  useDefaultItemFilters: true
                }
              ],
              keepSlotsOrder: true,
              personalizeSlotsOrder: false,
              boostingStrategies: [{name: 'string', condition: 'string', strength: 1}],
              itemsSource: {type: 'aggregate', id: 'string'},
              abTest: {experimentId: 0, variantId: 0, status: 'NotStarted', isBaseline: true},
              crossWorkspaceMode: {enabled: true}
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/recommendations/v2/campaigns/%7BcampaignId%7D');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"type":"similar","parameters":{"additionalResponseAttributes":["string"],"boostMetric":"string","sortMetric":"string","boostMetricStrength":-100,"shuffleNumItems":0},"campaignId":"string","title":"string","slug":"string","description":"string","startDate":"string","endDate":"string","createdAt":"string","updatedAt":"string","state":"draft","filterRules":{"excludePurchasedItems":true,"excludePurchasedItemsSinceDays":0,"elasticExcludePurchasedItems":true,"elasticExcludePurchasedItemsSinceDays":0},"itemsCatalogId":"string","additionalResponseAttributes":["string"],"slots":[{"name":"string","itemMin":0,"itemMax":0,"filterRules":{"filters":"string","elasticFilters":"string"},"distinctFilter":{"elastic":true,"filters":[{"field":"string","maxNumItems":0,"levelRangeModifier":0}]},"attribute":{"name":"string","levelRangeModifier":0},"numRows":0,"numItems":0,"useDefaultDistinctFilters":true,"useDefaultItemFilters":true}],"keepSlotsOrder":true,"personalizeSlotsOrder":false,"boostingStrategies":[{"name":"string","condition":"string","strength":1}],"itemsSource":{"type":"aggregate","id":"string"},"abTest":{"experimentId":0,"variantId":0,"status":"NotStarted","isBaseline":true},"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/recommendations/v2/campaigns/%7BcampaignId%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"type\":\"similar\",\"parameters\":{\"additionalResponseAttributes\":[\"string\"],\"boostMetric\":\"string\",\"sortMetric\":\"string\",\"boostMetricStrength\":-100,\"shuffleNumItems\":0},\"campaignId\":\"string\",\"title\":\"string\",\"slug\":\"string\",\"description\":\"string\",\"startDate\":\"string\",\"endDate\":\"string\",\"createdAt\":\"string\",\"updatedAt\":\"string\",\"state\":\"draft\",\"filterRules\":{\"excludePurchasedItems\":true,\"excludePurchasedItemsSinceDays\":0,\"elasticExcludePurchasedItems\":true,\"elasticExcludePurchasedItemsSinceDays\":0},\"itemsCatalogId\":\"string\",\"additionalResponseAttributes\":[\"string\"],\"slots\":[{\"name\":\"string\",\"itemMin\":0,\"itemMax\":0,\"filterRules\":{\"filters\":\"string\",\"elasticFilters\":\"string\"},\"distinctFilter\":{\"elastic\":true,\"filters\":[{\"field\":\"string\",\"maxNumItems\":0,\"levelRangeModifier\":0}]},\"attribute\":{\"name\":\"string\",\"levelRangeModifier\":0},\"numRows\":0,\"numItems\":0,\"useDefaultDistinctFilters\":true,\"useDefaultItemFilters\":true}],\"keepSlotsOrder\":true,\"personalizeSlotsOrder\":false,\"boostingStrategies\":[{\"name\":\"string\",\"condition\":\"string\",\"strength\":1}],\"itemsSource\":{\"type\":\"aggregate\",\"id\":\"string\"},\"abTest\":{\"experimentId\":0,\"variantId\":0,\"status\":\"NotStarted\",\"isBaseline\":true},\"crossWorkspaceMode\":{\"enabled\":true}}")
              .asString();
    delete:
      summary: Delete a recommendation campaign
      description: |
        Delete a recommendation campaign. This operation is irreversible.

        ---

        **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:** `RECOMMENDATIONS_V2_CAMPAIGN_DELETE`

        **User role permission required:** `campaigns_recommendations: delete`
      operationId: DeleteRecommendationCampaign
      tags:
        - Recommendation campaigns
      security:
        - JWT: []
      responses:
        "200":
          description: OK campaign has been deleted
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/recommendation-campaigns-RecommendationCampaignDefinitionV2"
        "404":
          description: Could not find campaign
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/recommendation-campaigns-Error"
        "500":
          description: An error occurred
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/recommendation-campaigns-Error"
      x-snr-doc-urls:
        - /api-reference/ai-recommendations#tag/Recommendation-campaigns/operation/DeleteRecommendationCampaign
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request DELETE \
              --url https://api.synerise.com/recommendations/v2/campaigns/%7BcampaignId%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", "/recommendations/v2/campaigns/%7BcampaignId%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/recommendations/v2/campaigns/%7BcampaignId%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": "/recommendations/v2/campaigns/%7BcampaignId%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/recommendations/v2/campaigns/%7BcampaignId%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/recommendations/v2/campaigns/%7BcampaignId%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    parameters:
      - $ref: "#/components/parameters/recommendation-campaigns-campaignId"
  /recommendations/v2/campaigns/state:
    post:
      summary: Change campaigns' states
      description: |
        Change the status of one or more campaigns.

        ---

        **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:** `RECOMMENDATIONS_V2_STATE_CAMPAIGN_UPDATE`

        **User role permission required:** `campaigns_recommendations: update`
      operationId: UpdateRecommendationsStatesV2
      tags:
        - Recommendation campaigns
      security:
        - JWT: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/recommendation-campaigns-RecommendationStateChangeRequestV2"
        description: List of updated campaign IDs and new states.
        required: true
      responses:
        "200":
          description: Campaigns status changed
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/recommendation-campaigns-RecommendationStateChangeResponseV2"
        "500":
          description: An error occurred
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/recommendation-campaigns-Error"
      x-snr-doc-urls:
        - /api-reference/ai-recommendations#tag/Recommendation-campaigns/operation/UpdateRecommendationsStatesV2
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/recommendations/v2/campaigns/state \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"state":"draft","ids":["string"]}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"state\":\"draft\",\"ids\":[\"string\"]}"

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

            conn.request("POST", "/recommendations/v2/campaigns/state", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "state": "draft",
              "ids": [
                "string"
              ]
            });

            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/recommendations/v2/campaigns/state");
            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": "/recommendations/v2/campaigns/state",
              "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({state: 'draft', ids: ['string']}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

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

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

            $request->setBody('{"state":"draft","ids":["string"]}');

            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/recommendations/v2/campaigns/state")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"state\":\"draft\",\"ids\":[\"string\"]}")
              .asString();
  /recommendations/v2/campaigns/{campaignId}/copy:
    post:
      summary: Copy a recommendation campaign
      description: |
        Copy a campaign. The copied campaign's `state` will be `draft` and `slug` will be undefined.

        ---

        **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:** `RECOMMENDATIONS_V2_COPY_CAMPAIGN_CREATE`

        **User role permission required:** `campaigns_recommendations: create`
      operationId: CopyRecommendationCampaignV2
      tags:
        - Recommendation campaigns
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/recommendation-campaigns-campaignId"
      responses:
        "200":
          description: Copy created and returned
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/recommendation-campaigns-RecommendationCampaignDefinitionV2"
        "404":
          description: Could not find campaign
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/recommendation-campaigns-Error"
        "500":
          description: An error occurred
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/recommendation-campaigns-Error"
      x-snr-doc-urls:
        - /api-reference/ai-recommendations#tag/Recommendation-campaigns/operation/CopyRecommendationCampaignV2
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/recommendations/v2/campaigns/%7BcampaignId%7D/copy \
              --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", "/recommendations/v2/campaigns/%7BcampaignId%7D/copy", 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/recommendations/v2/campaigns/%7BcampaignId%7D/copy");
            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": "/recommendations/v2/campaigns/%7BcampaignId%7D/copy",
              "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/recommendations/v2/campaigns/%7BcampaignId%7D/copy');
            $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/recommendations/v2/campaigns/%7BcampaignId%7D/copy")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /recommendations/v2/campaigns/simplified:
    get:
      summary: Get simplified recommendation campaigns
      description: |
        Fetch simplified recommendation campaign data.

        ---

        **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:** `RECOMMENDATIONS_V2_MANY_SIMPLIFIED_CAMPAIGN_READ`

        **User role permission required:** `campaigns_recommendations: read`
      operationId: GetSimplifiedRecommendationCampaign
      tags:
        - Recommendation campaigns
      security:
        - JWT: []
      parameters:
        - name: type
          in: query
          description: Filter by campaign type.
          required: false
          schema:
            type: array
            items:
              type: string
        - name: state
          in: query
          description: Filter by states.
          required: false
          schema:
            type: array
            items:
              type: string
              enum:
                - draft
                - active
                - paused
      responses:
        "200":
          description: Simplified campaigns returned
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/recommendation-campaigns-SimpleRecommendationCampaignsV2"
        "404":
          description: Could not find campaign
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/recommendation-campaigns-Error"
        "500":
          description: An error occurred
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/recommendation-campaigns-Error"
      x-snr-doc-urls:
        - /api-reference/ai-recommendations#tag/Recommendation-campaigns/operation/GetSimplifiedRecommendationCampaign
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/recommendations/v2/campaigns/simplified?type=SOME_ARRAY_VALUE&state=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", "/recommendations/v2/campaigns/simplified?type=SOME_ARRAY_VALUE&state=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/recommendations/v2/campaigns/simplified?type=SOME_ARRAY_VALUE&state=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": "/recommendations/v2/campaigns/simplified?type=SOME_ARRAY_VALUE&state=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/recommendations/v2/campaigns/simplified');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'type' => 'SOME_ARRAY_VALUE',
              'state' => '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/recommendations/v2/campaigns/simplified?type=SOME_ARRAY_VALUE&state=SOME_ARRAY_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /recommendations/v2/recommend/campaigns/{campaignIdentifier}:
    get:
      summary: Get recommendations by campaign
      description: |
        This method allows you to retrieve recommendations based on a campaignID or a slug and a context. The context is built based on:

          - campaign identifier (required)
          - profile UUID
          - items (for example, items currently in the basket)
          - item exclusions


          This is the recommended and simplest way to fetch recommendations.

          Before you use this method, you must to create a recommendations campaign in Synerise. All the recommendation filters and parameters will be handled for you automatically according to a campaign's configuration.


        ---

        **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:** `API_MATERIALIZER_V2_RECOMMEND_CAMPAIGNS_RECOMMENDATIONS_READ`
      operationId: GetRecommendationsByCampaignV2
      security:
        - TrackerKey: []
        - JWT: []
      tags:
        - Recommendations
      parameters:
        - $ref: "#/components/parameters/recommendations-api-materializer-campaignIdentifier"
        - in: query
          name: clientUUID
          description: |
            Profile UUID. This parameter is required for these recommendation types:
              - Personalized
              - Last seen
              - Recent interactions
              - Section
              - Attribute

            This parameter can be passed in all recommendations. In recommendations which don't require the customer context, it can still be used to create filters.
          required: false
          schema:
            type: string
        - name: itemId
          in: query
          description: |
            Item ID or item IDs for the recommendation context. This parameter is:

            - required for similar/complementary items campaigns.

            - optional for personalized campaigns.

            This parameter can be passed in all recommendations. In recommendations which don't use the context item as part of the recommendation model, the context item can only be used to create filters.

            You can repeat this parameter in order to pass a number of context-creating items, for example, in a cart recommendation campaign.

            This overrides the `itemsSource` settings of the campaign definition.

            Alternatively, you can pass the `itemsSourceType` and `itemsSourceId` parameters to use context items from source (aggregate or expression). These parameters can't be used at the same request with `itemId`.
          required: false
          schema:
            type: string
        - name: inventoryChannelId
          in: query
          description: Inventory context identifier used to evaluate inventory-related filters and boosting strategies. If not provided, no inventory context will be applied.
          required: false
          schema:
            type: string
        - $ref: "#/components/parameters/recommendations-api-materializer-itemsSourceType"
        - $ref: "#/components/parameters/recommendations-api-materializer-itemsSourceId"
        - name: externalItemId
          in: query
          description: |
            Items provided by an external recommendation model to be returned as recommendation results.

            You can repeat this parameter to pass multiple external items.

            This parameter is used with campaigns of type "external-items".
          required: false
          schema:
            type: string
        - name: itemIdExcluded
          in: query
          description: IDs of items that will be excluded from the generated recommendations. For example, items already added to the basket.
          required: false
          schema:
            type: string
        - name: additionalFilters
          in: query
          required: false
          schema:
            type: string
          description: |
            <hr>
            <strong>IMPORTANT</strong>:

            - The `filtersJoiner` attribute is REQUIRED when `additionalFilters` is included. If `filtersJoiner` is missing, the additional filters do not work.  
            - Do NOT send multiple instances of this parameter.

            <hr>

            Additional filters. These are merged with the campaign's own filters according to the logic in `filtersJoiner`.

            This parameter must include all the additional filters as a single string, for example `additionalFilters=effectivePrice>300 AND effectivePrice<400` (the spaces are required).
          example: effectivePrice>300 AND effectivePrice<400
        - name: filtersJoiner
          in: query
          required: false
          schema:
            type: string
            enum:
              - AND
              - OR
              - REPLACE
          description: |
            Defines the logic of merging `additionalFilters` with the campaign's existing filters.
            - `REPLACE` replaces the campaign's filters with your filters.
            - `AND` matches if both your filters and the campaign filters are met.
            - `OR` matches if at least one of the filters is met.
        - name: additionalElasticFilters
          in: query
          required: false
          schema:
            type: string
          description: |
            <hr>
            <strong>IMPORTANT</strong>:

            - The `elasticFiltersJoiner` attribute is REQUIRED when `additionalElasticFilters` is included. If `elasticFiltersJoiner` is missing, the additional filters do not work.  
            - Do NOT send multiple instances of this parameter.

            <hr>

            Additional elastic filters. These are merged with the campaign's own elastic filters according to the logic in `elasticFiltersJoiner`.

            This parameter must include all the additional filters as a single string, for example `additionalElasticFilters=effectivePrice>300 AND effectivePrice<400` (the spaces are required).
          example: effectivePrice>300 AND effectivePrice<400
        - name: elasticFiltersJoiner
          in: query
          required: false
          schema:
            type: string
            enum:
              - AND
              - OR
              - REPLACE
          description: |
            Defines the logic of merging `additionalElasticFilters` with the campaign's existing elastic filters.
            - `REPLACE` replaces the campaign's filters with your filters.
            - `AND` matches if both your filters and the campaign filters are met.
            - `OR` matches if at least one of the filters is met.
        - name: displayAttribute
          in: query
          required: false
          schema:
            type: string
          description: Item attribute whose value will be returned in the recommendation response. The parameter value will be merged with the configuration of the recommendation. This parameter can be passed multiple times.
        - name: includeContextItems
          in: query
          description: When true, the recommendation response will include context items metadata.
          required: false
          schema:
            type: boolean
        - $ref: "#/components/parameters/recommendations-api-materializer-paramsMaterializer"
      responses:
        "200":
          description: Recommendations for the provided context. The response schema depends on your Workspace configuration. The schema below only includes the static elements.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/recommendations-api-materializer-RecommendationResponseSchemaV2-materializer"
        "404":
          $ref: "#/components/responses/recommendations-api-materializer-404cannotGenerate"
        "500":
          $ref: "#/components/responses/recommendations-api-materializer-500error"
      x-snr-doc-urls:
        - /api-reference/ai-recommendations#tag/Recommendations/operation/GetRecommendationsByCampaignV2
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/recommendations/v2/recommend/campaigns/%7BcampaignIdentifier%7D?clientUUID=SOME_STRING_VALUE&itemId=SOME_STRING_VALUE&inventoryChannelId=SOME_STRING_VALUE&itemsSourceType=SOME_STRING_VALUE&itemsSourceId=SOME_STRING_VALUE&externalItemId=SOME_STRING_VALUE&itemIdExcluded=SOME_STRING_VALUE&additionalFilters=effectivePrice%3E300%20AND%20effectivePrice%3C400&filtersJoiner=SOME_STRING_VALUE&additionalElasticFilters=effectivePrice%3E300%20AND%20effectivePrice%3C400&elasticFiltersJoiner=SOME_STRING_VALUE&displayAttribute=SOME_STRING_VALUE&includeContextItems=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", "/recommendations/v2/recommend/campaigns/%7BcampaignIdentifier%7D?clientUUID=SOME_STRING_VALUE&itemId=SOME_STRING_VALUE&inventoryChannelId=SOME_STRING_VALUE&itemsSourceType=SOME_STRING_VALUE&itemsSourceId=SOME_STRING_VALUE&externalItemId=SOME_STRING_VALUE&itemIdExcluded=SOME_STRING_VALUE&additionalFilters=effectivePrice%3E300%20AND%20effectivePrice%3C400&filtersJoiner=SOME_STRING_VALUE&additionalElasticFilters=effectivePrice%3E300%20AND%20effectivePrice%3C400&elasticFiltersJoiner=SOME_STRING_VALUE&displayAttribute=SOME_STRING_VALUE&includeContextItems=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/recommendations/v2/recommend/campaigns/%7BcampaignIdentifier%7D?clientUUID=SOME_STRING_VALUE&itemId=SOME_STRING_VALUE&inventoryChannelId=SOME_STRING_VALUE&itemsSourceType=SOME_STRING_VALUE&itemsSourceId=SOME_STRING_VALUE&externalItemId=SOME_STRING_VALUE&itemIdExcluded=SOME_STRING_VALUE&additionalFilters=effectivePrice%3E300%20AND%20effectivePrice%3C400&filtersJoiner=SOME_STRING_VALUE&additionalElasticFilters=effectivePrice%3E300%20AND%20effectivePrice%3C400&elasticFiltersJoiner=SOME_STRING_VALUE&displayAttribute=SOME_STRING_VALUE&includeContextItems=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": "/recommendations/v2/recommend/campaigns/%7BcampaignIdentifier%7D?clientUUID=SOME_STRING_VALUE&itemId=SOME_STRING_VALUE&inventoryChannelId=SOME_STRING_VALUE&itemsSourceType=SOME_STRING_VALUE&itemsSourceId=SOME_STRING_VALUE&externalItemId=SOME_STRING_VALUE&itemIdExcluded=SOME_STRING_VALUE&additionalFilters=effectivePrice%3E300%20AND%20effectivePrice%3C400&filtersJoiner=SOME_STRING_VALUE&additionalElasticFilters=effectivePrice%3E300%20AND%20effectivePrice%3C400&elasticFiltersJoiner=SOME_STRING_VALUE&displayAttribute=SOME_STRING_VALUE&includeContextItems=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/recommendations/v2/recommend/campaigns/%7BcampaignIdentifier%7D');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'clientUUID' => 'SOME_STRING_VALUE',
              'itemId' => 'SOME_STRING_VALUE',
              'inventoryChannelId' => 'SOME_STRING_VALUE',
              'itemsSourceType' => 'SOME_STRING_VALUE',
              'itemsSourceId' => 'SOME_STRING_VALUE',
              'externalItemId' => 'SOME_STRING_VALUE',
              'itemIdExcluded' => 'SOME_STRING_VALUE',
              'additionalFilters' => 'effectivePrice>300 AND effectivePrice<400',
              'filtersJoiner' => 'SOME_STRING_VALUE',
              'additionalElasticFilters' => 'effectivePrice>300 AND effectivePrice<400',
              'elasticFiltersJoiner' => 'SOME_STRING_VALUE',
              'displayAttribute' => 'SOME_STRING_VALUE',
              'includeContextItems' => '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/recommendations/v2/recommend/campaigns/%7BcampaignIdentifier%7D?clientUUID=SOME_STRING_VALUE&itemId=SOME_STRING_VALUE&inventoryChannelId=SOME_STRING_VALUE&itemsSourceType=SOME_STRING_VALUE&itemsSourceId=SOME_STRING_VALUE&externalItemId=SOME_STRING_VALUE&itemIdExcluded=SOME_STRING_VALUE&additionalFilters=effectivePrice%3E300%20AND%20effectivePrice%3C400&filtersJoiner=SOME_STRING_VALUE&additionalElasticFilters=effectivePrice%3E300%20AND%20effectivePrice%3C400&elasticFiltersJoiner=SOME_STRING_VALUE&displayAttribute=SOME_STRING_VALUE&includeContextItems=SOME_BOOLEAN_VALUE&params=source%3Amobile")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /recommendations/v2/recommend/campaigns:
    post:
      summary: Get recommendations by campaign
      description: |
        This method allows you to retrieve recommendations based on a campaignID or slug and a context. The context is built based on:

        - campaign ID or slug (one of those is required)
        - profile UUID
        - items (for example, items currently in the basket)
        - item exclusions

        This is the recommended and simplest way to fetch recommendations.

        Before you use this method, you must to create a recommendations campaign in Synerise. All the recommendation filters and parameters will be handled for you automatically according to a campaign's configuration.


        ---

        **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:** `API_MATERIALIZER_V2_RECOMMEND_CAMPAIGNS_RECOMMENDATIONS_READ`
      operationId: PostRecommendationsByCampaignV2
      security:
        - TrackerKey: []
        - JWT: []
      tags:
        - Recommendations
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/recommendations-api-materializer-PostRecommendationsRequest"
      responses:
        "200":
          description: Recommendations for the provided context. The response schema depends on your Workspace configuration. The schema below only includes the static elements.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/recommendations-api-materializer-RecommendationResponseSchemaV2-materializer"
        "404":
          $ref: "#/components/responses/recommendations-api-materializer-404cannotGenerate"
        "500":
          $ref: "#/components/responses/recommendations-api-materializer-500error"
      x-snr-doc-urls:
        - /api-reference/ai-recommendations#tag/Recommendations/operation/PostRecommendationsByCampaignV2
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/recommendations/v2/recommend/campaigns \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"clientUUID":"string","campaignId":"string","slug":"string","items":["string"],"itemsSource":{"type":"aggregate","id":"string"},"itemsExcluded":["string"],"additionalFilters":"effectivePrice>300 AND effectivePrice<400","filtersJoiner":"AND","additionalElasticFilters":"effectivePrice>300 AND effectivePrice<400","elasticFiltersJoiner":"AND","displayAttributes":["string"],"includeContextItems":true,"recommendedItemsFromExternalModel":[["string"]],"inventoryContext":{"channelIds":["string"]},"params":{"source":"mobile"}}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"clientUUID\":\"string\",\"campaignId\":\"string\",\"slug\":\"string\",\"items\":[\"string\"],\"itemsSource\":{\"type\":\"aggregate\",\"id\":\"string\"},\"itemsExcluded\":[\"string\"],\"additionalFilters\":\"effectivePrice>300 AND effectivePrice<400\",\"filtersJoiner\":\"AND\",\"additionalElasticFilters\":\"effectivePrice>300 AND effectivePrice<400\",\"elasticFiltersJoiner\":\"AND\",\"displayAttributes\":[\"string\"],\"includeContextItems\":true,\"recommendedItemsFromExternalModel\":[[\"string\"]],\"inventoryContext\":{\"channelIds\":[\"string\"]},\"params\":{\"source\":\"mobile\"}}"

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

            conn.request("POST", "/recommendations/v2/recommend/campaigns", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "clientUUID": "string",
              "campaignId": "string",
              "slug": "string",
              "items": [
                "string"
              ],
              "itemsSource": {
                "type": "aggregate",
                "id": "string"
              },
              "itemsExcluded": [
                "string"
              ],
              "additionalFilters": "effectivePrice>300 AND effectivePrice<400",
              "filtersJoiner": "AND",
              "additionalElasticFilters": "effectivePrice>300 AND effectivePrice<400",
              "elasticFiltersJoiner": "AND",
              "displayAttributes": [
                "string"
              ],
              "includeContextItems": true,
              "recommendedItemsFromExternalModel": [
                [
                  "string"
                ]
              ],
              "inventoryContext": {
                "channelIds": [
                  "string"
                ]
              },
              "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/recommendations/v2/recommend/campaigns");
            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": "/recommendations/v2/recommend/campaigns",
              "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({
              clientUUID: 'string',
              campaignId: 'string',
              slug: 'string',
              items: ['string'],
              itemsSource: {type: 'aggregate', id: 'string'},
              itemsExcluded: ['string'],
              additionalFilters: 'effectivePrice>300 AND effectivePrice<400',
              filtersJoiner: 'AND',
              additionalElasticFilters: 'effectivePrice>300 AND effectivePrice<400',
              elasticFiltersJoiner: 'AND',
              displayAttributes: ['string'],
              includeContextItems: true,
              recommendedItemsFromExternalModel: [['string']],
              inventoryContext: {channelIds: ['string']},
              params: {source: 'mobile'}
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

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

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

            $request->setBody('{"clientUUID":"string","campaignId":"string","slug":"string","items":["string"],"itemsSource":{"type":"aggregate","id":"string"},"itemsExcluded":["string"],"additionalFilters":"effectivePrice>300 AND effectivePrice<400","filtersJoiner":"AND","additionalElasticFilters":"effectivePrice>300 AND effectivePrice<400","elasticFiltersJoiner":"AND","displayAttributes":["string"],"includeContextItems":true,"recommendedItemsFromExternalModel":[["string"]],"inventoryContext":{"channelIds":["string"]},"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/recommendations/v2/recommend/campaigns")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"clientUUID\":\"string\",\"campaignId\":\"string\",\"slug\":\"string\",\"items\":[\"string\"],\"itemsSource\":{\"type\":\"aggregate\",\"id\":\"string\"},\"itemsExcluded\":[\"string\"],\"additionalFilters\":\"effectivePrice>300 AND effectivePrice<400\",\"filtersJoiner\":\"AND\",\"additionalElasticFilters\":\"effectivePrice>300 AND effectivePrice<400\",\"elasticFiltersJoiner\":\"AND\",\"displayAttributes\":[\"string\"],\"includeContextItems\":true,\"recommendedItemsFromExternalModel\":[[\"string\"]],\"inventoryContext\":{\"channelIds\":[\"string\"]},\"params\":{\"source\":\"mobile\"}}")
              .asString();
  /recommendations/v2/recommend/campaigns/{campaignIdentifier}/by/{identifierName}:
    post:
      summary: Get recommendations by campaign and profile identifier
      description: |
        
        **Before you use this method**: you must [create a recommendations campaign in Synerise](https://help.synerise.com/docs/campaign/recommendations-v2/). All the recommendation filters and parameters will be handled for you automatically according to a campaign's configuration.

        The method allows you to retrieve recommendations based on a campaignID or a slug, profile's identifier name (the value of the identifier is provided in the request body), and a context. The context is built based on:

        - campaign identifier (required)
        - identifierName (required)
        - identifierValue (required)
        - items (for example, items currently in the basket)
        - item exclusions


        ---

        **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:** `API_MATERIALIZER_V2_RECOMMEND_WITH_CUSTOM_ID_RECOMMENDATIONS_READ`

        **User role permission required:** `campaigns_recommendations: read`
      operationId: PostRecommendationsByCampaignAndidentifierNameV2
      security:
        - JWT: []
      tags:
        - Recommendations
      parameters:
        - $ref: "#/components/parameters/recommendations-api-materializer-campaignIdentifier"
        - $ref: "#/components/parameters/recommendations-api-materializer-identifierName"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/recommendations-api-materializer-PostRecommendationsWithIdentifierValueRequest"
      responses:
        "200":
          description: Recommendations for the provided context. The response schema depends on your Workspace configuration. The schema below only includes the static elements.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/recommendations-api-materializer-RecommendationResponseSchemaV2-materializer"
        "404":
          $ref: "#/components/responses/recommendations-api-materializer-404cannotGenerate"
        "500":
          $ref: "#/components/responses/recommendations-api-materializer-500error"
      x-snr-doc-urls:
        - /api-reference/ai-recommendations#tag/Recommendations/operation/PostRecommendationsByCampaignAndidentifierNameV2
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/recommendations/v2/recommend/campaigns/%7BcampaignIdentifier%7D/by/%7BidentifierName%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"identifierValue":"string","items":["string"],"itemsSource":{"type":"aggregate","id":"string"},"itemsExcluded":["string"],"additionalFilters":"effectivePrice>300 AND effectivePrice<400","filtersJoiner":"AND","additionalElasticFilters":"effectivePrice>300 AND effectivePrice<400","elasticFiltersJoiner":"AND","displayAttributes":["string"],"includeContextItems":true,"recommendedItemsFromExternalModel":[["string"]],"inventoryContext":{"channelIds":["string"]},"params":{"source":"mobile"}}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"identifierValue\":\"string\",\"items\":[\"string\"],\"itemsSource\":{\"type\":\"aggregate\",\"id\":\"string\"},\"itemsExcluded\":[\"string\"],\"additionalFilters\":\"effectivePrice>300 AND effectivePrice<400\",\"filtersJoiner\":\"AND\",\"additionalElasticFilters\":\"effectivePrice>300 AND effectivePrice<400\",\"elasticFiltersJoiner\":\"AND\",\"displayAttributes\":[\"string\"],\"includeContextItems\":true,\"recommendedItemsFromExternalModel\":[[\"string\"]],\"inventoryContext\":{\"channelIds\":[\"string\"]},\"params\":{\"source\":\"mobile\"}}"

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

            conn.request("POST", "/recommendations/v2/recommend/campaigns/%7BcampaignIdentifier%7D/by/%7BidentifierName%7D", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "identifierValue": "string",
              "items": [
                "string"
              ],
              "itemsSource": {
                "type": "aggregate",
                "id": "string"
              },
              "itemsExcluded": [
                "string"
              ],
              "additionalFilters": "effectivePrice>300 AND effectivePrice<400",
              "filtersJoiner": "AND",
              "additionalElasticFilters": "effectivePrice>300 AND effectivePrice<400",
              "elasticFiltersJoiner": "AND",
              "displayAttributes": [
                "string"
              ],
              "includeContextItems": true,
              "recommendedItemsFromExternalModel": [
                [
                  "string"
                ]
              ],
              "inventoryContext": {
                "channelIds": [
                  "string"
                ]
              },
              "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/recommendations/v2/recommend/campaigns/%7BcampaignIdentifier%7D/by/%7BidentifierName%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": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/recommendations/v2/recommend/campaigns/%7BcampaignIdentifier%7D/by/%7BidentifierName%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({
              identifierValue: 'string',
              items: ['string'],
              itemsSource: {type: 'aggregate', id: 'string'},
              itemsExcluded: ['string'],
              additionalFilters: 'effectivePrice>300 AND effectivePrice<400',
              filtersJoiner: 'AND',
              additionalElasticFilters: 'effectivePrice>300 AND effectivePrice<400',
              elasticFiltersJoiner: 'AND',
              displayAttributes: ['string'],
              includeContextItems: true,
              recommendedItemsFromExternalModel: [['string']],
              inventoryContext: {channelIds: ['string']},
              params: {source: 'mobile'}
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/recommendations/v2/recommend/campaigns/%7BcampaignIdentifier%7D/by/%7BidentifierName%7D');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"identifierValue":"string","items":["string"],"itemsSource":{"type":"aggregate","id":"string"},"itemsExcluded":["string"],"additionalFilters":"effectivePrice>300 AND effectivePrice<400","filtersJoiner":"AND","additionalElasticFilters":"effectivePrice>300 AND effectivePrice<400","elasticFiltersJoiner":"AND","displayAttributes":["string"],"includeContextItems":true,"recommendedItemsFromExternalModel":[["string"]],"inventoryContext":{"channelIds":["string"]},"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/recommendations/v2/recommend/campaigns/%7BcampaignIdentifier%7D/by/%7BidentifierName%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"identifierValue\":\"string\",\"items\":[\"string\"],\"itemsSource\":{\"type\":\"aggregate\",\"id\":\"string\"},\"itemsExcluded\":[\"string\"],\"additionalFilters\":\"effectivePrice>300 AND effectivePrice<400\",\"filtersJoiner\":\"AND\",\"additionalElasticFilters\":\"effectivePrice>300 AND effectivePrice<400\",\"elasticFiltersJoiner\":\"AND\",\"displayAttributes\":[\"string\"],\"includeContextItems\":true,\"recommendedItemsFromExternalModel\":[[\"string\"]],\"inventoryContext\":{\"channelIds\":[\"string\"]},\"params\":{\"source\":\"mobile\"}}")
              .asString();
  /recommendations/v2/recommend/campaigns/preview:
    post:
      summary: Preview campaign recommendations
      description: |
        This method allows you to preview recommendations for a campaign with a given configuration before creating it.

        **Note**: This method is not an alternative to creating recommendations for an existing campaign. It is intended for testing purposes only.

        The recommendation context is built based on:
        - profile UUID
        - items
        - item exclusions


        ---

        **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:** `API_MATERIALIZER_V2_RECOMMEND_CAMPAIGNS_RECOMMENDATIONS_PREVIEW_READ`

        **User role permission required:** `campaigns_recommendations: read`
      operationId: PostPreviewRecommendations
      security:
        - TrackerKey: []
        - JWT: []
      tags:
        - Recommendations
      requestBody:
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/recommendations-api-materializer-PreviewRecommendationContext"
                - oneOf:
                    - $ref: "#/components/schemas/recommendations-api-materializer-PreviewSimilarRecommendationCampaignsCreateRequest"
                    - $ref: "#/components/schemas/recommendations-api-materializer-PreviewMetricsRecommendationCampaignsCreateRequest"
                    - $ref: "#/components/schemas/recommendations-api-materializer-PreviewCrossSellRecommendationCampaignsCreateRequest"
                    - $ref: "#/components/schemas/recommendations-api-materializer-PreviewSetComplementRecommendationCampaignsCreateRequest"
                    - $ref: "#/components/schemas/recommendations-api-materializer-PreviewLastViewedRecommendationCampaignsCreateRequest"
                    - $ref: "#/components/schemas/recommendations-api-materializer-PreviewPersonalizedRecommendationCampaignsCreateRequest"
                    - $ref: "#/components/schemas/recommendations-api-materializer-PreviewVisuallySimilarRecommendationCampaignsCreateRequest"
                    - $ref: "#/components/schemas/recommendations-api-materializer-PreviewItemComparisonRecommendationCampaignsCreateRequest"
                    - $ref: "#/components/schemas/recommendations-api-materializer-PreviewRecentInteractionsRecommendationCampaignsCreateRequest"
                    - $ref: "#/components/schemas/recommendations-api-materializer-PreviewSectionRecommendationCampaignsCreateRequest"
                    - $ref: "#/components/schemas/recommendations-api-materializer-PreviewAttributeRecommendationCampaignsCreateRequest"
      responses:
        "200":
          description: Recommendations for the provided context. The response schema depends on your Workspace configuration. The schema below only includes the static elements.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/recommendations-api-materializer-RecommendationResponseSchemaV2-materializer"
        "404":
          $ref: "#/components/responses/recommendations-api-materializer-404cannotGenerate"
        "429":
          $ref: "#/components/responses/recommendations-api-materializer-429toManyRequestsError"
        "500":
          $ref: "#/components/responses/recommendations-api-materializer-500error"
      x-snr-doc-urls:
        - /api-reference/ai-recommendations#tag/Recommendations/operation/PostPreviewRecommendations
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/recommendations/v2/recommend/campaigns/preview \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"clientUUID":"50829d26-5337-410e-9365-b40f7a01bb61","items":["string"],"includeContextItems":false,"params":{"source":"mobile"},"inventoryContext":{"channelIds":["string"]},"type":"similar","parameters":{"additionalResponseAttributes":["string"],"boostMetric":"string","sortMetric":"string","boostMetricStrength":-100,"shuffleNumItems":0,"personalizedBoostingStrength":0},"title":"preview","campaignId":"preview","filterRules":{"excludePurchasedItems":true,"excludePurchasedItemsSinceDays":0,"elasticExcludePurchasedItems":true,"elasticExcludePurchasedItemsSinceDays":0},"itemsCatalogId":"string","slots":[{"name":"string","itemMin":0,"itemMax":0,"filterRules":{"filters":"string","elasticFilters":"string"},"distinctFilter":{"elastic":true,"filters":[{"field":"string","maxNumItems":0,"levelRangeModifier":0}]},"attribute":{"name":"string","levelRangeModifier":0},"numRows":0,"numItems":0}],"keepSlotsOrder":true,"personalizeSlotsOrder":false,"boostingStrategies":[{"name":"string","condition":"string","strength":1}],"itemsSource":{"type":"aggregate","id":"string"}}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"clientUUID\":\"50829d26-5337-410e-9365-b40f7a01bb61\",\"items\":[\"string\"],\"includeContextItems\":false,\"params\":{\"source\":\"mobile\"},\"inventoryContext\":{\"channelIds\":[\"string\"]},\"type\":\"similar\",\"parameters\":{\"additionalResponseAttributes\":[\"string\"],\"boostMetric\":\"string\",\"sortMetric\":\"string\",\"boostMetricStrength\":-100,\"shuffleNumItems\":0,\"personalizedBoostingStrength\":0},\"title\":\"preview\",\"campaignId\":\"preview\",\"filterRules\":{\"excludePurchasedItems\":true,\"excludePurchasedItemsSinceDays\":0,\"elasticExcludePurchasedItems\":true,\"elasticExcludePurchasedItemsSinceDays\":0},\"itemsCatalogId\":\"string\",\"slots\":[{\"name\":\"string\",\"itemMin\":0,\"itemMax\":0,\"filterRules\":{\"filters\":\"string\",\"elasticFilters\":\"string\"},\"distinctFilter\":{\"elastic\":true,\"filters\":[{\"field\":\"string\",\"maxNumItems\":0,\"levelRangeModifier\":0}]},\"attribute\":{\"name\":\"string\",\"levelRangeModifier\":0},\"numRows\":0,\"numItems\":0}],\"keepSlotsOrder\":true,\"personalizeSlotsOrder\":false,\"boostingStrategies\":[{\"name\":\"string\",\"condition\":\"string\",\"strength\":1}],\"itemsSource\":{\"type\":\"aggregate\",\"id\":\"string\"}}"

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

            conn.request("POST", "/recommendations/v2/recommend/campaigns/preview", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "clientUUID": "50829d26-5337-410e-9365-b40f7a01bb61",
              "items": [
                "string"
              ],
              "includeContextItems": false,
              "params": {
                "source": "mobile"
              },
              "inventoryContext": {
                "channelIds": [
                  "string"
                ]
              },
              "type": "similar",
              "parameters": {
                "additionalResponseAttributes": [
                  "string"
                ],
                "boostMetric": "string",
                "sortMetric": "string",
                "boostMetricStrength": -100,
                "shuffleNumItems": 0,
                "personalizedBoostingStrength": 0
              },
              "title": "preview",
              "campaignId": "preview",
              "filterRules": {
                "excludePurchasedItems": true,
                "excludePurchasedItemsSinceDays": 0,
                "elasticExcludePurchasedItems": true,
                "elasticExcludePurchasedItemsSinceDays": 0
              },
              "itemsCatalogId": "string",
              "slots": [
                {
                  "name": "string",
                  "itemMin": 0,
                  "itemMax": 0,
                  "filterRules": {
                    "filters": "string",
                    "elasticFilters": "string"
                  },
                  "distinctFilter": {
                    "elastic": true,
                    "filters": [
                      {
                        "field": "string",
                        "maxNumItems": 0,
                        "levelRangeModifier": 0
                      }
                    ]
                  },
                  "attribute": {
                    "name": "string",
                    "levelRangeModifier": 0
                  },
                  "numRows": 0,
                  "numItems": 0
                }
              ],
              "keepSlotsOrder": true,
              "personalizeSlotsOrder": false,
              "boostingStrategies": [
                {
                  "name": "string",
                  "condition": "string",
                  "strength": 1
                }
              ],
              "itemsSource": {
                "type": "aggregate",
                "id": "string"
              }
            });

            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/recommendations/v2/recommend/campaigns/preview");
            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": "/recommendations/v2/recommend/campaigns/preview",
              "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({
              clientUUID: '50829d26-5337-410e-9365-b40f7a01bb61',
              items: ['string'],
              includeContextItems: false,
              params: {source: 'mobile'},
              inventoryContext: {channelIds: ['string']},
              type: 'similar',
              parameters: {
                additionalResponseAttributes: ['string'],
                boostMetric: 'string',
                sortMetric: 'string',
                boostMetricStrength: -100,
                shuffleNumItems: 0,
                personalizedBoostingStrength: 0
              },
              title: 'preview',
              campaignId: 'preview',
              filterRules: {
                excludePurchasedItems: true,
                excludePurchasedItemsSinceDays: 0,
                elasticExcludePurchasedItems: true,
                elasticExcludePurchasedItemsSinceDays: 0
              },
              itemsCatalogId: 'string',
              slots: [
                {
                  name: 'string',
                  itemMin: 0,
                  itemMax: 0,
                  filterRules: {filters: 'string', elasticFilters: 'string'},
                  distinctFilter: {
                    elastic: true,
                    filters: [{field: 'string', maxNumItems: 0, levelRangeModifier: 0}]
                  },
                  attribute: {name: 'string', levelRangeModifier: 0},
                  numRows: 0,
                  numItems: 0
                }
              ],
              keepSlotsOrder: true,
              personalizeSlotsOrder: false,
              boostingStrategies: [{name: 'string', condition: 'string', strength: 1}],
              itemsSource: {type: 'aggregate', id: 'string'}
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/recommendations/v2/recommend/campaigns/preview');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"clientUUID":"50829d26-5337-410e-9365-b40f7a01bb61","items":["string"],"includeContextItems":false,"params":{"source":"mobile"},"inventoryContext":{"channelIds":["string"]},"type":"similar","parameters":{"additionalResponseAttributes":["string"],"boostMetric":"string","sortMetric":"string","boostMetricStrength":-100,"shuffleNumItems":0,"personalizedBoostingStrength":0},"title":"preview","campaignId":"preview","filterRules":{"excludePurchasedItems":true,"excludePurchasedItemsSinceDays":0,"elasticExcludePurchasedItems":true,"elasticExcludePurchasedItemsSinceDays":0},"itemsCatalogId":"string","slots":[{"name":"string","itemMin":0,"itemMax":0,"filterRules":{"filters":"string","elasticFilters":"string"},"distinctFilter":{"elastic":true,"filters":[{"field":"string","maxNumItems":0,"levelRangeModifier":0}]},"attribute":{"name":"string","levelRangeModifier":0},"numRows":0,"numItems":0}],"keepSlotsOrder":true,"personalizeSlotsOrder":false,"boostingStrategies":[{"name":"string","condition":"string","strength":1}],"itemsSource":{"type":"aggregate","id":"string"}}');

            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/recommendations/v2/recommend/campaigns/preview")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"clientUUID\":\"50829d26-5337-410e-9365-b40f7a01bb61\",\"items\":[\"string\"],\"includeContextItems\":false,\"params\":{\"source\":\"mobile\"},\"inventoryContext\":{\"channelIds\":[\"string\"]},\"type\":\"similar\",\"parameters\":{\"additionalResponseAttributes\":[\"string\"],\"boostMetric\":\"string\",\"sortMetric\":\"string\",\"boostMetricStrength\":-100,\"shuffleNumItems\":0,\"personalizedBoostingStrength\":0},\"title\":\"preview\",\"campaignId\":\"preview\",\"filterRules\":{\"excludePurchasedItems\":true,\"excludePurchasedItemsSinceDays\":0,\"elasticExcludePurchasedItems\":true,\"elasticExcludePurchasedItemsSinceDays\":0},\"itemsCatalogId\":\"string\",\"slots\":[{\"name\":\"string\",\"itemMin\":0,\"itemMax\":0,\"filterRules\":{\"filters\":\"string\",\"elasticFilters\":\"string\"},\"distinctFilter\":{\"elastic\":true,\"filters\":[{\"field\":\"string\",\"maxNumItems\":0,\"levelRangeModifier\":0}]},\"attribute\":{\"name\":\"string\",\"levelRangeModifier\":0},\"numRows\":0,\"numItems\":0}],\"keepSlotsOrder\":true,\"personalizeSlotsOrder\":false,\"boostingStrategies\":[{\"name\":\"string\",\"condition\":\"string\",\"strength\":1}],\"itemsSource\":{\"type\":\"aggregate\",\"id\":\"string\"}}")
              .asString();
  /recommendations/v2/recommend/items/users/{clientUuid}:
    get:
      summary: Personalized recommendations
      description: |
        Retrieve item recommendations for a profile.

        **Note:** The definition of an *item* encompasses products, but also articles, images, videos, and any other entities in the item feed.

        ---

        **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:** `RECOMMENDATIONS_V2_PERSONALIZED_RECOMMENDATIONS_READ`
      operationId: RecommendForUserV2
      tags:
        - Recommendations
      security:
        - TrackerKey: []
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/recommendations-rust-all-inPathClientUUID"
        - $ref: "#/components/parameters/recommendations-rust-all-recommendationsMinNumItems"
        - $ref: "#/components/parameters/recommendations-rust-all-recommendationsMaxNumItems"
        - $ref: "#/components/parameters/recommendations-rust-all-recommendationsCampaignId"
        - $ref: "#/components/parameters/recommendations-rust-all-recommendationsCampaignName"
        - $ref: "#/components/parameters/recommendations-rust-all-recommendationsExcludePurchasedItems"
        - $ref: "#/components/parameters/recommendations-rust-all-recommendationsExcludePurchasedItemsSince"
        - $ref: "#/components/parameters/recommendations-rust-all-filterExpr"
        - $ref: "#/components/parameters/recommendations-rust-all-elasticFilterExpr"
        - $ref: "#/components/parameters/recommendations-rust-all-inParamsItemId"
        - $ref: "#/components/parameters/recommendations-rust-all-itemCatalogId"
        - $ref: "#/components/parameters/recommendations-rust-all-distinctFilter"
        - $ref: "#/components/parameters/recommendations-rust-all-recommendationsIncludeContextItems"
        - $ref: "#/components/parameters/recommendations-rust-all-params"
        - $ref: "#/components/parameters/recommendations-rust-all-inventoryChannelId"
        - $ref: "#/components/parameters/recommendations-rust-all-crossWorkspaceMode"
      responses:
        "200":
          description: Personalized recommendations
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/recommendations-rust-all-RecommendationResponseSchemaV2"
        "404":
          $ref: "#/components/responses/recommendations-rust-all-404-no-recommendation"
        "500":
          $ref: "#/components/responses/recommendations-rust-all-500-error-occurred"
      x-snr-doc-urls:
        - /api-reference/ai-recommendations#tag/Recommendations/operation/RecommendForUserV2
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/recommendations/v2/recommend/items/users/%7BclientUuid%7D?minNumItems=SOME_INTEGER_VALUE&maxNumItems=SOME_INTEGER_VALUE&campaignId=SOME_STRING_VALUE&campaignName=SOME_STRING_VALUE&excludePurchasedItems=SOME_BOOLEAN_VALUE&excludePurchasedItemsSinceDays=SOME_INTEGER_VALUE&filters=SOME_STRING_VALUE&elastic%3Afilters=SOME_STRING_VALUE&itemId=SOME_STRING_VALUE&itemCatalogId=SOME_STRING_VALUE&distinctFilter=SOME_OBJECT_VALUE&includeContextItems=SOME_BOOLEAN_VALUE&params=source%3Amobile&inventoryChannelId=SOME_STRING_VALUE&crossWorkspaceMode=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", "/recommendations/v2/recommend/items/users/%7BclientUuid%7D?minNumItems=SOME_INTEGER_VALUE&maxNumItems=SOME_INTEGER_VALUE&campaignId=SOME_STRING_VALUE&campaignName=SOME_STRING_VALUE&excludePurchasedItems=SOME_BOOLEAN_VALUE&excludePurchasedItemsSinceDays=SOME_INTEGER_VALUE&filters=SOME_STRING_VALUE&elastic%3Afilters=SOME_STRING_VALUE&itemId=SOME_STRING_VALUE&itemCatalogId=SOME_STRING_VALUE&distinctFilter=SOME_OBJECT_VALUE&includeContextItems=SOME_BOOLEAN_VALUE&params=source%3Amobile&inventoryChannelId=SOME_STRING_VALUE&crossWorkspaceMode=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/recommendations/v2/recommend/items/users/%7BclientUuid%7D?minNumItems=SOME_INTEGER_VALUE&maxNumItems=SOME_INTEGER_VALUE&campaignId=SOME_STRING_VALUE&campaignName=SOME_STRING_VALUE&excludePurchasedItems=SOME_BOOLEAN_VALUE&excludePurchasedItemsSinceDays=SOME_INTEGER_VALUE&filters=SOME_STRING_VALUE&elastic%3Afilters=SOME_STRING_VALUE&itemId=SOME_STRING_VALUE&itemCatalogId=SOME_STRING_VALUE&distinctFilter=SOME_OBJECT_VALUE&includeContextItems=SOME_BOOLEAN_VALUE&params=source%3Amobile&inventoryChannelId=SOME_STRING_VALUE&crossWorkspaceMode=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": "/recommendations/v2/recommend/items/users/%7BclientUuid%7D?minNumItems=SOME_INTEGER_VALUE&maxNumItems=SOME_INTEGER_VALUE&campaignId=SOME_STRING_VALUE&campaignName=SOME_STRING_VALUE&excludePurchasedItems=SOME_BOOLEAN_VALUE&excludePurchasedItemsSinceDays=SOME_INTEGER_VALUE&filters=SOME_STRING_VALUE&elastic%3Afilters=SOME_STRING_VALUE&itemId=SOME_STRING_VALUE&itemCatalogId=SOME_STRING_VALUE&distinctFilter=SOME_OBJECT_VALUE&includeContextItems=SOME_BOOLEAN_VALUE&params=source%3Amobile&inventoryChannelId=SOME_STRING_VALUE&crossWorkspaceMode=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/recommendations/v2/recommend/items/users/%7BclientUuid%7D');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'minNumItems' => 'SOME_INTEGER_VALUE',
              'maxNumItems' => 'SOME_INTEGER_VALUE',
              'campaignId' => 'SOME_STRING_VALUE',
              'campaignName' => 'SOME_STRING_VALUE',
              'excludePurchasedItems' => 'SOME_BOOLEAN_VALUE',
              'excludePurchasedItemsSinceDays' => 'SOME_INTEGER_VALUE',
              'filters' => 'SOME_STRING_VALUE',
              'elastic:filters' => 'SOME_STRING_VALUE',
              'itemId' => 'SOME_STRING_VALUE',
              'itemCatalogId' => 'SOME_STRING_VALUE',
              'distinctFilter' => 'SOME_OBJECT_VALUE',
              'includeContextItems' => 'SOME_BOOLEAN_VALUE',
              'params' => 'source:mobile',
              'inventoryChannelId' => 'SOME_STRING_VALUE',
              'crossWorkspaceMode' => '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/recommendations/v2/recommend/items/users/%7BclientUuid%7D?minNumItems=SOME_INTEGER_VALUE&maxNumItems=SOME_INTEGER_VALUE&campaignId=SOME_STRING_VALUE&campaignName=SOME_STRING_VALUE&excludePurchasedItems=SOME_BOOLEAN_VALUE&excludePurchasedItemsSinceDays=SOME_INTEGER_VALUE&filters=SOME_STRING_VALUE&elastic%3Afilters=SOME_STRING_VALUE&itemId=SOME_STRING_VALUE&itemCatalogId=SOME_STRING_VALUE&distinctFilter=SOME_OBJECT_VALUE&includeContextItems=SOME_BOOLEAN_VALUE&params=source%3Amobile&inventoryChannelId=SOME_STRING_VALUE&crossWorkspaceMode=SOME_BOOLEAN_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    post:
      summary: Personalized recommendations
      description: |
        Retrieve item recommendations for a profile.

        **Note:** The definition of an *item* encompasses products, but also articles, images, videos, and any other entities in the item feed.

        ---

        **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:** `RECOMMENDATIONS_V2_PERSONALIZED_RECOMMENDATIONS_READ`
      operationId: PostRecommendForUserV2
      tags:
        - Recommendations
      security:
        - TrackerKey: []
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/recommendations-rust-all-inPathClientUUID"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/recommendations-rust-all-SlotsBodySchemaV2"
        description: Definition of the requested recommendation
        required: true
      responses:
        "200":
          description: Personalized recommendations
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/recommendations-rust-all-SlotsRecommendationResponseSchemaV2"
        "404":
          $ref: "#/components/responses/recommendations-rust-all-404-no-recommendation"
        "500":
          $ref: "#/components/responses/recommendations-rust-all-500-error-occurred"
      x-snr-doc-urls:
        - /api-reference/ai-recommendations#tag/Recommendations/operation/PostRecommendForUserV2
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/recommendations/v2/recommend/items/users/%7BclientUuid%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"campaignId":"defaultCampaign","campaignName":"string","catalogId":"default","clientUUID":"string","contextItemIds":["string"],"includeContextItems":false,"filterRules":{"excludePurchasedItems":false,"excludePurchasedItemsSinceDays":0,"elasticExcludePurchasedItems":false,"elasticExcludePurchasedItemsSinceDays":0},"displayAttributes":"string","abTestContext":{"experimentId":0,"variantId":"string","requestedCampaignId":"string"},"params":{"source":"mobile"},"inventoryContext":{"channelIds":["string"]},"keepSlotsOrder":true,"personalizeSlotsOrder":false,"sortMetric":"string","boostingParameters":{"metric":"string","strength":0.1,"personalizedBoostingStrength":0},"boostingStrategies":[{"name":"string","condition":"string","strength":1}],"crossWorkspaceMode":{"enabled":true},"slots":[{"name":"string","minNumItems":1,"maxNumItems":5,"shuffleNumItems":1,"filters":"string","elasticFilters":"string","distinctFilter":{"elastic":true,"filters":[{"field":"string","maxNumItems":0,"levelRangeModifier":0}]}}]}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"campaignId\":\"defaultCampaign\",\"campaignName\":\"string\",\"catalogId\":\"default\",\"clientUUID\":\"string\",\"contextItemIds\":[\"string\"],\"includeContextItems\":false,\"filterRules\":{\"excludePurchasedItems\":false,\"excludePurchasedItemsSinceDays\":0,\"elasticExcludePurchasedItems\":false,\"elasticExcludePurchasedItemsSinceDays\":0},\"displayAttributes\":\"string\",\"abTestContext\":{\"experimentId\":0,\"variantId\":\"string\",\"requestedCampaignId\":\"string\"},\"params\":{\"source\":\"mobile\"},\"inventoryContext\":{\"channelIds\":[\"string\"]},\"keepSlotsOrder\":true,\"personalizeSlotsOrder\":false,\"sortMetric\":\"string\",\"boostingParameters\":{\"metric\":\"string\",\"strength\":0.1,\"personalizedBoostingStrength\":0},\"boostingStrategies\":[{\"name\":\"string\",\"condition\":\"string\",\"strength\":1}],\"crossWorkspaceMode\":{\"enabled\":true},\"slots\":[{\"name\":\"string\",\"minNumItems\":1,\"maxNumItems\":5,\"shuffleNumItems\":1,\"filters\":\"string\",\"elasticFilters\":\"string\",\"distinctFilter\":{\"elastic\":true,\"filters\":[{\"field\":\"string\",\"maxNumItems\":0,\"levelRangeModifier\":0}]}}]}"

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

            conn.request("POST", "/recommendations/v2/recommend/items/users/%7BclientUuid%7D", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "campaignId": "defaultCampaign",
              "campaignName": "string",
              "catalogId": "default",
              "clientUUID": "string",
              "contextItemIds": [
                "string"
              ],
              "includeContextItems": false,
              "filterRules": {
                "excludePurchasedItems": false,
                "excludePurchasedItemsSinceDays": 0,
                "elasticExcludePurchasedItems": false,
                "elasticExcludePurchasedItemsSinceDays": 0
              },
              "displayAttributes": "string",
              "abTestContext": {
                "experimentId": 0,
                "variantId": "string",
                "requestedCampaignId": "string"
              },
              "params": {
                "source": "mobile"
              },
              "inventoryContext": {
                "channelIds": [
                  "string"
                ]
              },
              "keepSlotsOrder": true,
              "personalizeSlotsOrder": false,
              "sortMetric": "string",
              "boostingParameters": {
                "metric": "string",
                "strength": 0.1,
                "personalizedBoostingStrength": 0
              },
              "boostingStrategies": [
                {
                  "name": "string",
                  "condition": "string",
                  "strength": 1
                }
              ],
              "crossWorkspaceMode": {
                "enabled": true
              },
              "slots": [
                {
                  "name": "string",
                  "minNumItems": 1,
                  "maxNumItems": 5,
                  "shuffleNumItems": 1,
                  "filters": "string",
                  "elasticFilters": "string",
                  "distinctFilter": {
                    "elastic": true,
                    "filters": [
                      {
                        "field": "string",
                        "maxNumItems": 0,
                        "levelRangeModifier": 0
                      }
                    ]
                  }
                }
              ]
            });

            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/recommendations/v2/recommend/items/users/%7BclientUuid%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": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/recommendations/v2/recommend/items/users/%7BclientUuid%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({
              campaignId: 'defaultCampaign',
              campaignName: 'string',
              catalogId: 'default',
              clientUUID: 'string',
              contextItemIds: ['string'],
              includeContextItems: false,
              filterRules: {
                excludePurchasedItems: false,
                excludePurchasedItemsSinceDays: 0,
                elasticExcludePurchasedItems: false,
                elasticExcludePurchasedItemsSinceDays: 0
              },
              displayAttributes: 'string',
              abTestContext: {experimentId: 0, variantId: 'string', requestedCampaignId: 'string'},
              params: {source: 'mobile'},
              inventoryContext: {channelIds: ['string']},
              keepSlotsOrder: true,
              personalizeSlotsOrder: false,
              sortMetric: 'string',
              boostingParameters: {metric: 'string', strength: 0.1, personalizedBoostingStrength: 0},
              boostingStrategies: [{name: 'string', condition: 'string', strength: 1}],
              crossWorkspaceMode: {enabled: true},
              slots: [
                {
                  name: 'string',
                  minNumItems: 1,
                  maxNumItems: 5,
                  shuffleNumItems: 1,
                  filters: 'string',
                  elasticFilters: 'string',
                  distinctFilter: {
                    elastic: true,
                    filters: [{field: 'string', maxNumItems: 0, levelRangeModifier: 0}]
                  }
                }
              ]
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/recommendations/v2/recommend/items/users/%7BclientUuid%7D');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"campaignId":"defaultCampaign","campaignName":"string","catalogId":"default","clientUUID":"string","contextItemIds":["string"],"includeContextItems":false,"filterRules":{"excludePurchasedItems":false,"excludePurchasedItemsSinceDays":0,"elasticExcludePurchasedItems":false,"elasticExcludePurchasedItemsSinceDays":0},"displayAttributes":"string","abTestContext":{"experimentId":0,"variantId":"string","requestedCampaignId":"string"},"params":{"source":"mobile"},"inventoryContext":{"channelIds":["string"]},"keepSlotsOrder":true,"personalizeSlotsOrder":false,"sortMetric":"string","boostingParameters":{"metric":"string","strength":0.1,"personalizedBoostingStrength":0},"boostingStrategies":[{"name":"string","condition":"string","strength":1}],"crossWorkspaceMode":{"enabled":true},"slots":[{"name":"string","minNumItems":1,"maxNumItems":5,"shuffleNumItems":1,"filters":"string","elasticFilters":"string","distinctFilter":{"elastic":true,"filters":[{"field":"string","maxNumItems":0,"levelRangeModifier":0}]}}]}');

            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/recommendations/v2/recommend/items/users/%7BclientUuid%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"campaignId\":\"defaultCampaign\",\"campaignName\":\"string\",\"catalogId\":\"default\",\"clientUUID\":\"string\",\"contextItemIds\":[\"string\"],\"includeContextItems\":false,\"filterRules\":{\"excludePurchasedItems\":false,\"excludePurchasedItemsSinceDays\":0,\"elasticExcludePurchasedItems\":false,\"elasticExcludePurchasedItemsSinceDays\":0},\"displayAttributes\":\"string\",\"abTestContext\":{\"experimentId\":0,\"variantId\":\"string\",\"requestedCampaignId\":\"string\"},\"params\":{\"source\":\"mobile\"},\"inventoryContext\":{\"channelIds\":[\"string\"]},\"keepSlotsOrder\":true,\"personalizeSlotsOrder\":false,\"sortMetric\":\"string\",\"boostingParameters\":{\"metric\":\"string\",\"strength\":0.1,\"personalizedBoostingStrength\":0},\"boostingStrategies\":[{\"name\":\"string\",\"condition\":\"string\",\"strength\":1}],\"crossWorkspaceMode\":{\"enabled\":true},\"slots\":[{\"name\":\"string\",\"minNumItems\":1,\"maxNumItems\":5,\"shuffleNumItems\":1,\"filters\":\"string\",\"elasticFilters\":\"string\",\"distinctFilter\":{\"elastic\":true,\"filters\":[{\"field\":\"string\",\"maxNumItems\":0,\"levelRangeModifier\":0}]}}]}")
              .asString();
  /recommendations/v2/recommend/items/users/{clientUuid}/sections:
    post:
      summary: Section recommendations
      description: |
        Retrieve item recommendations grouped by attribute.

        **Note:** The definition of an *item* encompasses products, but also articles, images, videos, and any other entities in the item feed.

        ---

        **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:** `RECOMMENDATIONS_V2_SECTION_RECOMMENDATIONS_READ`
      operationId: PostRecommendSectionsForUserV2
      tags:
        - Recommendations
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/recommendations-rust-all-pathClientUuid"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/recommendations-rust-all-SectionsSlotsBodySchemaV2"
        description: Definition of the requested recommendation
        required: true
      responses:
        "200":
          description: Section recommendations
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/recommendations-rust-all-SectionsSlotsRecommendationResponseSchemaV2"
        "404":
          $ref: "#/components/responses/recommendations-rust-all-404-no-recommendation"
        "500":
          $ref: "#/components/responses/recommendations-rust-all-500-error-occurred"
      x-snr-doc-urls:
        - /api-reference/ai-recommendations#tag/Recommendations/operation/PostRecommendSectionsForUserV2
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/recommendations/v2/recommend/items/users/%7BclientUuid%7D/sections \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"campaignId":"defaultCampaign","campaignName":"string","catalogId":"default","clientUUID":"string","contextItemIds":["string"],"includeContextItems":false,"filterRules":{"excludePurchasedItems":false,"excludePurchasedItemsSinceDays":0,"elasticExcludePurchasedItems":false,"elasticExcludePurchasedItemsSinceDays":0},"displayAttributes":"string","abTestContext":{"experimentId":0,"variantId":"string","requestedCampaignId":"string"},"params":{"source":"mobile"},"inventoryContext":{"channelIds":["string"]},"metadataCatalogId":"string","slots":[{"name":"string","attribute":{"name":"string","levelRangeModifier":0},"numRows":1,"numItems":1,"filters":"string","elasticFilters":"string"}]}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"campaignId\":\"defaultCampaign\",\"campaignName\":\"string\",\"catalogId\":\"default\",\"clientUUID\":\"string\",\"contextItemIds\":[\"string\"],\"includeContextItems\":false,\"filterRules\":{\"excludePurchasedItems\":false,\"excludePurchasedItemsSinceDays\":0,\"elasticExcludePurchasedItems\":false,\"elasticExcludePurchasedItemsSinceDays\":0},\"displayAttributes\":\"string\",\"abTestContext\":{\"experimentId\":0,\"variantId\":\"string\",\"requestedCampaignId\":\"string\"},\"params\":{\"source\":\"mobile\"},\"inventoryContext\":{\"channelIds\":[\"string\"]},\"metadataCatalogId\":\"string\",\"slots\":[{\"name\":\"string\",\"attribute\":{\"name\":\"string\",\"levelRangeModifier\":0},\"numRows\":1,\"numItems\":1,\"filters\":\"string\",\"elasticFilters\":\"string\"}]}"

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

            conn.request("POST", "/recommendations/v2/recommend/items/users/%7BclientUuid%7D/sections", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "campaignId": "defaultCampaign",
              "campaignName": "string",
              "catalogId": "default",
              "clientUUID": "string",
              "contextItemIds": [
                "string"
              ],
              "includeContextItems": false,
              "filterRules": {
                "excludePurchasedItems": false,
                "excludePurchasedItemsSinceDays": 0,
                "elasticExcludePurchasedItems": false,
                "elasticExcludePurchasedItemsSinceDays": 0
              },
              "displayAttributes": "string",
              "abTestContext": {
                "experimentId": 0,
                "variantId": "string",
                "requestedCampaignId": "string"
              },
              "params": {
                "source": "mobile"
              },
              "inventoryContext": {
                "channelIds": [
                  "string"
                ]
              },
              "metadataCatalogId": "string",
              "slots": [
                {
                  "name": "string",
                  "attribute": {
                    "name": "string",
                    "levelRangeModifier": 0
                  },
                  "numRows": 1,
                  "numItems": 1,
                  "filters": "string",
                  "elasticFilters": "string"
                }
              ]
            });

            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/recommendations/v2/recommend/items/users/%7BclientUuid%7D/sections");
            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": "/recommendations/v2/recommend/items/users/%7BclientUuid%7D/sections",
              "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({
              campaignId: 'defaultCampaign',
              campaignName: 'string',
              catalogId: 'default',
              clientUUID: 'string',
              contextItemIds: ['string'],
              includeContextItems: false,
              filterRules: {
                excludePurchasedItems: false,
                excludePurchasedItemsSinceDays: 0,
                elasticExcludePurchasedItems: false,
                elasticExcludePurchasedItemsSinceDays: 0
              },
              displayAttributes: 'string',
              abTestContext: {experimentId: 0, variantId: 'string', requestedCampaignId: 'string'},
              params: {source: 'mobile'},
              inventoryContext: {channelIds: ['string']},
              metadataCatalogId: 'string',
              slots: [
                {
                  name: 'string',
                  attribute: {name: 'string', levelRangeModifier: 0},
                  numRows: 1,
                  numItems: 1,
                  filters: 'string',
                  elasticFilters: 'string'
                }
              ]
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/recommendations/v2/recommend/items/users/%7BclientUuid%7D/sections');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"campaignId":"defaultCampaign","campaignName":"string","catalogId":"default","clientUUID":"string","contextItemIds":["string"],"includeContextItems":false,"filterRules":{"excludePurchasedItems":false,"excludePurchasedItemsSinceDays":0,"elasticExcludePurchasedItems":false,"elasticExcludePurchasedItemsSinceDays":0},"displayAttributes":"string","abTestContext":{"experimentId":0,"variantId":"string","requestedCampaignId":"string"},"params":{"source":"mobile"},"inventoryContext":{"channelIds":["string"]},"metadataCatalogId":"string","slots":[{"name":"string","attribute":{"name":"string","levelRangeModifier":0},"numRows":1,"numItems":1,"filters":"string","elasticFilters":"string"}]}');

            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/recommendations/v2/recommend/items/users/%7BclientUuid%7D/sections")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"campaignId\":\"defaultCampaign\",\"campaignName\":\"string\",\"catalogId\":\"default\",\"clientUUID\":\"string\",\"contextItemIds\":[\"string\"],\"includeContextItems\":false,\"filterRules\":{\"excludePurchasedItems\":false,\"excludePurchasedItemsSinceDays\":0,\"elasticExcludePurchasedItems\":false,\"elasticExcludePurchasedItemsSinceDays\":0},\"displayAttributes\":\"string\",\"abTestContext\":{\"experimentId\":0,\"variantId\":\"string\",\"requestedCampaignId\":\"string\"},\"params\":{\"source\":\"mobile\"},\"inventoryContext\":{\"channelIds\":[\"string\"]},\"metadataCatalogId\":\"string\",\"slots\":[{\"name\":\"string\",\"attribute\":{\"name\":\"string\",\"levelRangeModifier\":0},\"numRows\":1,\"numItems\":1,\"filters\":\"string\",\"elasticFilters\":\"string\"}]}")
              .asString();
  /recommendations/v2/recommend/items/users/{clientUuid}/attributes:
    post:
      summary: Attribute recommendations
      description: |
        Retrieve attribute recommendations.

        **Note:** The definition of an *item* encompasses products, but also articles, images, videos, and any other entities in the item feed.

        ---

        **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:** `RECOMMENDATIONS_V2_ATTRIBUTE_RECOMMENDATIONS_READ`
      operationId: PostRecommendAttributesForUserV2
      tags:
        - Recommendations
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/recommendations-rust-all-pathClientUuid"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/recommendations-rust-all-AttributesSlotsBodySchemaV2"
        description: Definition of the requested recommendation
        required: true
      responses:
        "200":
          description: Attribute recommendations
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/recommendations-rust-all-SlotsRecommendationResponseSchemaV2"
        "404":
          $ref: "#/components/responses/recommendations-rust-all-404-no-recommendation"
        "500":
          $ref: "#/components/responses/recommendations-rust-all-500-error-occurred"
      x-snr-doc-urls:
        - /api-reference/ai-recommendations#tag/Recommendations/operation/PostRecommendAttributesForUserV2
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/recommendations/v2/recommend/items/users/%7BclientUuid%7D/attributes \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"campaignId":"defaultCampaign","campaignName":"string","catalogId":"default","clientUUID":"string","contextItemIds":["string"],"includeContextItems":false,"filterRules":{"excludePurchasedItems":false,"excludePurchasedItemsSinceDays":0,"elasticExcludePurchasedItems":false,"elasticExcludePurchasedItemsSinceDays":0},"displayAttributes":"string","abTestContext":{"experimentId":0,"variantId":"string","requestedCampaignId":"string"},"params":{"source":"mobile"},"inventoryContext":{"channelIds":["string"]},"metadataCatalogId":"string","slots":[{"name":"string","attribute":{"name":"string","levelRangeModifier":0},"minNumItems":1,"maxNumItems":5,"filters":"string","elasticFilters":"string"}]}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"campaignId\":\"defaultCampaign\",\"campaignName\":\"string\",\"catalogId\":\"default\",\"clientUUID\":\"string\",\"contextItemIds\":[\"string\"],\"includeContextItems\":false,\"filterRules\":{\"excludePurchasedItems\":false,\"excludePurchasedItemsSinceDays\":0,\"elasticExcludePurchasedItems\":false,\"elasticExcludePurchasedItemsSinceDays\":0},\"displayAttributes\":\"string\",\"abTestContext\":{\"experimentId\":0,\"variantId\":\"string\",\"requestedCampaignId\":\"string\"},\"params\":{\"source\":\"mobile\"},\"inventoryContext\":{\"channelIds\":[\"string\"]},\"metadataCatalogId\":\"string\",\"slots\":[{\"name\":\"string\",\"attribute\":{\"name\":\"string\",\"levelRangeModifier\":0},\"minNumItems\":1,\"maxNumItems\":5,\"filters\":\"string\",\"elasticFilters\":\"string\"}]}"

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

            conn.request("POST", "/recommendations/v2/recommend/items/users/%7BclientUuid%7D/attributes", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "campaignId": "defaultCampaign",
              "campaignName": "string",
              "catalogId": "default",
              "clientUUID": "string",
              "contextItemIds": [
                "string"
              ],
              "includeContextItems": false,
              "filterRules": {
                "excludePurchasedItems": false,
                "excludePurchasedItemsSinceDays": 0,
                "elasticExcludePurchasedItems": false,
                "elasticExcludePurchasedItemsSinceDays": 0
              },
              "displayAttributes": "string",
              "abTestContext": {
                "experimentId": 0,
                "variantId": "string",
                "requestedCampaignId": "string"
              },
              "params": {
                "source": "mobile"
              },
              "inventoryContext": {
                "channelIds": [
                  "string"
                ]
              },
              "metadataCatalogId": "string",
              "slots": [
                {
                  "name": "string",
                  "attribute": {
                    "name": "string",
                    "levelRangeModifier": 0
                  },
                  "minNumItems": 1,
                  "maxNumItems": 5,
                  "filters": "string",
                  "elasticFilters": "string"
                }
              ]
            });

            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/recommendations/v2/recommend/items/users/%7BclientUuid%7D/attributes");
            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": "/recommendations/v2/recommend/items/users/%7BclientUuid%7D/attributes",
              "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({
              campaignId: 'defaultCampaign',
              campaignName: 'string',
              catalogId: 'default',
              clientUUID: 'string',
              contextItemIds: ['string'],
              includeContextItems: false,
              filterRules: {
                excludePurchasedItems: false,
                excludePurchasedItemsSinceDays: 0,
                elasticExcludePurchasedItems: false,
                elasticExcludePurchasedItemsSinceDays: 0
              },
              displayAttributes: 'string',
              abTestContext: {experimentId: 0, variantId: 'string', requestedCampaignId: 'string'},
              params: {source: 'mobile'},
              inventoryContext: {channelIds: ['string']},
              metadataCatalogId: 'string',
              slots: [
                {
                  name: 'string',
                  attribute: {name: 'string', levelRangeModifier: 0},
                  minNumItems: 1,
                  maxNumItems: 5,
                  filters: 'string',
                  elasticFilters: 'string'
                }
              ]
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/recommendations/v2/recommend/items/users/%7BclientUuid%7D/attributes');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"campaignId":"defaultCampaign","campaignName":"string","catalogId":"default","clientUUID":"string","contextItemIds":["string"],"includeContextItems":false,"filterRules":{"excludePurchasedItems":false,"excludePurchasedItemsSinceDays":0,"elasticExcludePurchasedItems":false,"elasticExcludePurchasedItemsSinceDays":0},"displayAttributes":"string","abTestContext":{"experimentId":0,"variantId":"string","requestedCampaignId":"string"},"params":{"source":"mobile"},"inventoryContext":{"channelIds":["string"]},"metadataCatalogId":"string","slots":[{"name":"string","attribute":{"name":"string","levelRangeModifier":0},"minNumItems":1,"maxNumItems":5,"filters":"string","elasticFilters":"string"}]}');

            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/recommendations/v2/recommend/items/users/%7BclientUuid%7D/attributes")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"campaignId\":\"defaultCampaign\",\"campaignName\":\"string\",\"catalogId\":\"default\",\"clientUUID\":\"string\",\"contextItemIds\":[\"string\"],\"includeContextItems\":false,\"filterRules\":{\"excludePurchasedItems\":false,\"excludePurchasedItemsSinceDays\":0,\"elasticExcludePurchasedItems\":false,\"elasticExcludePurchasedItemsSinceDays\":0},\"displayAttributes\":\"string\",\"abTestContext\":{\"experimentId\":0,\"variantId\":\"string\",\"requestedCampaignId\":\"string\"},\"params\":{\"source\":\"mobile\"},\"inventoryContext\":{\"channelIds\":[\"string\"]},\"metadataCatalogId\":\"string\",\"slots\":[{\"name\":\"string\",\"attribute\":{\"name\":\"string\",\"levelRangeModifier\":0},\"minNumItems\":1,\"maxNumItems\":5,\"filters\":\"string\",\"elasticFilters\":\"string\"}]}")
              .asString();
  /recommendations/v2/recommend/items/users/{clientUuid}/last:
    get:
      summary: Last viewed recommendations
      description: |
        Retrieve recent item recommendations seen by a profile.

        **Note:** The definition of an *item* encompasses products, but also articles, images, videos, and any other entities in the item feed.

        ---

        **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:** `RECOMMENDATIONS_V2_LAST_VIEWED_RECOMMENDATIONS_READ`
      operationId: RecommendLastViewedForUserItems
      tags:
        - Recommendations
      security:
        - TrackerKey: []
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/recommendations-rust-all-pathClientUuid"
        - $ref: "#/components/parameters/recommendations-rust-all-recommendationsCampaignId"
        - $ref: "#/components/parameters/recommendations-rust-all-recommendationsCampaignName"
        - $ref: "#/components/parameters/recommendations-rust-all-recommendationsMinNumItems"
        - $ref: "#/components/parameters/recommendations-rust-all-recommendationsMaxNumItems"
        - $ref: "#/components/parameters/recommendations-rust-all-distinctFilter"
        - $ref: "#/components/parameters/recommendations-rust-all-recommendationsIncludeContextItems"
        - $ref: "#/components/parameters/recommendations-rust-all-params"
        - $ref: "#/components/parameters/recommendations-rust-all-inventoryChannelId"
        - $ref: "#/components/parameters/recommendations-rust-all-crossWorkspaceMode"
      responses:
        "200":
          description: Last viewed recommendations
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/recommendations-rust-all-RecommendationResponseSchemaV2"
        "404":
          $ref: "#/components/responses/recommendations-rust-all-404-no-recommendation"
        "500":
          $ref: "#/components/responses/recommendations-rust-all-500-error-occurred"
      x-snr-doc-urls:
        - /api-reference/ai-recommendations#tag/Recommendations/operation/RecommendLastViewedForUserItems
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/recommendations/v2/recommend/items/users/%7BclientUuid%7D/last?campaignId=SOME_STRING_VALUE&campaignName=SOME_STRING_VALUE&minNumItems=SOME_INTEGER_VALUE&maxNumItems=SOME_INTEGER_VALUE&distinctFilter=SOME_OBJECT_VALUE&includeContextItems=SOME_BOOLEAN_VALUE&params=source%3Amobile&inventoryChannelId=SOME_STRING_VALUE&crossWorkspaceMode=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", "/recommendations/v2/recommend/items/users/%7BclientUuid%7D/last?campaignId=SOME_STRING_VALUE&campaignName=SOME_STRING_VALUE&minNumItems=SOME_INTEGER_VALUE&maxNumItems=SOME_INTEGER_VALUE&distinctFilter=SOME_OBJECT_VALUE&includeContextItems=SOME_BOOLEAN_VALUE&params=source%3Amobile&inventoryChannelId=SOME_STRING_VALUE&crossWorkspaceMode=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/recommendations/v2/recommend/items/users/%7BclientUuid%7D/last?campaignId=SOME_STRING_VALUE&campaignName=SOME_STRING_VALUE&minNumItems=SOME_INTEGER_VALUE&maxNumItems=SOME_INTEGER_VALUE&distinctFilter=SOME_OBJECT_VALUE&includeContextItems=SOME_BOOLEAN_VALUE&params=source%3Amobile&inventoryChannelId=SOME_STRING_VALUE&crossWorkspaceMode=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": "/recommendations/v2/recommend/items/users/%7BclientUuid%7D/last?campaignId=SOME_STRING_VALUE&campaignName=SOME_STRING_VALUE&minNumItems=SOME_INTEGER_VALUE&maxNumItems=SOME_INTEGER_VALUE&distinctFilter=SOME_OBJECT_VALUE&includeContextItems=SOME_BOOLEAN_VALUE&params=source%3Amobile&inventoryChannelId=SOME_STRING_VALUE&crossWorkspaceMode=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/recommendations/v2/recommend/items/users/%7BclientUuid%7D/last');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'campaignId' => 'SOME_STRING_VALUE',
              'campaignName' => 'SOME_STRING_VALUE',
              'minNumItems' => 'SOME_INTEGER_VALUE',
              'maxNumItems' => 'SOME_INTEGER_VALUE',
              'distinctFilter' => 'SOME_OBJECT_VALUE',
              'includeContextItems' => 'SOME_BOOLEAN_VALUE',
              'params' => 'source:mobile',
              'inventoryChannelId' => 'SOME_STRING_VALUE',
              'crossWorkspaceMode' => '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/recommendations/v2/recommend/items/users/%7BclientUuid%7D/last?campaignId=SOME_STRING_VALUE&campaignName=SOME_STRING_VALUE&minNumItems=SOME_INTEGER_VALUE&maxNumItems=SOME_INTEGER_VALUE&distinctFilter=SOME_OBJECT_VALUE&includeContextItems=SOME_BOOLEAN_VALUE&params=source%3Amobile&inventoryChannelId=SOME_STRING_VALUE&crossWorkspaceMode=SOME_BOOLEAN_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    post:
      summary: Last viewed recommendations
      description: |
        Retrieve recent item recommendations seen by a profile.

        **Note:** The definition of an *item* encompasses products, but also articles, images, videos, and any other entities in the item feed.

        ---

        **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:** `RECOMMENDATIONS_V2_LAST_VIEWED_RECOMMENDATIONS_READ`
      operationId: PostRecommendLastViewedForUserItems
      tags:
        - Recommendations
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/recommendations-rust-all-pathClientUuid"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/recommendations-rust-all-SlotsBodySchemaV2"
        description: Definition of the requested recommendation
        required: true
      responses:
        "200":
          description: Last viewed recommendations
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/recommendations-rust-all-SlotsRecommendationResponseSchemaV2"
        "404":
          $ref: "#/components/responses/recommendations-rust-all-404-no-recommendation"
        "500":
          $ref: "#/components/responses/recommendations-rust-all-500-error-occurred"
      x-snr-doc-urls:
        - /api-reference/ai-recommendations#tag/Recommendations/operation/PostRecommendLastViewedForUserItems
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/recommendations/v2/recommend/items/users/%7BclientUuid%7D/last \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"campaignId":"defaultCampaign","campaignName":"string","catalogId":"default","clientUUID":"string","contextItemIds":["string"],"includeContextItems":false,"filterRules":{"excludePurchasedItems":false,"excludePurchasedItemsSinceDays":0,"elasticExcludePurchasedItems":false,"elasticExcludePurchasedItemsSinceDays":0},"displayAttributes":"string","abTestContext":{"experimentId":0,"variantId":"string","requestedCampaignId":"string"},"params":{"source":"mobile"},"inventoryContext":{"channelIds":["string"]},"keepSlotsOrder":true,"personalizeSlotsOrder":false,"sortMetric":"string","boostingParameters":{"metric":"string","strength":0.1,"personalizedBoostingStrength":0},"boostingStrategies":[{"name":"string","condition":"string","strength":1}],"crossWorkspaceMode":{"enabled":true},"slots":[{"name":"string","minNumItems":1,"maxNumItems":5,"shuffleNumItems":1,"filters":"string","elasticFilters":"string","distinctFilter":{"elastic":true,"filters":[{"field":"string","maxNumItems":0,"levelRangeModifier":0}]}}]}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"campaignId\":\"defaultCampaign\",\"campaignName\":\"string\",\"catalogId\":\"default\",\"clientUUID\":\"string\",\"contextItemIds\":[\"string\"],\"includeContextItems\":false,\"filterRules\":{\"excludePurchasedItems\":false,\"excludePurchasedItemsSinceDays\":0,\"elasticExcludePurchasedItems\":false,\"elasticExcludePurchasedItemsSinceDays\":0},\"displayAttributes\":\"string\",\"abTestContext\":{\"experimentId\":0,\"variantId\":\"string\",\"requestedCampaignId\":\"string\"},\"params\":{\"source\":\"mobile\"},\"inventoryContext\":{\"channelIds\":[\"string\"]},\"keepSlotsOrder\":true,\"personalizeSlotsOrder\":false,\"sortMetric\":\"string\",\"boostingParameters\":{\"metric\":\"string\",\"strength\":0.1,\"personalizedBoostingStrength\":0},\"boostingStrategies\":[{\"name\":\"string\",\"condition\":\"string\",\"strength\":1}],\"crossWorkspaceMode\":{\"enabled\":true},\"slots\":[{\"name\":\"string\",\"minNumItems\":1,\"maxNumItems\":5,\"shuffleNumItems\":1,\"filters\":\"string\",\"elasticFilters\":\"string\",\"distinctFilter\":{\"elastic\":true,\"filters\":[{\"field\":\"string\",\"maxNumItems\":0,\"levelRangeModifier\":0}]}}]}"

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

            conn.request("POST", "/recommendations/v2/recommend/items/users/%7BclientUuid%7D/last", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "campaignId": "defaultCampaign",
              "campaignName": "string",
              "catalogId": "default",
              "clientUUID": "string",
              "contextItemIds": [
                "string"
              ],
              "includeContextItems": false,
              "filterRules": {
                "excludePurchasedItems": false,
                "excludePurchasedItemsSinceDays": 0,
                "elasticExcludePurchasedItems": false,
                "elasticExcludePurchasedItemsSinceDays": 0
              },
              "displayAttributes": "string",
              "abTestContext": {
                "experimentId": 0,
                "variantId": "string",
                "requestedCampaignId": "string"
              },
              "params": {
                "source": "mobile"
              },
              "inventoryContext": {
                "channelIds": [
                  "string"
                ]
              },
              "keepSlotsOrder": true,
              "personalizeSlotsOrder": false,
              "sortMetric": "string",
              "boostingParameters": {
                "metric": "string",
                "strength": 0.1,
                "personalizedBoostingStrength": 0
              },
              "boostingStrategies": [
                {
                  "name": "string",
                  "condition": "string",
                  "strength": 1
                }
              ],
              "crossWorkspaceMode": {
                "enabled": true
              },
              "slots": [
                {
                  "name": "string",
                  "minNumItems": 1,
                  "maxNumItems": 5,
                  "shuffleNumItems": 1,
                  "filters": "string",
                  "elasticFilters": "string",
                  "distinctFilter": {
                    "elastic": true,
                    "filters": [
                      {
                        "field": "string",
                        "maxNumItems": 0,
                        "levelRangeModifier": 0
                      }
                    ]
                  }
                }
              ]
            });

            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/recommendations/v2/recommend/items/users/%7BclientUuid%7D/last");
            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": "/recommendations/v2/recommend/items/users/%7BclientUuid%7D/last",
              "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({
              campaignId: 'defaultCampaign',
              campaignName: 'string',
              catalogId: 'default',
              clientUUID: 'string',
              contextItemIds: ['string'],
              includeContextItems: false,
              filterRules: {
                excludePurchasedItems: false,
                excludePurchasedItemsSinceDays: 0,
                elasticExcludePurchasedItems: false,
                elasticExcludePurchasedItemsSinceDays: 0
              },
              displayAttributes: 'string',
              abTestContext: {experimentId: 0, variantId: 'string', requestedCampaignId: 'string'},
              params: {source: 'mobile'},
              inventoryContext: {channelIds: ['string']},
              keepSlotsOrder: true,
              personalizeSlotsOrder: false,
              sortMetric: 'string',
              boostingParameters: {metric: 'string', strength: 0.1, personalizedBoostingStrength: 0},
              boostingStrategies: [{name: 'string', condition: 'string', strength: 1}],
              crossWorkspaceMode: {enabled: true},
              slots: [
                {
                  name: 'string',
                  minNumItems: 1,
                  maxNumItems: 5,
                  shuffleNumItems: 1,
                  filters: 'string',
                  elasticFilters: 'string',
                  distinctFilter: {
                    elastic: true,
                    filters: [{field: 'string', maxNumItems: 0, levelRangeModifier: 0}]
                  }
                }
              ]
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/recommendations/v2/recommend/items/users/%7BclientUuid%7D/last');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"campaignId":"defaultCampaign","campaignName":"string","catalogId":"default","clientUUID":"string","contextItemIds":["string"],"includeContextItems":false,"filterRules":{"excludePurchasedItems":false,"excludePurchasedItemsSinceDays":0,"elasticExcludePurchasedItems":false,"elasticExcludePurchasedItemsSinceDays":0},"displayAttributes":"string","abTestContext":{"experimentId":0,"variantId":"string","requestedCampaignId":"string"},"params":{"source":"mobile"},"inventoryContext":{"channelIds":["string"]},"keepSlotsOrder":true,"personalizeSlotsOrder":false,"sortMetric":"string","boostingParameters":{"metric":"string","strength":0.1,"personalizedBoostingStrength":0},"boostingStrategies":[{"name":"string","condition":"string","strength":1}],"crossWorkspaceMode":{"enabled":true},"slots":[{"name":"string","minNumItems":1,"maxNumItems":5,"shuffleNumItems":1,"filters":"string","elasticFilters":"string","distinctFilter":{"elastic":true,"filters":[{"field":"string","maxNumItems":0,"levelRangeModifier":0}]}}]}');

            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/recommendations/v2/recommend/items/users/%7BclientUuid%7D/last")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"campaignId\":\"defaultCampaign\",\"campaignName\":\"string\",\"catalogId\":\"default\",\"clientUUID\":\"string\",\"contextItemIds\":[\"string\"],\"includeContextItems\":false,\"filterRules\":{\"excludePurchasedItems\":false,\"excludePurchasedItemsSinceDays\":0,\"elasticExcludePurchasedItems\":false,\"elasticExcludePurchasedItemsSinceDays\":0},\"displayAttributes\":\"string\",\"abTestContext\":{\"experimentId\":0,\"variantId\":\"string\",\"requestedCampaignId\":\"string\"},\"params\":{\"source\":\"mobile\"},\"inventoryContext\":{\"channelIds\":[\"string\"]},\"keepSlotsOrder\":true,\"personalizeSlotsOrder\":false,\"sortMetric\":\"string\",\"boostingParameters\":{\"metric\":\"string\",\"strength\":0.1,\"personalizedBoostingStrength\":0},\"boostingStrategies\":[{\"name\":\"string\",\"condition\":\"string\",\"strength\":1}],\"crossWorkspaceMode\":{\"enabled\":true},\"slots\":[{\"name\":\"string\",\"minNumItems\":1,\"maxNumItems\":5,\"shuffleNumItems\":1,\"filters\":\"string\",\"elasticFilters\":\"string\",\"distinctFilter\":{\"elastic\":true,\"filters\":[{\"field\":\"string\",\"maxNumItems\":0,\"levelRangeModifier\":0}]}}]}")
              .asString();
  /recommendations/v2/recommend/items/users/{clientUuid}/aggregates/{aggregateUUID}:
    get:
      summary: Recent interactions recommendations
      description: |
        Retrieve recent interactions recommendations for a profile.

        **Note:** The definition of an *item* encompasses products, but also articles, images, videos, and any other entities in the item feed.

        ---

        **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:** `RECOMMENDATIONS_V2_RECENT_INTERACTIONS_RECOMMENDATIONS_READ`
      operationId: GetRecommendRecentInteractions
      tags:
        - Recommendations
      security:
        - TrackerKey: []
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/recommendations-rust-all-pathClientUuid"
        - $ref: "#/components/parameters/recommendations-rust-all-pathAggregateUuid"
        - $ref: "#/components/parameters/recommendations-rust-all-recommendationsCampaignId"
        - $ref: "#/components/parameters/recommendations-rust-all-recommendationsCampaignName"
        - $ref: "#/components/parameters/recommendations-rust-all-recommendationsMinNumItems"
        - $ref: "#/components/parameters/recommendations-rust-all-recommendationsMaxNumItems"
        - $ref: "#/components/parameters/recommendations-rust-all-distinctFilter"
        - $ref: "#/components/parameters/recommendations-rust-all-recommendationsIncludeContextItems"
        - $ref: "#/components/parameters/recommendations-rust-all-params"
        - $ref: "#/components/parameters/recommendations-rust-all-inventoryChannelId"
        - $ref: "#/components/parameters/recommendations-rust-all-crossWorkspaceMode"
      responses:
        "200":
          description: Recent interactions recommendations
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/recommendations-rust-all-RecommendationResponseSchemaV2"
        "404":
          $ref: "#/components/responses/recommendations-rust-all-404-no-recommendation"
        "500":
          $ref: "#/components/responses/recommendations-rust-all-500-error-occurred"
      x-snr-doc-urls:
        - /api-reference/ai-recommendations#tag/Recommendations/operation/GetRecommendRecentInteractions
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/recommendations/v2/recommend/items/users/%7BclientUuid%7D/aggregates/%7BaggregateUUID%7D?campaignId=SOME_STRING_VALUE&campaignName=SOME_STRING_VALUE&minNumItems=SOME_INTEGER_VALUE&maxNumItems=SOME_INTEGER_VALUE&distinctFilter=SOME_OBJECT_VALUE&includeContextItems=SOME_BOOLEAN_VALUE&params=source%3Amobile&inventoryChannelId=SOME_STRING_VALUE&crossWorkspaceMode=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", "/recommendations/v2/recommend/items/users/%7BclientUuid%7D/aggregates/%7BaggregateUUID%7D?campaignId=SOME_STRING_VALUE&campaignName=SOME_STRING_VALUE&minNumItems=SOME_INTEGER_VALUE&maxNumItems=SOME_INTEGER_VALUE&distinctFilter=SOME_OBJECT_VALUE&includeContextItems=SOME_BOOLEAN_VALUE&params=source%3Amobile&inventoryChannelId=SOME_STRING_VALUE&crossWorkspaceMode=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/recommendations/v2/recommend/items/users/%7BclientUuid%7D/aggregates/%7BaggregateUUID%7D?campaignId=SOME_STRING_VALUE&campaignName=SOME_STRING_VALUE&minNumItems=SOME_INTEGER_VALUE&maxNumItems=SOME_INTEGER_VALUE&distinctFilter=SOME_OBJECT_VALUE&includeContextItems=SOME_BOOLEAN_VALUE&params=source%3Amobile&inventoryChannelId=SOME_STRING_VALUE&crossWorkspaceMode=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": "/recommendations/v2/recommend/items/users/%7BclientUuid%7D/aggregates/%7BaggregateUUID%7D?campaignId=SOME_STRING_VALUE&campaignName=SOME_STRING_VALUE&minNumItems=SOME_INTEGER_VALUE&maxNumItems=SOME_INTEGER_VALUE&distinctFilter=SOME_OBJECT_VALUE&includeContextItems=SOME_BOOLEAN_VALUE&params=source%3Amobile&inventoryChannelId=SOME_STRING_VALUE&crossWorkspaceMode=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/recommendations/v2/recommend/items/users/%7BclientUuid%7D/aggregates/%7BaggregateUUID%7D');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'campaignId' => 'SOME_STRING_VALUE',
              'campaignName' => 'SOME_STRING_VALUE',
              'minNumItems' => 'SOME_INTEGER_VALUE',
              'maxNumItems' => 'SOME_INTEGER_VALUE',
              'distinctFilter' => 'SOME_OBJECT_VALUE',
              'includeContextItems' => 'SOME_BOOLEAN_VALUE',
              'params' => 'source:mobile',
              'inventoryChannelId' => 'SOME_STRING_VALUE',
              'crossWorkspaceMode' => '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/recommendations/v2/recommend/items/users/%7BclientUuid%7D/aggregates/%7BaggregateUUID%7D?campaignId=SOME_STRING_VALUE&campaignName=SOME_STRING_VALUE&minNumItems=SOME_INTEGER_VALUE&maxNumItems=SOME_INTEGER_VALUE&distinctFilter=SOME_OBJECT_VALUE&includeContextItems=SOME_BOOLEAN_VALUE&params=source%3Amobile&inventoryChannelId=SOME_STRING_VALUE&crossWorkspaceMode=SOME_BOOLEAN_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    post:
      summary: Recent interactions recommendations
      description: |
        Retrieve recent interactions recommendations for a profile.

        **Note:** The definition of an *item* encompasses products, but also articles, images, videos, and any other entities in the item feed.

        ---

        **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:** `RECOMMENDATIONS_V2_RECENT_INTERACTIONS_RECOMMENDATIONS_READ`
      operationId: PostRecommendRecentInteractions
      tags:
        - Recommendations
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/recommendations-rust-all-pathClientUuid"
        - $ref: "#/components/parameters/recommendations-rust-all-pathAggregateUuid"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/recommendations-rust-all-SlotsBodySchemaV2"
        description: Definition of the requested recommendation
        required: true
      responses:
        "200":
          description: Recent interactions recommendations
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/recommendations-rust-all-SlotsRecommendationResponseSchemaV2"
        "404":
          $ref: "#/components/responses/recommendations-rust-all-404-no-recommendation"
        "500":
          $ref: "#/components/responses/recommendations-rust-all-500-error-occurred"
      x-snr-doc-urls:
        - /api-reference/ai-recommendations#tag/Recommendations/operation/PostRecommendRecentInteractions
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/recommendations/v2/recommend/items/users/%7BclientUuid%7D/aggregates/%7BaggregateUUID%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"campaignId":"defaultCampaign","campaignName":"string","catalogId":"default","clientUUID":"string","contextItemIds":["string"],"includeContextItems":false,"filterRules":{"excludePurchasedItems":false,"excludePurchasedItemsSinceDays":0,"elasticExcludePurchasedItems":false,"elasticExcludePurchasedItemsSinceDays":0},"displayAttributes":"string","abTestContext":{"experimentId":0,"variantId":"string","requestedCampaignId":"string"},"params":{"source":"mobile"},"inventoryContext":{"channelIds":["string"]},"keepSlotsOrder":true,"personalizeSlotsOrder":false,"sortMetric":"string","boostingParameters":{"metric":"string","strength":0.1,"personalizedBoostingStrength":0},"boostingStrategies":[{"name":"string","condition":"string","strength":1}],"crossWorkspaceMode":{"enabled":true},"slots":[{"name":"string","minNumItems":1,"maxNumItems":5,"shuffleNumItems":1,"filters":"string","elasticFilters":"string","distinctFilter":{"elastic":true,"filters":[{"field":"string","maxNumItems":0,"levelRangeModifier":0}]}}]}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"campaignId\":\"defaultCampaign\",\"campaignName\":\"string\",\"catalogId\":\"default\",\"clientUUID\":\"string\",\"contextItemIds\":[\"string\"],\"includeContextItems\":false,\"filterRules\":{\"excludePurchasedItems\":false,\"excludePurchasedItemsSinceDays\":0,\"elasticExcludePurchasedItems\":false,\"elasticExcludePurchasedItemsSinceDays\":0},\"displayAttributes\":\"string\",\"abTestContext\":{\"experimentId\":0,\"variantId\":\"string\",\"requestedCampaignId\":\"string\"},\"params\":{\"source\":\"mobile\"},\"inventoryContext\":{\"channelIds\":[\"string\"]},\"keepSlotsOrder\":true,\"personalizeSlotsOrder\":false,\"sortMetric\":\"string\",\"boostingParameters\":{\"metric\":\"string\",\"strength\":0.1,\"personalizedBoostingStrength\":0},\"boostingStrategies\":[{\"name\":\"string\",\"condition\":\"string\",\"strength\":1}],\"crossWorkspaceMode\":{\"enabled\":true},\"slots\":[{\"name\":\"string\",\"minNumItems\":1,\"maxNumItems\":5,\"shuffleNumItems\":1,\"filters\":\"string\",\"elasticFilters\":\"string\",\"distinctFilter\":{\"elastic\":true,\"filters\":[{\"field\":\"string\",\"maxNumItems\":0,\"levelRangeModifier\":0}]}}]}"

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

            conn.request("POST", "/recommendations/v2/recommend/items/users/%7BclientUuid%7D/aggregates/%7BaggregateUUID%7D", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "campaignId": "defaultCampaign",
              "campaignName": "string",
              "catalogId": "default",
              "clientUUID": "string",
              "contextItemIds": [
                "string"
              ],
              "includeContextItems": false,
              "filterRules": {
                "excludePurchasedItems": false,
                "excludePurchasedItemsSinceDays": 0,
                "elasticExcludePurchasedItems": false,
                "elasticExcludePurchasedItemsSinceDays": 0
              },
              "displayAttributes": "string",
              "abTestContext": {
                "experimentId": 0,
                "variantId": "string",
                "requestedCampaignId": "string"
              },
              "params": {
                "source": "mobile"
              },
              "inventoryContext": {
                "channelIds": [
                  "string"
                ]
              },
              "keepSlotsOrder": true,
              "personalizeSlotsOrder": false,
              "sortMetric": "string",
              "boostingParameters": {
                "metric": "string",
                "strength": 0.1,
                "personalizedBoostingStrength": 0
              },
              "boostingStrategies": [
                {
                  "name": "string",
                  "condition": "string",
                  "strength": 1
                }
              ],
              "crossWorkspaceMode": {
                "enabled": true
              },
              "slots": [
                {
                  "name": "string",
                  "minNumItems": 1,
                  "maxNumItems": 5,
                  "shuffleNumItems": 1,
                  "filters": "string",
                  "elasticFilters": "string",
                  "distinctFilter": {
                    "elastic": true,
                    "filters": [
                      {
                        "field": "string",
                        "maxNumItems": 0,
                        "levelRangeModifier": 0
                      }
                    ]
                  }
                }
              ]
            });

            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/recommendations/v2/recommend/items/users/%7BclientUuid%7D/aggregates/%7BaggregateUUID%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": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/recommendations/v2/recommend/items/users/%7BclientUuid%7D/aggregates/%7BaggregateUUID%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({
              campaignId: 'defaultCampaign',
              campaignName: 'string',
              catalogId: 'default',
              clientUUID: 'string',
              contextItemIds: ['string'],
              includeContextItems: false,
              filterRules: {
                excludePurchasedItems: false,
                excludePurchasedItemsSinceDays: 0,
                elasticExcludePurchasedItems: false,
                elasticExcludePurchasedItemsSinceDays: 0
              },
              displayAttributes: 'string',
              abTestContext: {experimentId: 0, variantId: 'string', requestedCampaignId: 'string'},
              params: {source: 'mobile'},
              inventoryContext: {channelIds: ['string']},
              keepSlotsOrder: true,
              personalizeSlotsOrder: false,
              sortMetric: 'string',
              boostingParameters: {metric: 'string', strength: 0.1, personalizedBoostingStrength: 0},
              boostingStrategies: [{name: 'string', condition: 'string', strength: 1}],
              crossWorkspaceMode: {enabled: true},
              slots: [
                {
                  name: 'string',
                  minNumItems: 1,
                  maxNumItems: 5,
                  shuffleNumItems: 1,
                  filters: 'string',
                  elasticFilters: 'string',
                  distinctFilter: {
                    elastic: true,
                    filters: [{field: 'string', maxNumItems: 0, levelRangeModifier: 0}]
                  }
                }
              ]
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/recommendations/v2/recommend/items/users/%7BclientUuid%7D/aggregates/%7BaggregateUUID%7D');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"campaignId":"defaultCampaign","campaignName":"string","catalogId":"default","clientUUID":"string","contextItemIds":["string"],"includeContextItems":false,"filterRules":{"excludePurchasedItems":false,"excludePurchasedItemsSinceDays":0,"elasticExcludePurchasedItems":false,"elasticExcludePurchasedItemsSinceDays":0},"displayAttributes":"string","abTestContext":{"experimentId":0,"variantId":"string","requestedCampaignId":"string"},"params":{"source":"mobile"},"inventoryContext":{"channelIds":["string"]},"keepSlotsOrder":true,"personalizeSlotsOrder":false,"sortMetric":"string","boostingParameters":{"metric":"string","strength":0.1,"personalizedBoostingStrength":0},"boostingStrategies":[{"name":"string","condition":"string","strength":1}],"crossWorkspaceMode":{"enabled":true},"slots":[{"name":"string","minNumItems":1,"maxNumItems":5,"shuffleNumItems":1,"filters":"string","elasticFilters":"string","distinctFilter":{"elastic":true,"filters":[{"field":"string","maxNumItems":0,"levelRangeModifier":0}]}}]}');

            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/recommendations/v2/recommend/items/users/%7BclientUuid%7D/aggregates/%7BaggregateUUID%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"campaignId\":\"defaultCampaign\",\"campaignName\":\"string\",\"catalogId\":\"default\",\"clientUUID\":\"string\",\"contextItemIds\":[\"string\"],\"includeContextItems\":false,\"filterRules\":{\"excludePurchasedItems\":false,\"excludePurchasedItemsSinceDays\":0,\"elasticExcludePurchasedItems\":false,\"elasticExcludePurchasedItemsSinceDays\":0},\"displayAttributes\":\"string\",\"abTestContext\":{\"experimentId\":0,\"variantId\":\"string\",\"requestedCampaignId\":\"string\"},\"params\":{\"source\":\"mobile\"},\"inventoryContext\":{\"channelIds\":[\"string\"]},\"keepSlotsOrder\":true,\"personalizeSlotsOrder\":false,\"sortMetric\":\"string\",\"boostingParameters\":{\"metric\":\"string\",\"strength\":0.1,\"personalizedBoostingStrength\":0},\"boostingStrategies\":[{\"name\":\"string\",\"condition\":\"string\",\"strength\":1}],\"crossWorkspaceMode\":{\"enabled\":true},\"slots\":[{\"name\":\"string\",\"minNumItems\":1,\"maxNumItems\":5,\"shuffleNumItems\":1,\"filters\":\"string\",\"elasticFilters\":\"string\",\"distinctFilter\":{\"elastic\":true,\"filters\":[{\"field\":\"string\",\"maxNumItems\":0,\"levelRangeModifier\":0}]}}]}")
              .asString();
  /recommendations/v2/recommend/items/metric:
    get:
      summary: Scoring by metric
      description: |
        Returns items with the highest score of a chosen metric. A list of available metrics can be checked by using [this endpoint](https://developers.synerise.com/AnalyticsSuite/AnalyticsSuite.html#operation/ApiGetAvailableMetricsV2).

        **Note:** The definition of an *item* encompasses products, but also articles, images, videos, and any other entities in the item feed.

        ---

        **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:** `RECOMMENDATIONS_V2_METRICS_RECOMMENDATIONS_READ`
      operationId: GetItemsByMetric
      tags:
        - Recommendations
      security:
        - TrackerKey: []
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/recommendations-rust-all-recommendationsSortMetric"
        - $ref: "#/components/parameters/recommendations-rust-all-recommendationsMinNumItems"
        - $ref: "#/components/parameters/recommendations-rust-all-recommendationsMaxNumItems"
        - $ref: "#/components/parameters/recommendations-rust-all-recommendationsCampaignId"
        - $ref: "#/components/parameters/recommendations-rust-all-recommendationsCampaignName"
        - $ref: "#/components/parameters/recommendations-rust-all-recommendationsClientUUID"
        - $ref: "#/components/parameters/recommendations-rust-all-inParamsItemId"
        - $ref: "#/components/parameters/recommendations-rust-all-recommendationsExcludePurchasedItems"
        - $ref: "#/components/parameters/recommendations-rust-all-recommendationsExcludePurchasedItemsSince"
        - $ref: "#/components/parameters/recommendations-rust-all-filterExpr"
        - $ref: "#/components/parameters/recommendations-rust-all-elasticFilterExpr"
        - $ref: "#/components/parameters/recommendations-rust-all-itemCatalogId"
        - $ref: "#/components/parameters/recommendations-rust-all-distinctFilter"
        - $ref: "#/components/parameters/recommendations-rust-all-recommendationsIncludeContextItems"
        - $ref: "#/components/parameters/recommendations-rust-all-params"
        - $ref: "#/components/parameters/recommendations-rust-all-inventoryChannelId"
        - $ref: "#/components/parameters/recommendations-rust-all-crossWorkspaceMode"
      responses:
        "200":
          description: Items with the highest metric scores
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/recommendations-rust-all-RecommendationResponseSchemaV2"
        "404":
          $ref: "#/components/responses/recommendations-rust-all-404-no-recommendation"
        "500":
          $ref: "#/components/responses/recommendations-rust-all-500-error-occurred"
      x-snr-doc-urls:
        - /api-reference/ai-recommendations#tag/Recommendations/operation/GetItemsByMetric
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/recommendations/v2/recommend/items/metric?sortMetric=SOME_STRING_VALUE&minNumItems=SOME_INTEGER_VALUE&maxNumItems=SOME_INTEGER_VALUE&campaignId=SOME_STRING_VALUE&campaignName=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&itemId=SOME_STRING_VALUE&excludePurchasedItems=SOME_BOOLEAN_VALUE&excludePurchasedItemsSinceDays=SOME_INTEGER_VALUE&filters=SOME_STRING_VALUE&elastic%3Afilters=SOME_STRING_VALUE&itemCatalogId=SOME_STRING_VALUE&distinctFilter=SOME_OBJECT_VALUE&includeContextItems=SOME_BOOLEAN_VALUE&params=source%3Amobile&inventoryChannelId=SOME_STRING_VALUE&crossWorkspaceMode=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", "/recommendations/v2/recommend/items/metric?sortMetric=SOME_STRING_VALUE&minNumItems=SOME_INTEGER_VALUE&maxNumItems=SOME_INTEGER_VALUE&campaignId=SOME_STRING_VALUE&campaignName=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&itemId=SOME_STRING_VALUE&excludePurchasedItems=SOME_BOOLEAN_VALUE&excludePurchasedItemsSinceDays=SOME_INTEGER_VALUE&filters=SOME_STRING_VALUE&elastic%3Afilters=SOME_STRING_VALUE&itemCatalogId=SOME_STRING_VALUE&distinctFilter=SOME_OBJECT_VALUE&includeContextItems=SOME_BOOLEAN_VALUE&params=source%3Amobile&inventoryChannelId=SOME_STRING_VALUE&crossWorkspaceMode=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/recommendations/v2/recommend/items/metric?sortMetric=SOME_STRING_VALUE&minNumItems=SOME_INTEGER_VALUE&maxNumItems=SOME_INTEGER_VALUE&campaignId=SOME_STRING_VALUE&campaignName=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&itemId=SOME_STRING_VALUE&excludePurchasedItems=SOME_BOOLEAN_VALUE&excludePurchasedItemsSinceDays=SOME_INTEGER_VALUE&filters=SOME_STRING_VALUE&elastic%3Afilters=SOME_STRING_VALUE&itemCatalogId=SOME_STRING_VALUE&distinctFilter=SOME_OBJECT_VALUE&includeContextItems=SOME_BOOLEAN_VALUE&params=source%3Amobile&inventoryChannelId=SOME_STRING_VALUE&crossWorkspaceMode=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": "/recommendations/v2/recommend/items/metric?sortMetric=SOME_STRING_VALUE&minNumItems=SOME_INTEGER_VALUE&maxNumItems=SOME_INTEGER_VALUE&campaignId=SOME_STRING_VALUE&campaignName=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&itemId=SOME_STRING_VALUE&excludePurchasedItems=SOME_BOOLEAN_VALUE&excludePurchasedItemsSinceDays=SOME_INTEGER_VALUE&filters=SOME_STRING_VALUE&elastic%3Afilters=SOME_STRING_VALUE&itemCatalogId=SOME_STRING_VALUE&distinctFilter=SOME_OBJECT_VALUE&includeContextItems=SOME_BOOLEAN_VALUE&params=source%3Amobile&inventoryChannelId=SOME_STRING_VALUE&crossWorkspaceMode=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/recommendations/v2/recommend/items/metric');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'sortMetric' => 'SOME_STRING_VALUE',
              'minNumItems' => 'SOME_INTEGER_VALUE',
              'maxNumItems' => 'SOME_INTEGER_VALUE',
              'campaignId' => 'SOME_STRING_VALUE',
              'campaignName' => 'SOME_STRING_VALUE',
              'clientUUID' => 'SOME_STRING_VALUE',
              'itemId' => 'SOME_STRING_VALUE',
              'excludePurchasedItems' => 'SOME_BOOLEAN_VALUE',
              'excludePurchasedItemsSinceDays' => 'SOME_INTEGER_VALUE',
              'filters' => 'SOME_STRING_VALUE',
              'elastic:filters' => 'SOME_STRING_VALUE',
              'itemCatalogId' => 'SOME_STRING_VALUE',
              'distinctFilter' => 'SOME_OBJECT_VALUE',
              'includeContextItems' => 'SOME_BOOLEAN_VALUE',
              'params' => 'source:mobile',
              'inventoryChannelId' => 'SOME_STRING_VALUE',
              'crossWorkspaceMode' => '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/recommendations/v2/recommend/items/metric?sortMetric=SOME_STRING_VALUE&minNumItems=SOME_INTEGER_VALUE&maxNumItems=SOME_INTEGER_VALUE&campaignId=SOME_STRING_VALUE&campaignName=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&itemId=SOME_STRING_VALUE&excludePurchasedItems=SOME_BOOLEAN_VALUE&excludePurchasedItemsSinceDays=SOME_INTEGER_VALUE&filters=SOME_STRING_VALUE&elastic%3Afilters=SOME_STRING_VALUE&itemCatalogId=SOME_STRING_VALUE&distinctFilter=SOME_OBJECT_VALUE&includeContextItems=SOME_BOOLEAN_VALUE&params=source%3Amobile&inventoryChannelId=SOME_STRING_VALUE&crossWorkspaceMode=SOME_BOOLEAN_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    post:
      summary: Scoring by metric
      description: |
        Returns items with the highest score of a chosen metric. A list of available metrics can be checked by using [this endpoint](https://developers.synerise.com/AnalyticsSuite/AnalyticsSuite.html#operation/ApiGetAvailableMetricsV2).

        **Note:** The definition of an *item* encompasses products, but also articles, images, videos, and any other entities in the item feed.

        ---

        **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:** `RECOMMENDATIONS_V2_METRICS_RECOMMENDATIONS_READ`
      operationId: PostItemsByMetric
      tags:
        - Recommendations
      security:
        - TrackerKey: []
        - JWT: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/recommendations-rust-all-MetricsBodySchemaV2"
        description: Definition of the requested recommendation
        required: true
      responses:
        "200":
          description: Items with the highest metric scores
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/recommendations-rust-all-SlotsRecommendationResponseSchemaV2"
        "404":
          $ref: "#/components/responses/recommendations-rust-all-404-no-recommendation"
        "500":
          $ref: "#/components/responses/recommendations-rust-all-500-error-occurred"
      x-snr-doc-urls:
        - /api-reference/ai-recommendations#tag/Recommendations/operation/PostItemsByMetric
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/recommendations/v2/recommend/items/metric \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"campaignId":"defaultCampaign","campaignName":"string","catalogId":"default","clientUUID":"string","contextItemIds":["string"],"includeContextItems":false,"filterRules":{"excludePurchasedItems":false,"excludePurchasedItemsSinceDays":0,"elasticExcludePurchasedItems":false,"elasticExcludePurchasedItemsSinceDays":0},"displayAttributes":"string","abTestContext":{"experimentId":0,"variantId":"string","requestedCampaignId":"string"},"params":{"source":"mobile"},"inventoryContext":{"channelIds":["string"]},"keepSlotsOrder":true,"personalizeSlotsOrder":false,"sortMetric":"string","boostingParameters":{"metric":"string","strength":0.1,"personalizedBoostingStrength":0},"boostingStrategies":[{"name":"string","condition":"string","strength":1}],"crossWorkspaceMode":{"enabled":true},"slots":[{"name":"string","minNumItems":1,"maxNumItems":5,"shuffleNumItems":1,"filters":"string","elasticFilters":"string","distinctFilter":{"elastic":true,"filters":[{"field":"string","maxNumItems":0,"levelRangeModifier":0}]}}]}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"campaignId\":\"defaultCampaign\",\"campaignName\":\"string\",\"catalogId\":\"default\",\"clientUUID\":\"string\",\"contextItemIds\":[\"string\"],\"includeContextItems\":false,\"filterRules\":{\"excludePurchasedItems\":false,\"excludePurchasedItemsSinceDays\":0,\"elasticExcludePurchasedItems\":false,\"elasticExcludePurchasedItemsSinceDays\":0},\"displayAttributes\":\"string\",\"abTestContext\":{\"experimentId\":0,\"variantId\":\"string\",\"requestedCampaignId\":\"string\"},\"params\":{\"source\":\"mobile\"},\"inventoryContext\":{\"channelIds\":[\"string\"]},\"keepSlotsOrder\":true,\"personalizeSlotsOrder\":false,\"sortMetric\":\"string\",\"boostingParameters\":{\"metric\":\"string\",\"strength\":0.1,\"personalizedBoostingStrength\":0},\"boostingStrategies\":[{\"name\":\"string\",\"condition\":\"string\",\"strength\":1}],\"crossWorkspaceMode\":{\"enabled\":true},\"slots\":[{\"name\":\"string\",\"minNumItems\":1,\"maxNumItems\":5,\"shuffleNumItems\":1,\"filters\":\"string\",\"elasticFilters\":\"string\",\"distinctFilter\":{\"elastic\":true,\"filters\":[{\"field\":\"string\",\"maxNumItems\":0,\"levelRangeModifier\":0}]}}]}"

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

            conn.request("POST", "/recommendations/v2/recommend/items/metric", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "campaignId": "defaultCampaign",
              "campaignName": "string",
              "catalogId": "default",
              "clientUUID": "string",
              "contextItemIds": [
                "string"
              ],
              "includeContextItems": false,
              "filterRules": {
                "excludePurchasedItems": false,
                "excludePurchasedItemsSinceDays": 0,
                "elasticExcludePurchasedItems": false,
                "elasticExcludePurchasedItemsSinceDays": 0
              },
              "displayAttributes": "string",
              "abTestContext": {
                "experimentId": 0,
                "variantId": "string",
                "requestedCampaignId": "string"
              },
              "params": {
                "source": "mobile"
              },
              "inventoryContext": {
                "channelIds": [
                  "string"
                ]
              },
              "keepSlotsOrder": true,
              "personalizeSlotsOrder": false,
              "sortMetric": "string",
              "boostingParameters": {
                "metric": "string",
                "strength": 0.1,
                "personalizedBoostingStrength": 0
              },
              "boostingStrategies": [
                {
                  "name": "string",
                  "condition": "string",
                  "strength": 1
                }
              ],
              "crossWorkspaceMode": {
                "enabled": true
              },
              "slots": [
                {
                  "name": "string",
                  "minNumItems": 1,
                  "maxNumItems": 5,
                  "shuffleNumItems": 1,
                  "filters": "string",
                  "elasticFilters": "string",
                  "distinctFilter": {
                    "elastic": true,
                    "filters": [
                      {
                        "field": "string",
                        "maxNumItems": 0,
                        "levelRangeModifier": 0
                      }
                    ]
                  }
                }
              ]
            });

            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/recommendations/v2/recommend/items/metric");
            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": "/recommendations/v2/recommend/items/metric",
              "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({
              campaignId: 'defaultCampaign',
              campaignName: 'string',
              catalogId: 'default',
              clientUUID: 'string',
              contextItemIds: ['string'],
              includeContextItems: false,
              filterRules: {
                excludePurchasedItems: false,
                excludePurchasedItemsSinceDays: 0,
                elasticExcludePurchasedItems: false,
                elasticExcludePurchasedItemsSinceDays: 0
              },
              displayAttributes: 'string',
              abTestContext: {experimentId: 0, variantId: 'string', requestedCampaignId: 'string'},
              params: {source: 'mobile'},
              inventoryContext: {channelIds: ['string']},
              keepSlotsOrder: true,
              personalizeSlotsOrder: false,
              sortMetric: 'string',
              boostingParameters: {metric: 'string', strength: 0.1, personalizedBoostingStrength: 0},
              boostingStrategies: [{name: 'string', condition: 'string', strength: 1}],
              crossWorkspaceMode: {enabled: true},
              slots: [
                {
                  name: 'string',
                  minNumItems: 1,
                  maxNumItems: 5,
                  shuffleNumItems: 1,
                  filters: 'string',
                  elasticFilters: 'string',
                  distinctFilter: {
                    elastic: true,
                    filters: [{field: 'string', maxNumItems: 0, levelRangeModifier: 0}]
                  }
                }
              ]
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/recommendations/v2/recommend/items/metric');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"campaignId":"defaultCampaign","campaignName":"string","catalogId":"default","clientUUID":"string","contextItemIds":["string"],"includeContextItems":false,"filterRules":{"excludePurchasedItems":false,"excludePurchasedItemsSinceDays":0,"elasticExcludePurchasedItems":false,"elasticExcludePurchasedItemsSinceDays":0},"displayAttributes":"string","abTestContext":{"experimentId":0,"variantId":"string","requestedCampaignId":"string"},"params":{"source":"mobile"},"inventoryContext":{"channelIds":["string"]},"keepSlotsOrder":true,"personalizeSlotsOrder":false,"sortMetric":"string","boostingParameters":{"metric":"string","strength":0.1,"personalizedBoostingStrength":0},"boostingStrategies":[{"name":"string","condition":"string","strength":1}],"crossWorkspaceMode":{"enabled":true},"slots":[{"name":"string","minNumItems":1,"maxNumItems":5,"shuffleNumItems":1,"filters":"string","elasticFilters":"string","distinctFilter":{"elastic":true,"filters":[{"field":"string","maxNumItems":0,"levelRangeModifier":0}]}}]}');

            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/recommendations/v2/recommend/items/metric")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"campaignId\":\"defaultCampaign\",\"campaignName\":\"string\",\"catalogId\":\"default\",\"clientUUID\":\"string\",\"contextItemIds\":[\"string\"],\"includeContextItems\":false,\"filterRules\":{\"excludePurchasedItems\":false,\"excludePurchasedItemsSinceDays\":0,\"elasticExcludePurchasedItems\":false,\"elasticExcludePurchasedItemsSinceDays\":0},\"displayAttributes\":\"string\",\"abTestContext\":{\"experimentId\":0,\"variantId\":\"string\",\"requestedCampaignId\":\"string\"},\"params\":{\"source\":\"mobile\"},\"inventoryContext\":{\"channelIds\":[\"string\"]},\"keepSlotsOrder\":true,\"personalizeSlotsOrder\":false,\"sortMetric\":\"string\",\"boostingParameters\":{\"metric\":\"string\",\"strength\":0.1,\"personalizedBoostingStrength\":0},\"boostingStrategies\":[{\"name\":\"string\",\"condition\":\"string\",\"strength\":1}],\"crossWorkspaceMode\":{\"enabled\":true},\"slots\":[{\"name\":\"string\",\"minNumItems\":1,\"maxNumItems\":5,\"shuffleNumItems\":1,\"filters\":\"string\",\"elasticFilters\":\"string\",\"distinctFilter\":{\"elastic\":true,\"filters\":[{\"field\":\"string\",\"maxNumItems\":0,\"levelRangeModifier\":0}]}}]}")
              .asString();
  /recommendations/v2/recommend/items/complementary:
    get:
      summary: Complementary items for a cart
      description: |
        Show recommendations based on the contents of a cart.

        **Note:** The definition of an *item* encompasses products, but also articles, images, videos, and any other entities in the item feed.

        ---

        **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:** `RECOMMENDATIONS_V2_COMPLEMENTARY_RECOMMENDATIONS_READ`
      operationId: ComplementItems
      tags:
        - Recommendations
      security:
        - TrackerKey: []
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/recommendations-rust-all-recommendationsClientUUID"
        - $ref: "#/components/parameters/recommendations-rust-all-recommendationsMinNumItems"
        - $ref: "#/components/parameters/recommendations-rust-all-recommendationsMaxNumItems"
        - $ref: "#/components/parameters/recommendations-rust-all-recommendationsCampaignId"
        - $ref: "#/components/parameters/recommendations-rust-all-recommendationsCampaignName"
        - $ref: "#/components/parameters/recommendations-rust-all-recommendationsExcludePurchasedItems"
        - $ref: "#/components/parameters/recommendations-rust-all-recommendationsExcludePurchasedItemsSince"
        - $ref: "#/components/parameters/recommendations-rust-all-filterExpr"
        - $ref: "#/components/parameters/recommendations-rust-all-elasticFilterExpr"
        - $ref: "#/components/parameters/recommendations-rust-all-inParamsItemIdList"
        - $ref: "#/components/parameters/recommendations-rust-all-itemCatalogId"
        - $ref: "#/components/parameters/recommendations-rust-all-recommendationsBoostMetric"
        - $ref: "#/components/parameters/recommendations-rust-all-recommendationsSortMetric"
        - $ref: "#/components/parameters/recommendations-rust-all-distinctFilter"
        - $ref: "#/components/parameters/recommendations-rust-all-recommendationsIncludeContextItems"
        - $ref: "#/components/parameters/recommendations-rust-all-params"
        - $ref: "#/components/parameters/recommendations-rust-all-inventoryChannelId"
        - $ref: "#/components/parameters/recommendations-rust-all-crossWorkspaceMode"
      responses:
        "200":
          description: Cart complementary recommendations
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/recommendations-rust-all-RecommendationResponseSchemaV2"
        "404":
          $ref: "#/components/responses/recommendations-rust-all-404-no-recommendation"
        "500":
          $ref: "#/components/responses/recommendations-rust-all-500-error-occurred"
      x-snr-doc-urls:
        - /api-reference/ai-recommendations#tag/Recommendations/operation/ComplementItems
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/recommendations/v2/recommend/items/complementary?clientUUID=SOME_STRING_VALUE&minNumItems=SOME_INTEGER_VALUE&maxNumItems=SOME_INTEGER_VALUE&campaignId=SOME_STRING_VALUE&campaignName=SOME_STRING_VALUE&excludePurchasedItems=SOME_BOOLEAN_VALUE&excludePurchasedItemsSinceDays=SOME_INTEGER_VALUE&filters=SOME_STRING_VALUE&elastic%3Afilters=SOME_STRING_VALUE&itemId=SOME_ARRAY_VALUE&itemCatalogId=SOME_STRING_VALUE&boostMetric=SOME_STRING_VALUE&sortMetric=SOME_STRING_VALUE&distinctFilter=SOME_OBJECT_VALUE&includeContextItems=SOME_BOOLEAN_VALUE&params=source%3Amobile&inventoryChannelId=SOME_STRING_VALUE&crossWorkspaceMode=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", "/recommendations/v2/recommend/items/complementary?clientUUID=SOME_STRING_VALUE&minNumItems=SOME_INTEGER_VALUE&maxNumItems=SOME_INTEGER_VALUE&campaignId=SOME_STRING_VALUE&campaignName=SOME_STRING_VALUE&excludePurchasedItems=SOME_BOOLEAN_VALUE&excludePurchasedItemsSinceDays=SOME_INTEGER_VALUE&filters=SOME_STRING_VALUE&elastic%3Afilters=SOME_STRING_VALUE&itemId=SOME_ARRAY_VALUE&itemCatalogId=SOME_STRING_VALUE&boostMetric=SOME_STRING_VALUE&sortMetric=SOME_STRING_VALUE&distinctFilter=SOME_OBJECT_VALUE&includeContextItems=SOME_BOOLEAN_VALUE&params=source%3Amobile&inventoryChannelId=SOME_STRING_VALUE&crossWorkspaceMode=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/recommendations/v2/recommend/items/complementary?clientUUID=SOME_STRING_VALUE&minNumItems=SOME_INTEGER_VALUE&maxNumItems=SOME_INTEGER_VALUE&campaignId=SOME_STRING_VALUE&campaignName=SOME_STRING_VALUE&excludePurchasedItems=SOME_BOOLEAN_VALUE&excludePurchasedItemsSinceDays=SOME_INTEGER_VALUE&filters=SOME_STRING_VALUE&elastic%3Afilters=SOME_STRING_VALUE&itemId=SOME_ARRAY_VALUE&itemCatalogId=SOME_STRING_VALUE&boostMetric=SOME_STRING_VALUE&sortMetric=SOME_STRING_VALUE&distinctFilter=SOME_OBJECT_VALUE&includeContextItems=SOME_BOOLEAN_VALUE&params=source%3Amobile&inventoryChannelId=SOME_STRING_VALUE&crossWorkspaceMode=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": "/recommendations/v2/recommend/items/complementary?clientUUID=SOME_STRING_VALUE&minNumItems=SOME_INTEGER_VALUE&maxNumItems=SOME_INTEGER_VALUE&campaignId=SOME_STRING_VALUE&campaignName=SOME_STRING_VALUE&excludePurchasedItems=SOME_BOOLEAN_VALUE&excludePurchasedItemsSinceDays=SOME_INTEGER_VALUE&filters=SOME_STRING_VALUE&elastic%3Afilters=SOME_STRING_VALUE&itemId=SOME_ARRAY_VALUE&itemCatalogId=SOME_STRING_VALUE&boostMetric=SOME_STRING_VALUE&sortMetric=SOME_STRING_VALUE&distinctFilter=SOME_OBJECT_VALUE&includeContextItems=SOME_BOOLEAN_VALUE&params=source%3Amobile&inventoryChannelId=SOME_STRING_VALUE&crossWorkspaceMode=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/recommendations/v2/recommend/items/complementary');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'clientUUID' => 'SOME_STRING_VALUE',
              'minNumItems' => 'SOME_INTEGER_VALUE',
              'maxNumItems' => 'SOME_INTEGER_VALUE',
              'campaignId' => 'SOME_STRING_VALUE',
              'campaignName' => 'SOME_STRING_VALUE',
              'excludePurchasedItems' => 'SOME_BOOLEAN_VALUE',
              'excludePurchasedItemsSinceDays' => 'SOME_INTEGER_VALUE',
              'filters' => 'SOME_STRING_VALUE',
              'elastic:filters' => 'SOME_STRING_VALUE',
              'itemId' => 'SOME_ARRAY_VALUE',
              'itemCatalogId' => 'SOME_STRING_VALUE',
              'boostMetric' => 'SOME_STRING_VALUE',
              'sortMetric' => 'SOME_STRING_VALUE',
              'distinctFilter' => 'SOME_OBJECT_VALUE',
              'includeContextItems' => 'SOME_BOOLEAN_VALUE',
              'params' => 'source:mobile',
              'inventoryChannelId' => 'SOME_STRING_VALUE',
              'crossWorkspaceMode' => '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/recommendations/v2/recommend/items/complementary?clientUUID=SOME_STRING_VALUE&minNumItems=SOME_INTEGER_VALUE&maxNumItems=SOME_INTEGER_VALUE&campaignId=SOME_STRING_VALUE&campaignName=SOME_STRING_VALUE&excludePurchasedItems=SOME_BOOLEAN_VALUE&excludePurchasedItemsSinceDays=SOME_INTEGER_VALUE&filters=SOME_STRING_VALUE&elastic%3Afilters=SOME_STRING_VALUE&itemId=SOME_ARRAY_VALUE&itemCatalogId=SOME_STRING_VALUE&boostMetric=SOME_STRING_VALUE&sortMetric=SOME_STRING_VALUE&distinctFilter=SOME_OBJECT_VALUE&includeContextItems=SOME_BOOLEAN_VALUE&params=source%3Amobile&inventoryChannelId=SOME_STRING_VALUE&crossWorkspaceMode=SOME_BOOLEAN_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    post:
      summary: Complementary items for a cart
      description: |
        Show recommendations based on the contents of a cart.

        **Note:** The definition of an *item* encompasses products, but also articles, images, videos, and any other entities in the item feed.

        ---

        **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:** `RECOMMENDATIONS_V2_COMPLEMENTARY_RECOMMENDATIONS_READ`
      operationId: PostComplementItems
      tags:
        - Recommendations
      security:
        - JWT: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/recommendations-rust-all-SlotsBodySchemaV2"
        description: Definition of the requested recommendation
        required: true
      responses:
        "200":
          description: Cart complementary recommendations
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/recommendations-rust-all-SlotsRecommendationResponseSchemaV2"
        "404":
          $ref: "#/components/responses/recommendations-rust-all-404-no-recommendation"
        "500":
          $ref: "#/components/responses/recommendations-rust-all-500-error-occurred"
      x-snr-doc-urls:
        - /api-reference/ai-recommendations#tag/Recommendations/operation/PostComplementItems
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/recommendations/v2/recommend/items/complementary \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"campaignId":"defaultCampaign","campaignName":"string","catalogId":"default","clientUUID":"string","contextItemIds":["string"],"includeContextItems":false,"filterRules":{"excludePurchasedItems":false,"excludePurchasedItemsSinceDays":0,"elasticExcludePurchasedItems":false,"elasticExcludePurchasedItemsSinceDays":0},"displayAttributes":"string","abTestContext":{"experimentId":0,"variantId":"string","requestedCampaignId":"string"},"params":{"source":"mobile"},"inventoryContext":{"channelIds":["string"]},"keepSlotsOrder":true,"personalizeSlotsOrder":false,"sortMetric":"string","boostingParameters":{"metric":"string","strength":0.1,"personalizedBoostingStrength":0},"boostingStrategies":[{"name":"string","condition":"string","strength":1}],"crossWorkspaceMode":{"enabled":true},"slots":[{"name":"string","minNumItems":1,"maxNumItems":5,"shuffleNumItems":1,"filters":"string","elasticFilters":"string","distinctFilter":{"elastic":true,"filters":[{"field":"string","maxNumItems":0,"levelRangeModifier":0}]}}]}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"campaignId\":\"defaultCampaign\",\"campaignName\":\"string\",\"catalogId\":\"default\",\"clientUUID\":\"string\",\"contextItemIds\":[\"string\"],\"includeContextItems\":false,\"filterRules\":{\"excludePurchasedItems\":false,\"excludePurchasedItemsSinceDays\":0,\"elasticExcludePurchasedItems\":false,\"elasticExcludePurchasedItemsSinceDays\":0},\"displayAttributes\":\"string\",\"abTestContext\":{\"experimentId\":0,\"variantId\":\"string\",\"requestedCampaignId\":\"string\"},\"params\":{\"source\":\"mobile\"},\"inventoryContext\":{\"channelIds\":[\"string\"]},\"keepSlotsOrder\":true,\"personalizeSlotsOrder\":false,\"sortMetric\":\"string\",\"boostingParameters\":{\"metric\":\"string\",\"strength\":0.1,\"personalizedBoostingStrength\":0},\"boostingStrategies\":[{\"name\":\"string\",\"condition\":\"string\",\"strength\":1}],\"crossWorkspaceMode\":{\"enabled\":true},\"slots\":[{\"name\":\"string\",\"minNumItems\":1,\"maxNumItems\":5,\"shuffleNumItems\":1,\"filters\":\"string\",\"elasticFilters\":\"string\",\"distinctFilter\":{\"elastic\":true,\"filters\":[{\"field\":\"string\",\"maxNumItems\":0,\"levelRangeModifier\":0}]}}]}"

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

            conn.request("POST", "/recommendations/v2/recommend/items/complementary", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "campaignId": "defaultCampaign",
              "campaignName": "string",
              "catalogId": "default",
              "clientUUID": "string",
              "contextItemIds": [
                "string"
              ],
              "includeContextItems": false,
              "filterRules": {
                "excludePurchasedItems": false,
                "excludePurchasedItemsSinceDays": 0,
                "elasticExcludePurchasedItems": false,
                "elasticExcludePurchasedItemsSinceDays": 0
              },
              "displayAttributes": "string",
              "abTestContext": {
                "experimentId": 0,
                "variantId": "string",
                "requestedCampaignId": "string"
              },
              "params": {
                "source": "mobile"
              },
              "inventoryContext": {
                "channelIds": [
                  "string"
                ]
              },
              "keepSlotsOrder": true,
              "personalizeSlotsOrder": false,
              "sortMetric": "string",
              "boostingParameters": {
                "metric": "string",
                "strength": 0.1,
                "personalizedBoostingStrength": 0
              },
              "boostingStrategies": [
                {
                  "name": "string",
                  "condition": "string",
                  "strength": 1
                }
              ],
              "crossWorkspaceMode": {
                "enabled": true
              },
              "slots": [
                {
                  "name": "string",
                  "minNumItems": 1,
                  "maxNumItems": 5,
                  "shuffleNumItems": 1,
                  "filters": "string",
                  "elasticFilters": "string",
                  "distinctFilter": {
                    "elastic": true,
                    "filters": [
                      {
                        "field": "string",
                        "maxNumItems": 0,
                        "levelRangeModifier": 0
                      }
                    ]
                  }
                }
              ]
            });

            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/recommendations/v2/recommend/items/complementary");
            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": "/recommendations/v2/recommend/items/complementary",
              "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({
              campaignId: 'defaultCampaign',
              campaignName: 'string',
              catalogId: 'default',
              clientUUID: 'string',
              contextItemIds: ['string'],
              includeContextItems: false,
              filterRules: {
                excludePurchasedItems: false,
                excludePurchasedItemsSinceDays: 0,
                elasticExcludePurchasedItems: false,
                elasticExcludePurchasedItemsSinceDays: 0
              },
              displayAttributes: 'string',
              abTestContext: {experimentId: 0, variantId: 'string', requestedCampaignId: 'string'},
              params: {source: 'mobile'},
              inventoryContext: {channelIds: ['string']},
              keepSlotsOrder: true,
              personalizeSlotsOrder: false,
              sortMetric: 'string',
              boostingParameters: {metric: 'string', strength: 0.1, personalizedBoostingStrength: 0},
              boostingStrategies: [{name: 'string', condition: 'string', strength: 1}],
              crossWorkspaceMode: {enabled: true},
              slots: [
                {
                  name: 'string',
                  minNumItems: 1,
                  maxNumItems: 5,
                  shuffleNumItems: 1,
                  filters: 'string',
                  elasticFilters: 'string',
                  distinctFilter: {
                    elastic: true,
                    filters: [{field: 'string', maxNumItems: 0, levelRangeModifier: 0}]
                  }
                }
              ]
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/recommendations/v2/recommend/items/complementary');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"campaignId":"defaultCampaign","campaignName":"string","catalogId":"default","clientUUID":"string","contextItemIds":["string"],"includeContextItems":false,"filterRules":{"excludePurchasedItems":false,"excludePurchasedItemsSinceDays":0,"elasticExcludePurchasedItems":false,"elasticExcludePurchasedItemsSinceDays":0},"displayAttributes":"string","abTestContext":{"experimentId":0,"variantId":"string","requestedCampaignId":"string"},"params":{"source":"mobile"},"inventoryContext":{"channelIds":["string"]},"keepSlotsOrder":true,"personalizeSlotsOrder":false,"sortMetric":"string","boostingParameters":{"metric":"string","strength":0.1,"personalizedBoostingStrength":0},"boostingStrategies":[{"name":"string","condition":"string","strength":1}],"crossWorkspaceMode":{"enabled":true},"slots":[{"name":"string","minNumItems":1,"maxNumItems":5,"shuffleNumItems":1,"filters":"string","elasticFilters":"string","distinctFilter":{"elastic":true,"filters":[{"field":"string","maxNumItems":0,"levelRangeModifier":0}]}}]}');

            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/recommendations/v2/recommend/items/complementary")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"campaignId\":\"defaultCampaign\",\"campaignName\":\"string\",\"catalogId\":\"default\",\"clientUUID\":\"string\",\"contextItemIds\":[\"string\"],\"includeContextItems\":false,\"filterRules\":{\"excludePurchasedItems\":false,\"excludePurchasedItemsSinceDays\":0,\"elasticExcludePurchasedItems\":false,\"elasticExcludePurchasedItemsSinceDays\":0},\"displayAttributes\":\"string\",\"abTestContext\":{\"experimentId\":0,\"variantId\":\"string\",\"requestedCampaignId\":\"string\"},\"params\":{\"source\":\"mobile\"},\"inventoryContext\":{\"channelIds\":[\"string\"]},\"keepSlotsOrder\":true,\"personalizeSlotsOrder\":false,\"sortMetric\":\"string\",\"boostingParameters\":{\"metric\":\"string\",\"strength\":0.1,\"personalizedBoostingStrength\":0},\"boostingStrategies\":[{\"name\":\"string\",\"condition\":\"string\",\"strength\":1}],\"crossWorkspaceMode\":{\"enabled\":true},\"slots\":[{\"name\":\"string\",\"minNumItems\":1,\"maxNumItems\":5,\"shuffleNumItems\":1,\"filters\":\"string\",\"elasticFilters\":\"string\",\"distinctFilter\":{\"elastic\":true,\"filters\":[{\"field\":\"string\",\"maxNumItems\":0,\"levelRangeModifier\":0}]}}]}")
              .asString();
  /recommendations/v2/recommend/items/{itemId}/complementary:
    get:
      summary: Complementary items
      description: |
        Returns items complementary to the given items.

        **Note:** The definition of an *item* encompasses products, but also articles, images, videos, and any other entities in the item feed.

        ---

        **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:** `RECOMMENDATIONS_V2_COMPLEMENTARY_PRODUCTS_RECOMMENDATIONS_READ`
      operationId: GetComplementaryItems
      tags:
        - Recommendations
      security:
        - TrackerKey: []
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/recommendations-rust-all-recommendationsMinNumItems"
        - $ref: "#/components/parameters/recommendations-rust-all-recommendationsMaxNumItems"
        - $ref: "#/components/parameters/recommendations-rust-all-recommendationsCampaignId"
        - $ref: "#/components/parameters/recommendations-rust-all-recommendationsCampaignName"
        - $ref: "#/components/parameters/recommendations-rust-all-recommendationsClientUUID"
        - $ref: "#/components/parameters/recommendations-rust-all-inPathItemId"
        - $ref: "#/components/parameters/recommendations-rust-all-recommendationsExcludePurchasedItems"
        - $ref: "#/components/parameters/recommendations-rust-all-recommendationsExcludePurchasedItemsSince"
        - $ref: "#/components/parameters/recommendations-rust-all-filterExpr"
        - $ref: "#/components/parameters/recommendations-rust-all-elasticFilterExpr"
        - $ref: "#/components/parameters/recommendations-rust-all-itemCatalogId"
        - $ref: "#/components/parameters/recommendations-rust-all-distinctFilter"
        - $ref: "#/components/parameters/recommendations-rust-all-recommendationsIncludeContextItems"
        - $ref: "#/components/parameters/recommendations-rust-all-params"
        - $ref: "#/components/parameters/recommendations-rust-all-inventoryChannelId"
        - $ref: "#/components/parameters/recommendations-rust-all-crossWorkspaceMode"
      responses:
        "200":
          description: Items complementary to the given item
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/recommendations-rust-all-RecommendationResponseSchemaV2"
        "404":
          $ref: "#/components/responses/recommendations-rust-all-404-no-recommendation"
        "500":
          $ref: "#/components/responses/recommendations-rust-all-500-error-occurred"
      x-snr-doc-urls:
        - /api-reference/ai-recommendations#tag/Recommendations/operation/GetComplementaryItems
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/recommendations/v2/recommend/items/%7BitemId%7D/complementary?minNumItems=SOME_INTEGER_VALUE&maxNumItems=SOME_INTEGER_VALUE&campaignId=SOME_STRING_VALUE&campaignName=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&excludePurchasedItems=SOME_BOOLEAN_VALUE&excludePurchasedItemsSinceDays=SOME_INTEGER_VALUE&filters=SOME_STRING_VALUE&elastic%3Afilters=SOME_STRING_VALUE&itemCatalogId=SOME_STRING_VALUE&distinctFilter=SOME_OBJECT_VALUE&includeContextItems=SOME_BOOLEAN_VALUE&params=source%3Amobile&inventoryChannelId=SOME_STRING_VALUE&crossWorkspaceMode=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", "/recommendations/v2/recommend/items/%7BitemId%7D/complementary?minNumItems=SOME_INTEGER_VALUE&maxNumItems=SOME_INTEGER_VALUE&campaignId=SOME_STRING_VALUE&campaignName=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&excludePurchasedItems=SOME_BOOLEAN_VALUE&excludePurchasedItemsSinceDays=SOME_INTEGER_VALUE&filters=SOME_STRING_VALUE&elastic%3Afilters=SOME_STRING_VALUE&itemCatalogId=SOME_STRING_VALUE&distinctFilter=SOME_OBJECT_VALUE&includeContextItems=SOME_BOOLEAN_VALUE&params=source%3Amobile&inventoryChannelId=SOME_STRING_VALUE&crossWorkspaceMode=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/recommendations/v2/recommend/items/%7BitemId%7D/complementary?minNumItems=SOME_INTEGER_VALUE&maxNumItems=SOME_INTEGER_VALUE&campaignId=SOME_STRING_VALUE&campaignName=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&excludePurchasedItems=SOME_BOOLEAN_VALUE&excludePurchasedItemsSinceDays=SOME_INTEGER_VALUE&filters=SOME_STRING_VALUE&elastic%3Afilters=SOME_STRING_VALUE&itemCatalogId=SOME_STRING_VALUE&distinctFilter=SOME_OBJECT_VALUE&includeContextItems=SOME_BOOLEAN_VALUE&params=source%3Amobile&inventoryChannelId=SOME_STRING_VALUE&crossWorkspaceMode=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": "/recommendations/v2/recommend/items/%7BitemId%7D/complementary?minNumItems=SOME_INTEGER_VALUE&maxNumItems=SOME_INTEGER_VALUE&campaignId=SOME_STRING_VALUE&campaignName=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&excludePurchasedItems=SOME_BOOLEAN_VALUE&excludePurchasedItemsSinceDays=SOME_INTEGER_VALUE&filters=SOME_STRING_VALUE&elastic%3Afilters=SOME_STRING_VALUE&itemCatalogId=SOME_STRING_VALUE&distinctFilter=SOME_OBJECT_VALUE&includeContextItems=SOME_BOOLEAN_VALUE&params=source%3Amobile&inventoryChannelId=SOME_STRING_VALUE&crossWorkspaceMode=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/recommendations/v2/recommend/items/%7BitemId%7D/complementary');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'minNumItems' => 'SOME_INTEGER_VALUE',
              'maxNumItems' => 'SOME_INTEGER_VALUE',
              'campaignId' => 'SOME_STRING_VALUE',
              'campaignName' => 'SOME_STRING_VALUE',
              'clientUUID' => 'SOME_STRING_VALUE',
              'excludePurchasedItems' => 'SOME_BOOLEAN_VALUE',
              'excludePurchasedItemsSinceDays' => 'SOME_INTEGER_VALUE',
              'filters' => 'SOME_STRING_VALUE',
              'elastic:filters' => 'SOME_STRING_VALUE',
              'itemCatalogId' => 'SOME_STRING_VALUE',
              'distinctFilter' => 'SOME_OBJECT_VALUE',
              'includeContextItems' => 'SOME_BOOLEAN_VALUE',
              'params' => 'source:mobile',
              'inventoryChannelId' => 'SOME_STRING_VALUE',
              'crossWorkspaceMode' => '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/recommendations/v2/recommend/items/%7BitemId%7D/complementary?minNumItems=SOME_INTEGER_VALUE&maxNumItems=SOME_INTEGER_VALUE&campaignId=SOME_STRING_VALUE&campaignName=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&excludePurchasedItems=SOME_BOOLEAN_VALUE&excludePurchasedItemsSinceDays=SOME_INTEGER_VALUE&filters=SOME_STRING_VALUE&elastic%3Afilters=SOME_STRING_VALUE&itemCatalogId=SOME_STRING_VALUE&distinctFilter=SOME_OBJECT_VALUE&includeContextItems=SOME_BOOLEAN_VALUE&params=source%3Amobile&inventoryChannelId=SOME_STRING_VALUE&crossWorkspaceMode=SOME_BOOLEAN_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    post:
      summary: Complementary items
      description: |
        Returns items complementary to the given items.

        **Note:** The definition of an *item* encompasses products, but also articles, images, videos, and any other entities in the item feed.

        ---

        **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:** `RECOMMENDATIONS_V2_COMPLEMENTARY_PRODUCTS_RECOMMENDATIONS_READ`
      operationId: PostComplementaryItems
      tags:
        - Recommendations
      security:
        - TrackerKey: []
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/recommendations-rust-all-inPathItemId"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/recommendations-rust-all-SlotsBodySchemaV2"
        description: Definition of the requested recommendation
        required: true
      responses:
        "200":
          description: Items complementary to the given item
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/recommendations-rust-all-SlotsRecommendationResponseSchemaV2"
        "404":
          $ref: "#/components/responses/recommendations-rust-all-404-no-recommendation"
        "500":
          $ref: "#/components/responses/recommendations-rust-all-500-error-occurred"
      x-snr-doc-urls:
        - /api-reference/ai-recommendations#tag/Recommendations/operation/PostComplementaryItems
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/recommendations/v2/recommend/items/%7BitemId%7D/complementary \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"campaignId":"defaultCampaign","campaignName":"string","catalogId":"default","clientUUID":"string","contextItemIds":["string"],"includeContextItems":false,"filterRules":{"excludePurchasedItems":false,"excludePurchasedItemsSinceDays":0,"elasticExcludePurchasedItems":false,"elasticExcludePurchasedItemsSinceDays":0},"displayAttributes":"string","abTestContext":{"experimentId":0,"variantId":"string","requestedCampaignId":"string"},"params":{"source":"mobile"},"inventoryContext":{"channelIds":["string"]},"keepSlotsOrder":true,"personalizeSlotsOrder":false,"sortMetric":"string","boostingParameters":{"metric":"string","strength":0.1,"personalizedBoostingStrength":0},"boostingStrategies":[{"name":"string","condition":"string","strength":1}],"crossWorkspaceMode":{"enabled":true},"slots":[{"name":"string","minNumItems":1,"maxNumItems":5,"shuffleNumItems":1,"filters":"string","elasticFilters":"string","distinctFilter":{"elastic":true,"filters":[{"field":"string","maxNumItems":0,"levelRangeModifier":0}]}}]}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"campaignId\":\"defaultCampaign\",\"campaignName\":\"string\",\"catalogId\":\"default\",\"clientUUID\":\"string\",\"contextItemIds\":[\"string\"],\"includeContextItems\":false,\"filterRules\":{\"excludePurchasedItems\":false,\"excludePurchasedItemsSinceDays\":0,\"elasticExcludePurchasedItems\":false,\"elasticExcludePurchasedItemsSinceDays\":0},\"displayAttributes\":\"string\",\"abTestContext\":{\"experimentId\":0,\"variantId\":\"string\",\"requestedCampaignId\":\"string\"},\"params\":{\"source\":\"mobile\"},\"inventoryContext\":{\"channelIds\":[\"string\"]},\"keepSlotsOrder\":true,\"personalizeSlotsOrder\":false,\"sortMetric\":\"string\",\"boostingParameters\":{\"metric\":\"string\",\"strength\":0.1,\"personalizedBoostingStrength\":0},\"boostingStrategies\":[{\"name\":\"string\",\"condition\":\"string\",\"strength\":1}],\"crossWorkspaceMode\":{\"enabled\":true},\"slots\":[{\"name\":\"string\",\"minNumItems\":1,\"maxNumItems\":5,\"shuffleNumItems\":1,\"filters\":\"string\",\"elasticFilters\":\"string\",\"distinctFilter\":{\"elastic\":true,\"filters\":[{\"field\":\"string\",\"maxNumItems\":0,\"levelRangeModifier\":0}]}}]}"

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

            conn.request("POST", "/recommendations/v2/recommend/items/%7BitemId%7D/complementary", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "campaignId": "defaultCampaign",
              "campaignName": "string",
              "catalogId": "default",
              "clientUUID": "string",
              "contextItemIds": [
                "string"
              ],
              "includeContextItems": false,
              "filterRules": {
                "excludePurchasedItems": false,
                "excludePurchasedItemsSinceDays": 0,
                "elasticExcludePurchasedItems": false,
                "elasticExcludePurchasedItemsSinceDays": 0
              },
              "displayAttributes": "string",
              "abTestContext": {
                "experimentId": 0,
                "variantId": "string",
                "requestedCampaignId": "string"
              },
              "params": {
                "source": "mobile"
              },
              "inventoryContext": {
                "channelIds": [
                  "string"
                ]
              },
              "keepSlotsOrder": true,
              "personalizeSlotsOrder": false,
              "sortMetric": "string",
              "boostingParameters": {
                "metric": "string",
                "strength": 0.1,
                "personalizedBoostingStrength": 0
              },
              "boostingStrategies": [
                {
                  "name": "string",
                  "condition": "string",
                  "strength": 1
                }
              ],
              "crossWorkspaceMode": {
                "enabled": true
              },
              "slots": [
                {
                  "name": "string",
                  "minNumItems": 1,
                  "maxNumItems": 5,
                  "shuffleNumItems": 1,
                  "filters": "string",
                  "elasticFilters": "string",
                  "distinctFilter": {
                    "elastic": true,
                    "filters": [
                      {
                        "field": "string",
                        "maxNumItems": 0,
                        "levelRangeModifier": 0
                      }
                    ]
                  }
                }
              ]
            });

            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/recommendations/v2/recommend/items/%7BitemId%7D/complementary");
            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": "/recommendations/v2/recommend/items/%7BitemId%7D/complementary",
              "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({
              campaignId: 'defaultCampaign',
              campaignName: 'string',
              catalogId: 'default',
              clientUUID: 'string',
              contextItemIds: ['string'],
              includeContextItems: false,
              filterRules: {
                excludePurchasedItems: false,
                excludePurchasedItemsSinceDays: 0,
                elasticExcludePurchasedItems: false,
                elasticExcludePurchasedItemsSinceDays: 0
              },
              displayAttributes: 'string',
              abTestContext: {experimentId: 0, variantId: 'string', requestedCampaignId: 'string'},
              params: {source: 'mobile'},
              inventoryContext: {channelIds: ['string']},
              keepSlotsOrder: true,
              personalizeSlotsOrder: false,
              sortMetric: 'string',
              boostingParameters: {metric: 'string', strength: 0.1, personalizedBoostingStrength: 0},
              boostingStrategies: [{name: 'string', condition: 'string', strength: 1}],
              crossWorkspaceMode: {enabled: true},
              slots: [
                {
                  name: 'string',
                  minNumItems: 1,
                  maxNumItems: 5,
                  shuffleNumItems: 1,
                  filters: 'string',
                  elasticFilters: 'string',
                  distinctFilter: {
                    elastic: true,
                    filters: [{field: 'string', maxNumItems: 0, levelRangeModifier: 0}]
                  }
                }
              ]
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/recommendations/v2/recommend/items/%7BitemId%7D/complementary');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"campaignId":"defaultCampaign","campaignName":"string","catalogId":"default","clientUUID":"string","contextItemIds":["string"],"includeContextItems":false,"filterRules":{"excludePurchasedItems":false,"excludePurchasedItemsSinceDays":0,"elasticExcludePurchasedItems":false,"elasticExcludePurchasedItemsSinceDays":0},"displayAttributes":"string","abTestContext":{"experimentId":0,"variantId":"string","requestedCampaignId":"string"},"params":{"source":"mobile"},"inventoryContext":{"channelIds":["string"]},"keepSlotsOrder":true,"personalizeSlotsOrder":false,"sortMetric":"string","boostingParameters":{"metric":"string","strength":0.1,"personalizedBoostingStrength":0},"boostingStrategies":[{"name":"string","condition":"string","strength":1}],"crossWorkspaceMode":{"enabled":true},"slots":[{"name":"string","minNumItems":1,"maxNumItems":5,"shuffleNumItems":1,"filters":"string","elasticFilters":"string","distinctFilter":{"elastic":true,"filters":[{"field":"string","maxNumItems":0,"levelRangeModifier":0}]}}]}');

            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/recommendations/v2/recommend/items/%7BitemId%7D/complementary")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"campaignId\":\"defaultCampaign\",\"campaignName\":\"string\",\"catalogId\":\"default\",\"clientUUID\":\"string\",\"contextItemIds\":[\"string\"],\"includeContextItems\":false,\"filterRules\":{\"excludePurchasedItems\":false,\"excludePurchasedItemsSinceDays\":0,\"elasticExcludePurchasedItems\":false,\"elasticExcludePurchasedItemsSinceDays\":0},\"displayAttributes\":\"string\",\"abTestContext\":{\"experimentId\":0,\"variantId\":\"string\",\"requestedCampaignId\":\"string\"},\"params\":{\"source\":\"mobile\"},\"inventoryContext\":{\"channelIds\":[\"string\"]},\"keepSlotsOrder\":true,\"personalizeSlotsOrder\":false,\"sortMetric\":\"string\",\"boostingParameters\":{\"metric\":\"string\",\"strength\":0.1,\"personalizedBoostingStrength\":0},\"boostingStrategies\":[{\"name\":\"string\",\"condition\":\"string\",\"strength\":1}],\"crossWorkspaceMode\":{\"enabled\":true},\"slots\":[{\"name\":\"string\",\"minNumItems\":1,\"maxNumItems\":5,\"shuffleNumItems\":1,\"filters\":\"string\",\"elasticFilters\":\"string\",\"distinctFilter\":{\"elastic\":true,\"filters\":[{\"field\":\"string\",\"maxNumItems\":0,\"levelRangeModifier\":0}]}}]}")
              .asString();
  /recommendations/v2/recommend/items/{itemId}/similar:
    get:
      summary: Similar items
      description: |
        Returns items similar to a given item.

        **Note:** The definition of an *item* encompasses products, but also articles, images, videos, and any other entities in the item feed.

        ---

        **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:** `RECOMMENDATIONS_V2_SIMILAR_RECOMMENDATIONS_READ`
      operationId: GetSimilarItems
      tags:
        - Recommendations
      security:
        - TrackerKey: []
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/recommendations-rust-all-recommendationsMinNumItems"
        - $ref: "#/components/parameters/recommendations-rust-all-recommendationsMaxNumItems"
        - $ref: "#/components/parameters/recommendations-rust-all-recommendationsCampaignId"
        - $ref: "#/components/parameters/recommendations-rust-all-recommendationsCampaignName"
        - $ref: "#/components/parameters/recommendations-rust-all-recommendationsClientUUID"
        - $ref: "#/components/parameters/recommendations-rust-all-inPathItemId"
        - $ref: "#/components/parameters/recommendations-rust-all-recommendationsExcludePurchasedItems"
        - $ref: "#/components/parameters/recommendations-rust-all-recommendationsExcludePurchasedItemsSince"
        - $ref: "#/components/parameters/recommendations-rust-all-filterExpr"
        - $ref: "#/components/parameters/recommendations-rust-all-elasticFilterExpr"
        - $ref: "#/components/parameters/recommendations-rust-all-itemCatalogId"
        - $ref: "#/components/parameters/recommendations-rust-all-distinctFilter"
        - $ref: "#/components/parameters/recommendations-rust-all-recommendationsIncludeContextItems"
        - $ref: "#/components/parameters/recommendations-rust-all-params"
        - $ref: "#/components/parameters/recommendations-rust-all-inventoryChannelId"
        - $ref: "#/components/parameters/recommendations-rust-all-crossWorkspaceMode"
      responses:
        "200":
          description: Items similar to the given item
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/recommendations-rust-all-RecommendationResponseSchemaV2"
        "404":
          $ref: "#/components/responses/recommendations-rust-all-404-no-recommendation"
        "500":
          $ref: "#/components/responses/recommendations-rust-all-500-error-occurred"
      x-snr-doc-urls:
        - /api-reference/ai-recommendations#tag/Recommendations/operation/GetSimilarItems
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/recommendations/v2/recommend/items/%7BitemId%7D/similar?minNumItems=SOME_INTEGER_VALUE&maxNumItems=SOME_INTEGER_VALUE&campaignId=SOME_STRING_VALUE&campaignName=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&excludePurchasedItems=SOME_BOOLEAN_VALUE&excludePurchasedItemsSinceDays=SOME_INTEGER_VALUE&filters=SOME_STRING_VALUE&elastic%3Afilters=SOME_STRING_VALUE&itemCatalogId=SOME_STRING_VALUE&distinctFilter=SOME_OBJECT_VALUE&includeContextItems=SOME_BOOLEAN_VALUE&params=source%3Amobile&inventoryChannelId=SOME_STRING_VALUE&crossWorkspaceMode=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", "/recommendations/v2/recommend/items/%7BitemId%7D/similar?minNumItems=SOME_INTEGER_VALUE&maxNumItems=SOME_INTEGER_VALUE&campaignId=SOME_STRING_VALUE&campaignName=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&excludePurchasedItems=SOME_BOOLEAN_VALUE&excludePurchasedItemsSinceDays=SOME_INTEGER_VALUE&filters=SOME_STRING_VALUE&elastic%3Afilters=SOME_STRING_VALUE&itemCatalogId=SOME_STRING_VALUE&distinctFilter=SOME_OBJECT_VALUE&includeContextItems=SOME_BOOLEAN_VALUE&params=source%3Amobile&inventoryChannelId=SOME_STRING_VALUE&crossWorkspaceMode=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/recommendations/v2/recommend/items/%7BitemId%7D/similar?minNumItems=SOME_INTEGER_VALUE&maxNumItems=SOME_INTEGER_VALUE&campaignId=SOME_STRING_VALUE&campaignName=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&excludePurchasedItems=SOME_BOOLEAN_VALUE&excludePurchasedItemsSinceDays=SOME_INTEGER_VALUE&filters=SOME_STRING_VALUE&elastic%3Afilters=SOME_STRING_VALUE&itemCatalogId=SOME_STRING_VALUE&distinctFilter=SOME_OBJECT_VALUE&includeContextItems=SOME_BOOLEAN_VALUE&params=source%3Amobile&inventoryChannelId=SOME_STRING_VALUE&crossWorkspaceMode=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": "/recommendations/v2/recommend/items/%7BitemId%7D/similar?minNumItems=SOME_INTEGER_VALUE&maxNumItems=SOME_INTEGER_VALUE&campaignId=SOME_STRING_VALUE&campaignName=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&excludePurchasedItems=SOME_BOOLEAN_VALUE&excludePurchasedItemsSinceDays=SOME_INTEGER_VALUE&filters=SOME_STRING_VALUE&elastic%3Afilters=SOME_STRING_VALUE&itemCatalogId=SOME_STRING_VALUE&distinctFilter=SOME_OBJECT_VALUE&includeContextItems=SOME_BOOLEAN_VALUE&params=source%3Amobile&inventoryChannelId=SOME_STRING_VALUE&crossWorkspaceMode=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/recommendations/v2/recommend/items/%7BitemId%7D/similar');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'minNumItems' => 'SOME_INTEGER_VALUE',
              'maxNumItems' => 'SOME_INTEGER_VALUE',
              'campaignId' => 'SOME_STRING_VALUE',
              'campaignName' => 'SOME_STRING_VALUE',
              'clientUUID' => 'SOME_STRING_VALUE',
              'excludePurchasedItems' => 'SOME_BOOLEAN_VALUE',
              'excludePurchasedItemsSinceDays' => 'SOME_INTEGER_VALUE',
              'filters' => 'SOME_STRING_VALUE',
              'elastic:filters' => 'SOME_STRING_VALUE',
              'itemCatalogId' => 'SOME_STRING_VALUE',
              'distinctFilter' => 'SOME_OBJECT_VALUE',
              'includeContextItems' => 'SOME_BOOLEAN_VALUE',
              'params' => 'source:mobile',
              'inventoryChannelId' => 'SOME_STRING_VALUE',
              'crossWorkspaceMode' => '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/recommendations/v2/recommend/items/%7BitemId%7D/similar?minNumItems=SOME_INTEGER_VALUE&maxNumItems=SOME_INTEGER_VALUE&campaignId=SOME_STRING_VALUE&campaignName=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&excludePurchasedItems=SOME_BOOLEAN_VALUE&excludePurchasedItemsSinceDays=SOME_INTEGER_VALUE&filters=SOME_STRING_VALUE&elastic%3Afilters=SOME_STRING_VALUE&itemCatalogId=SOME_STRING_VALUE&distinctFilter=SOME_OBJECT_VALUE&includeContextItems=SOME_BOOLEAN_VALUE&params=source%3Amobile&inventoryChannelId=SOME_STRING_VALUE&crossWorkspaceMode=SOME_BOOLEAN_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    post:
      summary: Similar items
      description: |
        Returns items similar to a given item.

        **Note:** The definition of an *item* encompasses products, but also articles, images, videos, and any other entities in the item feed.

        ---

        **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:** `RECOMMENDATIONS_V2_SIMILAR_RECOMMENDATIONS_READ`
      operationId: PostSimilarItems
      tags:
        - Recommendations
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/recommendations-rust-all-inPathItemId"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/recommendations-rust-all-SlotsBodySchemaV2"
        description: Definition of the requested recommendation
        required: true
      responses:
        "200":
          description: Items similar to the given item
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/recommendations-rust-all-SlotsRecommendationResponseSchemaV2"
        "404":
          $ref: "#/components/responses/recommendations-rust-all-404-no-recommendation"
        "500":
          $ref: "#/components/responses/recommendations-rust-all-500-error-occurred"
      x-snr-doc-urls:
        - /api-reference/ai-recommendations#tag/Recommendations/operation/PostSimilarItems
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/recommendations/v2/recommend/items/%7BitemId%7D/similar \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"campaignId":"defaultCampaign","campaignName":"string","catalogId":"default","clientUUID":"string","contextItemIds":["string"],"includeContextItems":false,"filterRules":{"excludePurchasedItems":false,"excludePurchasedItemsSinceDays":0,"elasticExcludePurchasedItems":false,"elasticExcludePurchasedItemsSinceDays":0},"displayAttributes":"string","abTestContext":{"experimentId":0,"variantId":"string","requestedCampaignId":"string"},"params":{"source":"mobile"},"inventoryContext":{"channelIds":["string"]},"keepSlotsOrder":true,"personalizeSlotsOrder":false,"sortMetric":"string","boostingParameters":{"metric":"string","strength":0.1,"personalizedBoostingStrength":0},"boostingStrategies":[{"name":"string","condition":"string","strength":1}],"crossWorkspaceMode":{"enabled":true},"slots":[{"name":"string","minNumItems":1,"maxNumItems":5,"shuffleNumItems":1,"filters":"string","elasticFilters":"string","distinctFilter":{"elastic":true,"filters":[{"field":"string","maxNumItems":0,"levelRangeModifier":0}]}}]}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"campaignId\":\"defaultCampaign\",\"campaignName\":\"string\",\"catalogId\":\"default\",\"clientUUID\":\"string\",\"contextItemIds\":[\"string\"],\"includeContextItems\":false,\"filterRules\":{\"excludePurchasedItems\":false,\"excludePurchasedItemsSinceDays\":0,\"elasticExcludePurchasedItems\":false,\"elasticExcludePurchasedItemsSinceDays\":0},\"displayAttributes\":\"string\",\"abTestContext\":{\"experimentId\":0,\"variantId\":\"string\",\"requestedCampaignId\":\"string\"},\"params\":{\"source\":\"mobile\"},\"inventoryContext\":{\"channelIds\":[\"string\"]},\"keepSlotsOrder\":true,\"personalizeSlotsOrder\":false,\"sortMetric\":\"string\",\"boostingParameters\":{\"metric\":\"string\",\"strength\":0.1,\"personalizedBoostingStrength\":0},\"boostingStrategies\":[{\"name\":\"string\",\"condition\":\"string\",\"strength\":1}],\"crossWorkspaceMode\":{\"enabled\":true},\"slots\":[{\"name\":\"string\",\"minNumItems\":1,\"maxNumItems\":5,\"shuffleNumItems\":1,\"filters\":\"string\",\"elasticFilters\":\"string\",\"distinctFilter\":{\"elastic\":true,\"filters\":[{\"field\":\"string\",\"maxNumItems\":0,\"levelRangeModifier\":0}]}}]}"

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

            conn.request("POST", "/recommendations/v2/recommend/items/%7BitemId%7D/similar", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "campaignId": "defaultCampaign",
              "campaignName": "string",
              "catalogId": "default",
              "clientUUID": "string",
              "contextItemIds": [
                "string"
              ],
              "includeContextItems": false,
              "filterRules": {
                "excludePurchasedItems": false,
                "excludePurchasedItemsSinceDays": 0,
                "elasticExcludePurchasedItems": false,
                "elasticExcludePurchasedItemsSinceDays": 0
              },
              "displayAttributes": "string",
              "abTestContext": {
                "experimentId": 0,
                "variantId": "string",
                "requestedCampaignId": "string"
              },
              "params": {
                "source": "mobile"
              },
              "inventoryContext": {
                "channelIds": [
                  "string"
                ]
              },
              "keepSlotsOrder": true,
              "personalizeSlotsOrder": false,
              "sortMetric": "string",
              "boostingParameters": {
                "metric": "string",
                "strength": 0.1,
                "personalizedBoostingStrength": 0
              },
              "boostingStrategies": [
                {
                  "name": "string",
                  "condition": "string",
                  "strength": 1
                }
              ],
              "crossWorkspaceMode": {
                "enabled": true
              },
              "slots": [
                {
                  "name": "string",
                  "minNumItems": 1,
                  "maxNumItems": 5,
                  "shuffleNumItems": 1,
                  "filters": "string",
                  "elasticFilters": "string",
                  "distinctFilter": {
                    "elastic": true,
                    "filters": [
                      {
                        "field": "string",
                        "maxNumItems": 0,
                        "levelRangeModifier": 0
                      }
                    ]
                  }
                }
              ]
            });

            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/recommendations/v2/recommend/items/%7BitemId%7D/similar");
            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": "/recommendations/v2/recommend/items/%7BitemId%7D/similar",
              "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({
              campaignId: 'defaultCampaign',
              campaignName: 'string',
              catalogId: 'default',
              clientUUID: 'string',
              contextItemIds: ['string'],
              includeContextItems: false,
              filterRules: {
                excludePurchasedItems: false,
                excludePurchasedItemsSinceDays: 0,
                elasticExcludePurchasedItems: false,
                elasticExcludePurchasedItemsSinceDays: 0
              },
              displayAttributes: 'string',
              abTestContext: {experimentId: 0, variantId: 'string', requestedCampaignId: 'string'},
              params: {source: 'mobile'},
              inventoryContext: {channelIds: ['string']},
              keepSlotsOrder: true,
              personalizeSlotsOrder: false,
              sortMetric: 'string',
              boostingParameters: {metric: 'string', strength: 0.1, personalizedBoostingStrength: 0},
              boostingStrategies: [{name: 'string', condition: 'string', strength: 1}],
              crossWorkspaceMode: {enabled: true},
              slots: [
                {
                  name: 'string',
                  minNumItems: 1,
                  maxNumItems: 5,
                  shuffleNumItems: 1,
                  filters: 'string',
                  elasticFilters: 'string',
                  distinctFilter: {
                    elastic: true,
                    filters: [{field: 'string', maxNumItems: 0, levelRangeModifier: 0}]
                  }
                }
              ]
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/recommendations/v2/recommend/items/%7BitemId%7D/similar');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"campaignId":"defaultCampaign","campaignName":"string","catalogId":"default","clientUUID":"string","contextItemIds":["string"],"includeContextItems":false,"filterRules":{"excludePurchasedItems":false,"excludePurchasedItemsSinceDays":0,"elasticExcludePurchasedItems":false,"elasticExcludePurchasedItemsSinceDays":0},"displayAttributes":"string","abTestContext":{"experimentId":0,"variantId":"string","requestedCampaignId":"string"},"params":{"source":"mobile"},"inventoryContext":{"channelIds":["string"]},"keepSlotsOrder":true,"personalizeSlotsOrder":false,"sortMetric":"string","boostingParameters":{"metric":"string","strength":0.1,"personalizedBoostingStrength":0},"boostingStrategies":[{"name":"string","condition":"string","strength":1}],"crossWorkspaceMode":{"enabled":true},"slots":[{"name":"string","minNumItems":1,"maxNumItems":5,"shuffleNumItems":1,"filters":"string","elasticFilters":"string","distinctFilter":{"elastic":true,"filters":[{"field":"string","maxNumItems":0,"levelRangeModifier":0}]}}]}');

            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/recommendations/v2/recommend/items/%7BitemId%7D/similar")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"campaignId\":\"defaultCampaign\",\"campaignName\":\"string\",\"catalogId\":\"default\",\"clientUUID\":\"string\",\"contextItemIds\":[\"string\"],\"includeContextItems\":false,\"filterRules\":{\"excludePurchasedItems\":false,\"excludePurchasedItemsSinceDays\":0,\"elasticExcludePurchasedItems\":false,\"elasticExcludePurchasedItemsSinceDays\":0},\"displayAttributes\":\"string\",\"abTestContext\":{\"experimentId\":0,\"variantId\":\"string\",\"requestedCampaignId\":\"string\"},\"params\":{\"source\":\"mobile\"},\"inventoryContext\":{\"channelIds\":[\"string\"]},\"keepSlotsOrder\":true,\"personalizeSlotsOrder\":false,\"sortMetric\":\"string\",\"boostingParameters\":{\"metric\":\"string\",\"strength\":0.1,\"personalizedBoostingStrength\":0},\"boostingStrategies\":[{\"name\":\"string\",\"condition\":\"string\",\"strength\":1}],\"crossWorkspaceMode\":{\"enabled\":true},\"slots\":[{\"name\":\"string\",\"minNumItems\":1,\"maxNumItems\":5,\"shuffleNumItems\":1,\"filters\":\"string\",\"elasticFilters\":\"string\",\"distinctFilter\":{\"elastic\":true,\"filters\":[{\"field\":\"string\",\"maxNumItems\":0,\"levelRangeModifier\":0}]}}]}")
              .asString();
  /recommendations/v2/recommend/items/{itemId}/similar/visual:
    get:
      summary: Visually similar
      description: |
        Returns items visually similar to the given items.

        **Note:** The definition of an *item* encompasses products, but also articles, images, videos, and any other entities in the item feed.

        ---

        **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:** `RECOMMENDATIONS_V2_VISUAL_RECOMMENDATIONS_READ`
      operationId: GetSimilarVisualItems
      tags:
        - Recommendations
      security:
        - TrackerKey: []
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/recommendations-rust-all-recommendationsMinNumItems"
        - $ref: "#/components/parameters/recommendations-rust-all-recommendationsMaxNumItems"
        - $ref: "#/components/parameters/recommendations-rust-all-recommendationsClientUUID"
        - $ref: "#/components/parameters/recommendations-rust-all-inPathItemId"
        - $ref: "#/components/parameters/recommendations-rust-all-recommendationsExcludePurchasedItems"
        - $ref: "#/components/parameters/recommendations-rust-all-recommendationsExcludePurchasedItemsSince"
        - $ref: "#/components/parameters/recommendations-rust-all-filterExpr"
        - $ref: "#/components/parameters/recommendations-rust-all-elasticFilterExpr"
        - $ref: "#/components/parameters/recommendations-rust-all-itemCatalogId"
        - $ref: "#/components/parameters/recommendations-rust-all-recommendationsCampaignId"
        - $ref: "#/components/parameters/recommendations-rust-all-recommendationsCampaignName"
        - $ref: "#/components/parameters/recommendations-rust-all-distinctFilter"
        - $ref: "#/components/parameters/recommendations-rust-all-recommendationsIncludeContextItems"
        - $ref: "#/components/parameters/recommendations-rust-all-params"
        - $ref: "#/components/parameters/recommendations-rust-all-inventoryChannelId"
        - $ref: "#/components/parameters/recommendations-rust-all-crossWorkspaceMode"
      responses:
        "200":
          description: Items visually similar to the given item
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/recommendations-rust-all-RecommendationResponseSchemaV2"
        "404":
          $ref: "#/components/responses/recommendations-rust-all-404-no-recommendation"
        "500":
          $ref: "#/components/responses/recommendations-rust-all-500-error-occurred"
      x-snr-doc-urls:
        - /api-reference/ai-recommendations#tag/Recommendations/operation/GetSimilarVisualItems
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/recommendations/v2/recommend/items/%7BitemId%7D/similar/visual?minNumItems=SOME_INTEGER_VALUE&maxNumItems=SOME_INTEGER_VALUE&clientUUID=SOME_STRING_VALUE&excludePurchasedItems=SOME_BOOLEAN_VALUE&excludePurchasedItemsSinceDays=SOME_INTEGER_VALUE&filters=SOME_STRING_VALUE&elastic%3Afilters=SOME_STRING_VALUE&itemCatalogId=SOME_STRING_VALUE&campaignId=SOME_STRING_VALUE&campaignName=SOME_STRING_VALUE&distinctFilter=SOME_OBJECT_VALUE&includeContextItems=SOME_BOOLEAN_VALUE&params=source%3Amobile&inventoryChannelId=SOME_STRING_VALUE&crossWorkspaceMode=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", "/recommendations/v2/recommend/items/%7BitemId%7D/similar/visual?minNumItems=SOME_INTEGER_VALUE&maxNumItems=SOME_INTEGER_VALUE&clientUUID=SOME_STRING_VALUE&excludePurchasedItems=SOME_BOOLEAN_VALUE&excludePurchasedItemsSinceDays=SOME_INTEGER_VALUE&filters=SOME_STRING_VALUE&elastic%3Afilters=SOME_STRING_VALUE&itemCatalogId=SOME_STRING_VALUE&campaignId=SOME_STRING_VALUE&campaignName=SOME_STRING_VALUE&distinctFilter=SOME_OBJECT_VALUE&includeContextItems=SOME_BOOLEAN_VALUE&params=source%3Amobile&inventoryChannelId=SOME_STRING_VALUE&crossWorkspaceMode=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/recommendations/v2/recommend/items/%7BitemId%7D/similar/visual?minNumItems=SOME_INTEGER_VALUE&maxNumItems=SOME_INTEGER_VALUE&clientUUID=SOME_STRING_VALUE&excludePurchasedItems=SOME_BOOLEAN_VALUE&excludePurchasedItemsSinceDays=SOME_INTEGER_VALUE&filters=SOME_STRING_VALUE&elastic%3Afilters=SOME_STRING_VALUE&itemCatalogId=SOME_STRING_VALUE&campaignId=SOME_STRING_VALUE&campaignName=SOME_STRING_VALUE&distinctFilter=SOME_OBJECT_VALUE&includeContextItems=SOME_BOOLEAN_VALUE&params=source%3Amobile&inventoryChannelId=SOME_STRING_VALUE&crossWorkspaceMode=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": "/recommendations/v2/recommend/items/%7BitemId%7D/similar/visual?minNumItems=SOME_INTEGER_VALUE&maxNumItems=SOME_INTEGER_VALUE&clientUUID=SOME_STRING_VALUE&excludePurchasedItems=SOME_BOOLEAN_VALUE&excludePurchasedItemsSinceDays=SOME_INTEGER_VALUE&filters=SOME_STRING_VALUE&elastic%3Afilters=SOME_STRING_VALUE&itemCatalogId=SOME_STRING_VALUE&campaignId=SOME_STRING_VALUE&campaignName=SOME_STRING_VALUE&distinctFilter=SOME_OBJECT_VALUE&includeContextItems=SOME_BOOLEAN_VALUE&params=source%3Amobile&inventoryChannelId=SOME_STRING_VALUE&crossWorkspaceMode=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/recommendations/v2/recommend/items/%7BitemId%7D/similar/visual');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'minNumItems' => 'SOME_INTEGER_VALUE',
              'maxNumItems' => 'SOME_INTEGER_VALUE',
              'clientUUID' => 'SOME_STRING_VALUE',
              'excludePurchasedItems' => 'SOME_BOOLEAN_VALUE',
              'excludePurchasedItemsSinceDays' => 'SOME_INTEGER_VALUE',
              'filters' => 'SOME_STRING_VALUE',
              'elastic:filters' => 'SOME_STRING_VALUE',
              'itemCatalogId' => 'SOME_STRING_VALUE',
              'campaignId' => 'SOME_STRING_VALUE',
              'campaignName' => 'SOME_STRING_VALUE',
              'distinctFilter' => 'SOME_OBJECT_VALUE',
              'includeContextItems' => 'SOME_BOOLEAN_VALUE',
              'params' => 'source:mobile',
              'inventoryChannelId' => 'SOME_STRING_VALUE',
              'crossWorkspaceMode' => '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/recommendations/v2/recommend/items/%7BitemId%7D/similar/visual?minNumItems=SOME_INTEGER_VALUE&maxNumItems=SOME_INTEGER_VALUE&clientUUID=SOME_STRING_VALUE&excludePurchasedItems=SOME_BOOLEAN_VALUE&excludePurchasedItemsSinceDays=SOME_INTEGER_VALUE&filters=SOME_STRING_VALUE&elastic%3Afilters=SOME_STRING_VALUE&itemCatalogId=SOME_STRING_VALUE&campaignId=SOME_STRING_VALUE&campaignName=SOME_STRING_VALUE&distinctFilter=SOME_OBJECT_VALUE&includeContextItems=SOME_BOOLEAN_VALUE&params=source%3Amobile&inventoryChannelId=SOME_STRING_VALUE&crossWorkspaceMode=SOME_BOOLEAN_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    post:
      summary: Visually similar
      description: |
        Returns items visually similar to the given items.

        **Note:** The definition of an *item* encompasses products, but also articles, images, videos, and any other entities in the item feed.

        ---

        **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:** `RECOMMENDATIONS_V2_VISUAL_RECOMMENDATIONS_READ`
      operationId: PostSimilarVisualItems
      tags:
        - Recommendations
      security:
        - TrackerKey: []
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/recommendations-rust-all-inPathItemId"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/recommendations-rust-all-SlotsBodySchemaV2"
        description: Definition of the requested recommendation
        required: true
      responses:
        "200":
          description: Items visually similar to the given item
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/recommendations-rust-all-SlotsRecommendationResponseSchemaV2"
        "404":
          $ref: "#/components/responses/recommendations-rust-all-404-no-recommendation"
        "500":
          $ref: "#/components/responses/recommendations-rust-all-500-error-occurred"
      x-snr-doc-urls:
        - /api-reference/ai-recommendations#tag/Recommendations/operation/PostSimilarVisualItems
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/recommendations/v2/recommend/items/%7BitemId%7D/similar/visual \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"campaignId":"defaultCampaign","campaignName":"string","catalogId":"default","clientUUID":"string","contextItemIds":["string"],"includeContextItems":false,"filterRules":{"excludePurchasedItems":false,"excludePurchasedItemsSinceDays":0,"elasticExcludePurchasedItems":false,"elasticExcludePurchasedItemsSinceDays":0},"displayAttributes":"string","abTestContext":{"experimentId":0,"variantId":"string","requestedCampaignId":"string"},"params":{"source":"mobile"},"inventoryContext":{"channelIds":["string"]},"keepSlotsOrder":true,"personalizeSlotsOrder":false,"sortMetric":"string","boostingParameters":{"metric":"string","strength":0.1,"personalizedBoostingStrength":0},"boostingStrategies":[{"name":"string","condition":"string","strength":1}],"crossWorkspaceMode":{"enabled":true},"slots":[{"name":"string","minNumItems":1,"maxNumItems":5,"shuffleNumItems":1,"filters":"string","elasticFilters":"string","distinctFilter":{"elastic":true,"filters":[{"field":"string","maxNumItems":0,"levelRangeModifier":0}]}}]}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"campaignId\":\"defaultCampaign\",\"campaignName\":\"string\",\"catalogId\":\"default\",\"clientUUID\":\"string\",\"contextItemIds\":[\"string\"],\"includeContextItems\":false,\"filterRules\":{\"excludePurchasedItems\":false,\"excludePurchasedItemsSinceDays\":0,\"elasticExcludePurchasedItems\":false,\"elasticExcludePurchasedItemsSinceDays\":0},\"displayAttributes\":\"string\",\"abTestContext\":{\"experimentId\":0,\"variantId\":\"string\",\"requestedCampaignId\":\"string\"},\"params\":{\"source\":\"mobile\"},\"inventoryContext\":{\"channelIds\":[\"string\"]},\"keepSlotsOrder\":true,\"personalizeSlotsOrder\":false,\"sortMetric\":\"string\",\"boostingParameters\":{\"metric\":\"string\",\"strength\":0.1,\"personalizedBoostingStrength\":0},\"boostingStrategies\":[{\"name\":\"string\",\"condition\":\"string\",\"strength\":1}],\"crossWorkspaceMode\":{\"enabled\":true},\"slots\":[{\"name\":\"string\",\"minNumItems\":1,\"maxNumItems\":5,\"shuffleNumItems\":1,\"filters\":\"string\",\"elasticFilters\":\"string\",\"distinctFilter\":{\"elastic\":true,\"filters\":[{\"field\":\"string\",\"maxNumItems\":0,\"levelRangeModifier\":0}]}}]}"

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

            conn.request("POST", "/recommendations/v2/recommend/items/%7BitemId%7D/similar/visual", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "campaignId": "defaultCampaign",
              "campaignName": "string",
              "catalogId": "default",
              "clientUUID": "string",
              "contextItemIds": [
                "string"
              ],
              "includeContextItems": false,
              "filterRules": {
                "excludePurchasedItems": false,
                "excludePurchasedItemsSinceDays": 0,
                "elasticExcludePurchasedItems": false,
                "elasticExcludePurchasedItemsSinceDays": 0
              },
              "displayAttributes": "string",
              "abTestContext": {
                "experimentId": 0,
                "variantId": "string",
                "requestedCampaignId": "string"
              },
              "params": {
                "source": "mobile"
              },
              "inventoryContext": {
                "channelIds": [
                  "string"
                ]
              },
              "keepSlotsOrder": true,
              "personalizeSlotsOrder": false,
              "sortMetric": "string",
              "boostingParameters": {
                "metric": "string",
                "strength": 0.1,
                "personalizedBoostingStrength": 0
              },
              "boostingStrategies": [
                {
                  "name": "string",
                  "condition": "string",
                  "strength": 1
                }
              ],
              "crossWorkspaceMode": {
                "enabled": true
              },
              "slots": [
                {
                  "name": "string",
                  "minNumItems": 1,
                  "maxNumItems": 5,
                  "shuffleNumItems": 1,
                  "filters": "string",
                  "elasticFilters": "string",
                  "distinctFilter": {
                    "elastic": true,
                    "filters": [
                      {
                        "field": "string",
                        "maxNumItems": 0,
                        "levelRangeModifier": 0
                      }
                    ]
                  }
                }
              ]
            });

            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/recommendations/v2/recommend/items/%7BitemId%7D/similar/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": "/recommendations/v2/recommend/items/%7BitemId%7D/similar/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({
              campaignId: 'defaultCampaign',
              campaignName: 'string',
              catalogId: 'default',
              clientUUID: 'string',
              contextItemIds: ['string'],
              includeContextItems: false,
              filterRules: {
                excludePurchasedItems: false,
                excludePurchasedItemsSinceDays: 0,
                elasticExcludePurchasedItems: false,
                elasticExcludePurchasedItemsSinceDays: 0
              },
              displayAttributes: 'string',
              abTestContext: {experimentId: 0, variantId: 'string', requestedCampaignId: 'string'},
              params: {source: 'mobile'},
              inventoryContext: {channelIds: ['string']},
              keepSlotsOrder: true,
              personalizeSlotsOrder: false,
              sortMetric: 'string',
              boostingParameters: {metric: 'string', strength: 0.1, personalizedBoostingStrength: 0},
              boostingStrategies: [{name: 'string', condition: 'string', strength: 1}],
              crossWorkspaceMode: {enabled: true},
              slots: [
                {
                  name: 'string',
                  minNumItems: 1,
                  maxNumItems: 5,
                  shuffleNumItems: 1,
                  filters: 'string',
                  elasticFilters: 'string',
                  distinctFilter: {
                    elastic: true,
                    filters: [{field: 'string', maxNumItems: 0, levelRangeModifier: 0}]
                  }
                }
              ]
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/recommendations/v2/recommend/items/%7BitemId%7D/similar/visual');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"campaignId":"defaultCampaign","campaignName":"string","catalogId":"default","clientUUID":"string","contextItemIds":["string"],"includeContextItems":false,"filterRules":{"excludePurchasedItems":false,"excludePurchasedItemsSinceDays":0,"elasticExcludePurchasedItems":false,"elasticExcludePurchasedItemsSinceDays":0},"displayAttributes":"string","abTestContext":{"experimentId":0,"variantId":"string","requestedCampaignId":"string"},"params":{"source":"mobile"},"inventoryContext":{"channelIds":["string"]},"keepSlotsOrder":true,"personalizeSlotsOrder":false,"sortMetric":"string","boostingParameters":{"metric":"string","strength":0.1,"personalizedBoostingStrength":0},"boostingStrategies":[{"name":"string","condition":"string","strength":1}],"crossWorkspaceMode":{"enabled":true},"slots":[{"name":"string","minNumItems":1,"maxNumItems":5,"shuffleNumItems":1,"filters":"string","elasticFilters":"string","distinctFilter":{"elastic":true,"filters":[{"field":"string","maxNumItems":0,"levelRangeModifier":0}]}}]}');

            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/recommendations/v2/recommend/items/%7BitemId%7D/similar/visual")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"campaignId\":\"defaultCampaign\",\"campaignName\":\"string\",\"catalogId\":\"default\",\"clientUUID\":\"string\",\"contextItemIds\":[\"string\"],\"includeContextItems\":false,\"filterRules\":{\"excludePurchasedItems\":false,\"excludePurchasedItemsSinceDays\":0,\"elasticExcludePurchasedItems\":false,\"elasticExcludePurchasedItemsSinceDays\":0},\"displayAttributes\":\"string\",\"abTestContext\":{\"experimentId\":0,\"variantId\":\"string\",\"requestedCampaignId\":\"string\"},\"params\":{\"source\":\"mobile\"},\"inventoryContext\":{\"channelIds\":[\"string\"]},\"keepSlotsOrder\":true,\"personalizeSlotsOrder\":false,\"sortMetric\":\"string\",\"boostingParameters\":{\"metric\":\"string\",\"strength\":0.1,\"personalizedBoostingStrength\":0},\"boostingStrategies\":[{\"name\":\"string\",\"condition\":\"string\",\"strength\":1}],\"crossWorkspaceMode\":{\"enabled\":true},\"slots\":[{\"name\":\"string\",\"minNumItems\":1,\"maxNumItems\":5,\"shuffleNumItems\":1,\"filters\":\"string\",\"elasticFilters\":\"string\",\"distinctFilter\":{\"elastic\":true,\"filters\":[{\"field\":\"string\",\"maxNumItems\":0,\"levelRangeModifier\":0}]}}]}")
              .asString();
  /recommendations/v2/recommend/items/next-interaction:
    get:
      summary: Next interaction
      description: |
        The "next interaction" model recommends items that are most likely to produce a `page.visit` or `product.buy` event.

        **Note:** The definition of an *item* encompasses products, but also articles, images, videos, and any other entities in the item feed.


        ---

        **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:** `RECOMMENDATIONS_V2_NEXT_INTERACTION_RECOMMENDATIONS_READ`
      operationId: NextInteractionRecommendation
      tags:
        - Recommendations
      security:
        - TrackerKey: []
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/recommendations-rust-all-recommendationsClientUUID"
        - $ref: "#/components/parameters/recommendations-rust-all-recommendationsMinNumItems"
        - $ref: "#/components/parameters/recommendations-rust-all-recommendationsMaxNumItems"
        - $ref: "#/components/parameters/recommendations-rust-all-recommendationsCampaignId"
        - $ref: "#/components/parameters/recommendations-rust-all-recommendationsCampaignName"
        - $ref: "#/components/parameters/recommendations-rust-all-recommendationsExcludePurchasedItems"
        - $ref: "#/components/parameters/recommendations-rust-all-recommendationsExcludePurchasedItemsSince"
        - $ref: "#/components/parameters/recommendations-rust-all-filterExpr"
        - $ref: "#/components/parameters/recommendations-rust-all-elasticFilterExpr"
        - $ref: "#/components/parameters/recommendations-rust-all-inParamsItemIdList"
        - $ref: "#/components/parameters/recommendations-rust-all-itemCatalogId"
        - $ref: "#/components/parameters/recommendations-rust-all-recommendationsBoostMetric"
        - $ref: "#/components/parameters/recommendations-rust-all-recommendationsSortMetric"
        - $ref: "#/components/parameters/recommendations-rust-all-distinctFilter"
        - $ref: "#/components/parameters/recommendations-rust-all-recommendationsIncludeContextItems"
        - $ref: "#/components/parameters/recommendations-rust-all-params"
      responses:
        "200":
          description: Next interaction recommendation
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/recommendations-rust-all-RecommendationResponseSchemaV2"
        "404":
          $ref: "#/components/responses/recommendations-rust-all-404-no-recommendation"
        "500":
          $ref: "#/components/responses/recommendations-rust-all-500-error-occurred"
      x-snr-doc-urls:
        - /api-reference/ai-recommendations#tag/Recommendations/operation/NextInteractionRecommendation
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/recommendations/v2/recommend/items/next-interaction?clientUUID=SOME_STRING_VALUE&minNumItems=SOME_INTEGER_VALUE&maxNumItems=SOME_INTEGER_VALUE&campaignId=SOME_STRING_VALUE&campaignName=SOME_STRING_VALUE&excludePurchasedItems=SOME_BOOLEAN_VALUE&excludePurchasedItemsSinceDays=SOME_INTEGER_VALUE&filters=SOME_STRING_VALUE&elastic%3Afilters=SOME_STRING_VALUE&itemId=SOME_ARRAY_VALUE&itemCatalogId=SOME_STRING_VALUE&boostMetric=SOME_STRING_VALUE&sortMetric=SOME_STRING_VALUE&distinctFilter=SOME_OBJECT_VALUE&includeContextItems=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", "/recommendations/v2/recommend/items/next-interaction?clientUUID=SOME_STRING_VALUE&minNumItems=SOME_INTEGER_VALUE&maxNumItems=SOME_INTEGER_VALUE&campaignId=SOME_STRING_VALUE&campaignName=SOME_STRING_VALUE&excludePurchasedItems=SOME_BOOLEAN_VALUE&excludePurchasedItemsSinceDays=SOME_INTEGER_VALUE&filters=SOME_STRING_VALUE&elastic%3Afilters=SOME_STRING_VALUE&itemId=SOME_ARRAY_VALUE&itemCatalogId=SOME_STRING_VALUE&boostMetric=SOME_STRING_VALUE&sortMetric=SOME_STRING_VALUE&distinctFilter=SOME_OBJECT_VALUE&includeContextItems=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/recommendations/v2/recommend/items/next-interaction?clientUUID=SOME_STRING_VALUE&minNumItems=SOME_INTEGER_VALUE&maxNumItems=SOME_INTEGER_VALUE&campaignId=SOME_STRING_VALUE&campaignName=SOME_STRING_VALUE&excludePurchasedItems=SOME_BOOLEAN_VALUE&excludePurchasedItemsSinceDays=SOME_INTEGER_VALUE&filters=SOME_STRING_VALUE&elastic%3Afilters=SOME_STRING_VALUE&itemId=SOME_ARRAY_VALUE&itemCatalogId=SOME_STRING_VALUE&boostMetric=SOME_STRING_VALUE&sortMetric=SOME_STRING_VALUE&distinctFilter=SOME_OBJECT_VALUE&includeContextItems=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": "/recommendations/v2/recommend/items/next-interaction?clientUUID=SOME_STRING_VALUE&minNumItems=SOME_INTEGER_VALUE&maxNumItems=SOME_INTEGER_VALUE&campaignId=SOME_STRING_VALUE&campaignName=SOME_STRING_VALUE&excludePurchasedItems=SOME_BOOLEAN_VALUE&excludePurchasedItemsSinceDays=SOME_INTEGER_VALUE&filters=SOME_STRING_VALUE&elastic%3Afilters=SOME_STRING_VALUE&itemId=SOME_ARRAY_VALUE&itemCatalogId=SOME_STRING_VALUE&boostMetric=SOME_STRING_VALUE&sortMetric=SOME_STRING_VALUE&distinctFilter=SOME_OBJECT_VALUE&includeContextItems=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/recommendations/v2/recommend/items/next-interaction');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'clientUUID' => 'SOME_STRING_VALUE',
              'minNumItems' => 'SOME_INTEGER_VALUE',
              'maxNumItems' => 'SOME_INTEGER_VALUE',
              'campaignId' => 'SOME_STRING_VALUE',
              'campaignName' => 'SOME_STRING_VALUE',
              'excludePurchasedItems' => 'SOME_BOOLEAN_VALUE',
              'excludePurchasedItemsSinceDays' => 'SOME_INTEGER_VALUE',
              'filters' => 'SOME_STRING_VALUE',
              'elastic:filters' => 'SOME_STRING_VALUE',
              'itemId' => 'SOME_ARRAY_VALUE',
              'itemCatalogId' => 'SOME_STRING_VALUE',
              'boostMetric' => 'SOME_STRING_VALUE',
              'sortMetric' => 'SOME_STRING_VALUE',
              'distinctFilter' => 'SOME_OBJECT_VALUE',
              'includeContextItems' => '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/recommendations/v2/recommend/items/next-interaction?clientUUID=SOME_STRING_VALUE&minNumItems=SOME_INTEGER_VALUE&maxNumItems=SOME_INTEGER_VALUE&campaignId=SOME_STRING_VALUE&campaignName=SOME_STRING_VALUE&excludePurchasedItems=SOME_BOOLEAN_VALUE&excludePurchasedItemsSinceDays=SOME_INTEGER_VALUE&filters=SOME_STRING_VALUE&elastic%3Afilters=SOME_STRING_VALUE&itemId=SOME_ARRAY_VALUE&itemCatalogId=SOME_STRING_VALUE&boostMetric=SOME_STRING_VALUE&sortMetric=SOME_STRING_VALUE&distinctFilter=SOME_OBJECT_VALUE&includeContextItems=SOME_BOOLEAN_VALUE&params=source%3Amobile")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    post:
      summary: Next interaction
      description: |
        The "next interaction" model recommends items that are most likely to produce a `page.visit` or `product.buy` event.

        **Note:** The definition of an *item* encompasses products, but also articles, images, videos, and any other entities in the item feed.


        ---

        **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:** `RECOMMENDATIONS_V2_NEXT_INTERACTION_RECOMMENDATIONS_READ`
      operationId: PostNextInteractionRecommendation
      tags:
        - Recommendations
      security:
        - JWT: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/recommendations-rust-all-SlotsBodySchemaV2"
        description: Definition of the requested recommendation
        required: true
      responses:
        "200":
          description: Next interaction recommendations
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/recommendations-rust-all-SlotsRecommendationResponseSchemaV2"
        "404":
          $ref: "#/components/responses/recommendations-rust-all-404-no-recommendation"
        "500":
          $ref: "#/components/responses/recommendations-rust-all-500-error-occurred"
      x-snr-doc-urls:
        - /api-reference/ai-recommendations#tag/Recommendations/operation/PostNextInteractionRecommendation
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/recommendations/v2/recommend/items/next-interaction \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"campaignId":"defaultCampaign","campaignName":"string","catalogId":"default","clientUUID":"string","contextItemIds":["string"],"includeContextItems":false,"filterRules":{"excludePurchasedItems":false,"excludePurchasedItemsSinceDays":0,"elasticExcludePurchasedItems":false,"elasticExcludePurchasedItemsSinceDays":0},"displayAttributes":"string","abTestContext":{"experimentId":0,"variantId":"string","requestedCampaignId":"string"},"params":{"source":"mobile"},"inventoryContext":{"channelIds":["string"]},"keepSlotsOrder":true,"personalizeSlotsOrder":false,"sortMetric":"string","boostingParameters":{"metric":"string","strength":0.1,"personalizedBoostingStrength":0},"boostingStrategies":[{"name":"string","condition":"string","strength":1}],"crossWorkspaceMode":{"enabled":true},"slots":[{"name":"string","minNumItems":1,"maxNumItems":5,"shuffleNumItems":1,"filters":"string","elasticFilters":"string","distinctFilter":{"elastic":true,"filters":[{"field":"string","maxNumItems":0,"levelRangeModifier":0}]}}]}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"campaignId\":\"defaultCampaign\",\"campaignName\":\"string\",\"catalogId\":\"default\",\"clientUUID\":\"string\",\"contextItemIds\":[\"string\"],\"includeContextItems\":false,\"filterRules\":{\"excludePurchasedItems\":false,\"excludePurchasedItemsSinceDays\":0,\"elasticExcludePurchasedItems\":false,\"elasticExcludePurchasedItemsSinceDays\":0},\"displayAttributes\":\"string\",\"abTestContext\":{\"experimentId\":0,\"variantId\":\"string\",\"requestedCampaignId\":\"string\"},\"params\":{\"source\":\"mobile\"},\"inventoryContext\":{\"channelIds\":[\"string\"]},\"keepSlotsOrder\":true,\"personalizeSlotsOrder\":false,\"sortMetric\":\"string\",\"boostingParameters\":{\"metric\":\"string\",\"strength\":0.1,\"personalizedBoostingStrength\":0},\"boostingStrategies\":[{\"name\":\"string\",\"condition\":\"string\",\"strength\":1}],\"crossWorkspaceMode\":{\"enabled\":true},\"slots\":[{\"name\":\"string\",\"minNumItems\":1,\"maxNumItems\":5,\"shuffleNumItems\":1,\"filters\":\"string\",\"elasticFilters\":\"string\",\"distinctFilter\":{\"elastic\":true,\"filters\":[{\"field\":\"string\",\"maxNumItems\":0,\"levelRangeModifier\":0}]}}]}"

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

            conn.request("POST", "/recommendations/v2/recommend/items/next-interaction", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "campaignId": "defaultCampaign",
              "campaignName": "string",
              "catalogId": "default",
              "clientUUID": "string",
              "contextItemIds": [
                "string"
              ],
              "includeContextItems": false,
              "filterRules": {
                "excludePurchasedItems": false,
                "excludePurchasedItemsSinceDays": 0,
                "elasticExcludePurchasedItems": false,
                "elasticExcludePurchasedItemsSinceDays": 0
              },
              "displayAttributes": "string",
              "abTestContext": {
                "experimentId": 0,
                "variantId": "string",
                "requestedCampaignId": "string"
              },
              "params": {
                "source": "mobile"
              },
              "inventoryContext": {
                "channelIds": [
                  "string"
                ]
              },
              "keepSlotsOrder": true,
              "personalizeSlotsOrder": false,
              "sortMetric": "string",
              "boostingParameters": {
                "metric": "string",
                "strength": 0.1,
                "personalizedBoostingStrength": 0
              },
              "boostingStrategies": [
                {
                  "name": "string",
                  "condition": "string",
                  "strength": 1
                }
              ],
              "crossWorkspaceMode": {
                "enabled": true
              },
              "slots": [
                {
                  "name": "string",
                  "minNumItems": 1,
                  "maxNumItems": 5,
                  "shuffleNumItems": 1,
                  "filters": "string",
                  "elasticFilters": "string",
                  "distinctFilter": {
                    "elastic": true,
                    "filters": [
                      {
                        "field": "string",
                        "maxNumItems": 0,
                        "levelRangeModifier": 0
                      }
                    ]
                  }
                }
              ]
            });

            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/recommendations/v2/recommend/items/next-interaction");
            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": "/recommendations/v2/recommend/items/next-interaction",
              "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({
              campaignId: 'defaultCampaign',
              campaignName: 'string',
              catalogId: 'default',
              clientUUID: 'string',
              contextItemIds: ['string'],
              includeContextItems: false,
              filterRules: {
                excludePurchasedItems: false,
                excludePurchasedItemsSinceDays: 0,
                elasticExcludePurchasedItems: false,
                elasticExcludePurchasedItemsSinceDays: 0
              },
              displayAttributes: 'string',
              abTestContext: {experimentId: 0, variantId: 'string', requestedCampaignId: 'string'},
              params: {source: 'mobile'},
              inventoryContext: {channelIds: ['string']},
              keepSlotsOrder: true,
              personalizeSlotsOrder: false,
              sortMetric: 'string',
              boostingParameters: {metric: 'string', strength: 0.1, personalizedBoostingStrength: 0},
              boostingStrategies: [{name: 'string', condition: 'string', strength: 1}],
              crossWorkspaceMode: {enabled: true},
              slots: [
                {
                  name: 'string',
                  minNumItems: 1,
                  maxNumItems: 5,
                  shuffleNumItems: 1,
                  filters: 'string',
                  elasticFilters: 'string',
                  distinctFilter: {
                    elastic: true,
                    filters: [{field: 'string', maxNumItems: 0, levelRangeModifier: 0}]
                  }
                }
              ]
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/recommendations/v2/recommend/items/next-interaction');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"campaignId":"defaultCampaign","campaignName":"string","catalogId":"default","clientUUID":"string","contextItemIds":["string"],"includeContextItems":false,"filterRules":{"excludePurchasedItems":false,"excludePurchasedItemsSinceDays":0,"elasticExcludePurchasedItems":false,"elasticExcludePurchasedItemsSinceDays":0},"displayAttributes":"string","abTestContext":{"experimentId":0,"variantId":"string","requestedCampaignId":"string"},"params":{"source":"mobile"},"inventoryContext":{"channelIds":["string"]},"keepSlotsOrder":true,"personalizeSlotsOrder":false,"sortMetric":"string","boostingParameters":{"metric":"string","strength":0.1,"personalizedBoostingStrength":0},"boostingStrategies":[{"name":"string","condition":"string","strength":1}],"crossWorkspaceMode":{"enabled":true},"slots":[{"name":"string","minNumItems":1,"maxNumItems":5,"shuffleNumItems":1,"filters":"string","elasticFilters":"string","distinctFilter":{"elastic":true,"filters":[{"field":"string","maxNumItems":0,"levelRangeModifier":0}]}}]}');

            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/recommendations/v2/recommend/items/next-interaction")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"campaignId\":\"defaultCampaign\",\"campaignName\":\"string\",\"catalogId\":\"default\",\"clientUUID\":\"string\",\"contextItemIds\":[\"string\"],\"includeContextItems\":false,\"filterRules\":{\"excludePurchasedItems\":false,\"excludePurchasedItemsSinceDays\":0,\"elasticExcludePurchasedItems\":false,\"elasticExcludePurchasedItemsSinceDays\":0},\"displayAttributes\":\"string\",\"abTestContext\":{\"experimentId\":0,\"variantId\":\"string\",\"requestedCampaignId\":\"string\"},\"params\":{\"source\":\"mobile\"},\"inventoryContext\":{\"channelIds\":[\"string\"]},\"keepSlotsOrder\":true,\"personalizeSlotsOrder\":false,\"sortMetric\":\"string\",\"boostingParameters\":{\"metric\":\"string\",\"strength\":0.1,\"personalizedBoostingStrength\":0},\"boostingStrategies\":[{\"name\":\"string\",\"condition\":\"string\",\"strength\":1}],\"crossWorkspaceMode\":{\"enabled\":true},\"slots\":[{\"name\":\"string\",\"minNumItems\":1,\"maxNumItems\":5,\"shuffleNumItems\":1,\"filters\":\"string\",\"elasticFilters\":\"string\",\"distinctFilter\":{\"elastic\":true,\"filters\":[{\"field\":\"string\",\"maxNumItems\":0,\"levelRangeModifier\":0}]}}]}")
              .asString();
  /schema-service/v3/screen-views/{feedSlug}/generate:
    get:
      tags:
        - Screen views
      summary: Generate screen view from feed
      description: |
        When this method is called, the Synerise backend finds all screen view campaigns applicable to the JWT context and returns the screen view with the highest priority (1). Inserts are processed. If an insert can't be processed, the returned `data` is empty.

        **IMPORTANT**: When the request's context is a Workspace or Synerise User JWT, only screen views with the audience set to `ALL` ("Everyone" in the Synerise Web Application) can be generated.

        If the feed doesn't contain any screen views whose audience matches the JWT context of the request, the response is error 404.


        ---

        **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>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3" target="_blank" rel="noopener">Profile (Client)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3" target="_blank" rel="noopener">Anonymous Profile</a>, <span title="Available only on mobile SDKs">Incognito Profile</span>

        **API key permission required:** `SCHEMA_SERVICE_SCHEMA_READ`

        **User role permission required:** `assets_docs: read`
      operationId: generateScreenViewByFeedGetV2
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/schema-service-pathFeedSlug"
      responses:
        "200":
          description: Processed JSON content
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/schema-service-GenerateResponse"
        "400":
          $ref: "#/components/responses/schema-service-genericError"
        "401":
          $ref: "#/components/responses/schema-service-401"
        "403":
          $ref: "#/components/responses/schema-service-403"
        "404":
          $ref: "#/components/responses/schema-service-404"
        "500":
          $ref: "#/components/responses/schema-service-genericError"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Screen-views/operation/generateScreenViewByFeedGetV2
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/schema-service/v3/screen-views/%7BfeedSlug%7D/generate \
              --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", "/schema-service/v3/screen-views/%7BfeedSlug%7D/generate", 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/schema-service/v3/screen-views/%7BfeedSlug%7D/generate");
            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": "/schema-service/v3/screen-views/%7BfeedSlug%7D/generate",
              "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/schema-service/v3/screen-views/%7BfeedSlug%7D/generate');
            $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/schema-service/v3/screen-views/%7BfeedSlug%7D/generate")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    post:
      tags:
        - Screen views
      summary: Generate screen view from feed
      description: |
        When this method is called, the Synerise backend finds all screen view campaigns applicable to the JWT context and returns the screen view with the highest priority (1). Inserts are processed. If an insert can't be processed, the returned `data` is empty.

        **IMPORTANT**: When the request's context is a Workspace or Synerise User JWT, only screen views with the audience set to `ALL` ("Everyone" in the Synerise Web Application) can be generated.

        If the feed doesn't contain any screen views whose audience matches the JWT context of the request, the response is error 404.


        ---

        **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>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3" target="_blank" rel="noopener">Profile (Client)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3" target="_blank" rel="noopener">Anonymous Profile</a>, <span title="Available only on mobile SDKs">Incognito Profile</span>

        **API key permission required:** `SCHEMA_SERVICE_SCHEMA_READ`

        **User role permission required:** `assets_docs: read`
      operationId: generateScreenViewByFeedPostV2
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/schema-service-pathFeedSlug"
      requestBody:
        content:
          application/json:
            schema:
              type: object
              additionalProperties:
                $ref: "#/components/schemas/schema-service-additionalPropertiesForGenerate"
      responses:
        "200":
          description: Processed JSON content
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/schema-service-GenerateResponse"
        "400":
          $ref: "#/components/responses/schema-service-genericError"
        "401":
          $ref: "#/components/responses/schema-service-401"
        "403":
          $ref: "#/components/responses/schema-service-403"
        "404":
          $ref: "#/components/responses/schema-service-404"
        "500":
          $ref: "#/components/responses/schema-service-genericError"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Screen-views/operation/generateScreenViewByFeedPostV2
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/schema-service/v3/screen-views/%7BfeedSlug%7D/generate \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"property1":"string","property2":"string"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"property1\":\"string\",\"property2\":\"string\"}"

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

            conn.request("POST", "/schema-service/v3/screen-views/%7BfeedSlug%7D/generate", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "property1": "string",
              "property2": "string"
            });

            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/schema-service/v3/screen-views/%7BfeedSlug%7D/generate");
            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": "/schema-service/v3/screen-views/%7BfeedSlug%7D/generate",
              "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({property1: 'string', property2: 'string'}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/schema-service/v3/screen-views/%7BfeedSlug%7D/generate');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"property1":"string","property2":"string"}');

            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/schema-service/v3/screen-views/%7BfeedSlug%7D/generate")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"property1\":\"string\",\"property2\":\"string\"}")
              .asString();
  /schema-service/screen-views/create:
    post:
      tags:
        - Screen views
      summary: Create screen view
      description: |
        Create a screen view.

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **User role permission required:** `assets_docs: create`
      operationId: create-screen-view
      security:
        - JWT: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/schema-service-CreateScreenViewRequest"
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/schema-service-screenView"
        "400":
          $ref: "#/components/responses/schema-service-genericError"
        "401":
          $ref: "#/components/responses/schema-service-401"
        "403":
          $ref: "#/components/responses/schema-service-403"
        "404":
          $ref: "#/components/responses/schema-service-404"
        "500":
          $ref: "#/components/responses/schema-service-genericError"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Screen-views/operation/create-screen-view
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/schema-service/screen-views/create \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"priority":99,"name":"string","directoryId":"786c2ec1-fb9a-4593-b705-005b34c18c18","content":{"json":{"property1":null,"property2":null},"documents":["string"],"data":[{"slug":"basket"}],"groups":["43c97b25-4a10-45d0-99b7-d472eea2bb24"],"groupsOrder":false},"audience":{"targetType":"SEGMENT","segments":["string"],"query":"{\"analysis\":{\"title\":\"Unnamed segmentation\",\"description\":\"\",\"unique\":true,\"segments\":[{\"title\":\"Segmentation A\",\"description\":\"\",\"filter\":{\"matching\":true,\"expressions\":[{\"_id\":\"a9b76c8e-34bd-4ac3-be8f-f37041d126bd\",\"name\":\"\",\"type\":\"FUNNEL\",\"matching\":true,\"funnel\":{\"_id\":\"5c759d73-49c6-409f-96a3-b569dff8f8ff\",\"title\":\"Unnamed\",\"completedWithin\":null,\"dateFilter\":{\"type\":\"RELATIVE\",\"offset\":{\"type\":\"DAYS\",\"value\":0},\"duration\":{\"type\":\"DAYS\",\"value\":30}},\"steps\":[{\"_id\":\"78b97ae0-1bc5-45fb-82a4-4f1280cfbdff\",\"title\":\"\",\"action\":{\"id\":944,\"name\":\"page.visit\"},\"eventName\":\"page.visit\",\"expressions\":[]}],\"exact\":false}}]}}]}}"},"schedule":{"enabled":true,"endDate":"2019-08-24T14:15:22Z","endType":"NEVER","parts":[{"startDay":1,"startTime":"08:18:03","endDay":1,"endTime":44283}],"periodType":"ENTIRE","startDate":"2019-08-24T14:15:22Z","startType":"NOW","timezone":"Europe/Warsaw"},"feedId":"30c3a808-1315-453b-94cf-0ccb129b558b"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"priority\":99,\"name\":\"string\",\"directoryId\":\"786c2ec1-fb9a-4593-b705-005b34c18c18\",\"content\":{\"json\":{\"property1\":null,\"property2\":null},\"documents\":[\"string\"],\"data\":[{\"slug\":\"basket\"}],\"groups\":[\"43c97b25-4a10-45d0-99b7-d472eea2bb24\"],\"groupsOrder\":false},\"audience\":{\"targetType\":\"SEGMENT\",\"segments\":[\"string\"],\"query\":\"{\\\"analysis\\\":{\\\"title\\\":\\\"Unnamed segmentation\\\",\\\"description\\\":\\\"\\\",\\\"unique\\\":true,\\\"segments\\\":[{\\\"title\\\":\\\"Segmentation A\\\",\\\"description\\\":\\\"\\\",\\\"filter\\\":{\\\"matching\\\":true,\\\"expressions\\\":[{\\\"_id\\\":\\\"a9b76c8e-34bd-4ac3-be8f-f37041d126bd\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"FUNNEL\\\",\\\"matching\\\":true,\\\"funnel\\\":{\\\"_id\\\":\\\"5c759d73-49c6-409f-96a3-b569dff8f8ff\\\",\\\"title\\\":\\\"Unnamed\\\",\\\"completedWithin\\\":null,\\\"dateFilter\\\":{\\\"type\\\":\\\"RELATIVE\\\",\\\"offset\\\":{\\\"type\\\":\\\"DAYS\\\",\\\"value\\\":0},\\\"duration\\\":{\\\"type\\\":\\\"DAYS\\\",\\\"value\\\":30}},\\\"steps\\\":[{\\\"_id\\\":\\\"78b97ae0-1bc5-45fb-82a4-4f1280cfbdff\\\",\\\"title\\\":\\\"\\\",\\\"action\\\":{\\\"id\\\":944,\\\"name\\\":\\\"page.visit\\\"},\\\"eventName\\\":\\\"page.visit\\\",\\\"expressions\\\":[]}],\\\"exact\\\":false}}]}}]}}\"},\"schedule\":{\"enabled\":true,\"endDate\":\"2019-08-24T14:15:22Z\",\"endType\":\"NEVER\",\"parts\":[{\"startDay\":1,\"startTime\":\"08:18:03\",\"endDay\":1,\"endTime\":44283}],\"periodType\":\"ENTIRE\",\"startDate\":\"2019-08-24T14:15:22Z\",\"startType\":\"NOW\",\"timezone\":\"Europe/Warsaw\"},\"feedId\":\"30c3a808-1315-453b-94cf-0ccb129b558b\"}"

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

            conn.request("POST", "/schema-service/screen-views/create", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "priority": 99,
              "name": "string",
              "directoryId": "786c2ec1-fb9a-4593-b705-005b34c18c18",
              "content": {
                "json": {
                  "property1": null,
                  "property2": null
                },
                "documents": [
                  "string"
                ],
                "data": [
                  {
                    "slug": "basket"
                  }
                ],
                "groups": [
                  "43c97b25-4a10-45d0-99b7-d472eea2bb24"
                ],
                "groupsOrder": false
              },
              "audience": {
                "targetType": "SEGMENT",
                "segments": [
                  "string"
                ],
                "query": "{\"analysis\":{\"title\":\"Unnamed segmentation\",\"description\":\"\",\"unique\":true,\"segments\":[{\"title\":\"Segmentation A\",\"description\":\"\",\"filter\":{\"matching\":true,\"expressions\":[{\"_id\":\"a9b76c8e-34bd-4ac3-be8f-f37041d126bd\",\"name\":\"\",\"type\":\"FUNNEL\",\"matching\":true,\"funnel\":{\"_id\":\"5c759d73-49c6-409f-96a3-b569dff8f8ff\",\"title\":\"Unnamed\",\"completedWithin\":null,\"dateFilter\":{\"type\":\"RELATIVE\",\"offset\":{\"type\":\"DAYS\",\"value\":0},\"duration\":{\"type\":\"DAYS\",\"value\":30}},\"steps\":[{\"_id\":\"78b97ae0-1bc5-45fb-82a4-4f1280cfbdff\",\"title\":\"\",\"action\":{\"id\":944,\"name\":\"page.visit\"},\"eventName\":\"page.visit\",\"expressions\":[]}],\"exact\":false}}]}}]}}"
              },
              "schedule": {
                "enabled": true,
                "endDate": "2019-08-24T14:15:22Z",
                "endType": "NEVER",
                "parts": [
                  {
                    "startDay": 1,
                    "startTime": "08:18:03",
                    "endDay": 1,
                    "endTime": 44283
                  }
                ],
                "periodType": "ENTIRE",
                "startDate": "2019-08-24T14:15:22Z",
                "startType": "NOW",
                "timezone": "Europe/Warsaw"
              },
              "feedId": "30c3a808-1315-453b-94cf-0ccb129b558b"
            });

            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/schema-service/screen-views/create");
            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": "/schema-service/screen-views/create",
              "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({
              priority: 99,
              name: 'string',
              directoryId: '786c2ec1-fb9a-4593-b705-005b34c18c18',
              content: {
                json: {property1: null, property2: null},
                documents: ['string'],
                data: [{slug: 'basket'}],
                groups: ['43c97b25-4a10-45d0-99b7-d472eea2bb24'],
                groupsOrder: false
              },
              audience: {
                targetType: 'SEGMENT',
                segments: ['string'],
                query: '{"analysis":{"title":"Unnamed segmentation","description":"","unique":true,"segments":[{"title":"Segmentation A","description":"","filter":{"matching":true,"expressions":[{"_id":"a9b76c8e-34bd-4ac3-be8f-f37041d126bd","name":"","type":"FUNNEL","matching":true,"funnel":{"_id":"5c759d73-49c6-409f-96a3-b569dff8f8ff","title":"Unnamed","completedWithin":null,"dateFilter":{"type":"RELATIVE","offset":{"type":"DAYS","value":0},"duration":{"type":"DAYS","value":30}},"steps":[{"_id":"78b97ae0-1bc5-45fb-82a4-4f1280cfbdff","title":"","action":{"id":944,"name":"page.visit"},"eventName":"page.visit","expressions":[]}],"exact":false}}]}}]}}'
              },
              schedule: {
                enabled: true,
                endDate: '2019-08-24T14:15:22Z',
                endType: 'NEVER',
                parts: [{startDay: 1, startTime: '08:18:03', endDay: 1, endTime: 44283}],
                periodType: 'ENTIRE',
                startDate: '2019-08-24T14:15:22Z',
                startType: 'NOW',
                timezone: 'Europe/Warsaw'
              },
              feedId: '30c3a808-1315-453b-94cf-0ccb129b558b'
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/schema-service/screen-views/create');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"priority":99,"name":"string","directoryId":"786c2ec1-fb9a-4593-b705-005b34c18c18","content":{"json":{"property1":null,"property2":null},"documents":["string"],"data":[{"slug":"basket"}],"groups":["43c97b25-4a10-45d0-99b7-d472eea2bb24"],"groupsOrder":false},"audience":{"targetType":"SEGMENT","segments":["string"],"query":"{\\"analysis\\":{\\"title\\":\\"Unnamed segmentation\\",\\"description\\":\\"\\",\\"unique\\":true,\\"segments\\":[{\\"title\\":\\"Segmentation A\\",\\"description\\":\\"\\",\\"filter\\":{\\"matching\\":true,\\"expressions\\":[{\\"_id\\":\\"a9b76c8e-34bd-4ac3-be8f-f37041d126bd\\",\\"name\\":\\"\\",\\"type\\":\\"FUNNEL\\",\\"matching\\":true,\\"funnel\\":{\\"_id\\":\\"5c759d73-49c6-409f-96a3-b569dff8f8ff\\",\\"title\\":\\"Unnamed\\",\\"completedWithin\\":null,\\"dateFilter\\":{\\"type\\":\\"RELATIVE\\",\\"offset\\":{\\"type\\":\\"DAYS\\",\\"value\\":0},\\"duration\\":{\\"type\\":\\"DAYS\\",\\"value\\":30}},\\"steps\\":[{\\"_id\\":\\"78b97ae0-1bc5-45fb-82a4-4f1280cfbdff\\",\\"title\\":\\"\\",\\"action\\":{\\"id\\":944,\\"name\\":\\"page.visit\\"},\\"eventName\\":\\"page.visit\\",\\"expressions\\":[]}],\\"exact\\":false}}]}}]}}"},"schedule":{"enabled":true,"endDate":"2019-08-24T14:15:22Z","endType":"NEVER","parts":[{"startDay":1,"startTime":"08:18:03","endDay":1,"endTime":44283}],"periodType":"ENTIRE","startDate":"2019-08-24T14:15:22Z","startType":"NOW","timezone":"Europe/Warsaw"},"feedId":"30c3a808-1315-453b-94cf-0ccb129b558b"}');

            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/schema-service/screen-views/create")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"priority\":99,\"name\":\"string\",\"directoryId\":\"786c2ec1-fb9a-4593-b705-005b34c18c18\",\"content\":{\"json\":{\"property1\":null,\"property2\":null},\"documents\":[\"string\"],\"data\":[{\"slug\":\"basket\"}],\"groups\":[\"43c97b25-4a10-45d0-99b7-d472eea2bb24\"],\"groupsOrder\":false},\"audience\":{\"targetType\":\"SEGMENT\",\"segments\":[\"string\"],\"query\":\"{\\\"analysis\\\":{\\\"title\\\":\\\"Unnamed segmentation\\\",\\\"description\\\":\\\"\\\",\\\"unique\\\":true,\\\"segments\\\":[{\\\"title\\\":\\\"Segmentation A\\\",\\\"description\\\":\\\"\\\",\\\"filter\\\":{\\\"matching\\\":true,\\\"expressions\\\":[{\\\"_id\\\":\\\"a9b76c8e-34bd-4ac3-be8f-f37041d126bd\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"FUNNEL\\\",\\\"matching\\\":true,\\\"funnel\\\":{\\\"_id\\\":\\\"5c759d73-49c6-409f-96a3-b569dff8f8ff\\\",\\\"title\\\":\\\"Unnamed\\\",\\\"completedWithin\\\":null,\\\"dateFilter\\\":{\\\"type\\\":\\\"RELATIVE\\\",\\\"offset\\\":{\\\"type\\\":\\\"DAYS\\\",\\\"value\\\":0},\\\"duration\\\":{\\\"type\\\":\\\"DAYS\\\",\\\"value\\\":30}},\\\"steps\\\":[{\\\"_id\\\":\\\"78b97ae0-1bc5-45fb-82a4-4f1280cfbdff\\\",\\\"title\\\":\\\"\\\",\\\"action\\\":{\\\"id\\\":944,\\\"name\\\":\\\"page.visit\\\"},\\\"eventName\\\":\\\"page.visit\\\",\\\"expressions\\\":[]}],\\\"exact\\\":false}}]}}]}}\"},\"schedule\":{\"enabled\":true,\"endDate\":\"2019-08-24T14:15:22Z\",\"endType\":\"NEVER\",\"parts\":[{\"startDay\":1,\"startTime\":\"08:18:03\",\"endDay\":1,\"endTime\":44283}],\"periodType\":\"ENTIRE\",\"startDate\":\"2019-08-24T14:15:22Z\",\"startType\":\"NOW\",\"timezone\":\"Europe/Warsaw\"},\"feedId\":\"30c3a808-1315-453b-94cf-0ccb129b558b\"}")
              .asString();
  /schema-service/v2/screen-views/createNew:
    post:
      tags:
        - Screen views
      summary: Initialize screen view
      description: |
        Create a screen view. It is created as a blank, without any conditions.

        ---

        **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:** `SCHEMA_SERVICE_SCHEMA_CREATE`

        **User role permission required:** `assets_docs: create`
      operationId: create-new-screen-view
      security:
        - JWT: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/schema-service-CreateRequest"
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/schema-service-screenView"
        "400":
          $ref: "#/components/responses/schema-service-genericError"
        "401":
          $ref: "#/components/responses/schema-service-401"
        "403":
          $ref: "#/components/responses/schema-service-403"
        "404":
          $ref: "#/components/responses/schema-service-404"
        "500":
          $ref: "#/components/responses/schema-service-genericError"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Screen-views/operation/create-new-screen-view
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/schema-service/v2/screen-views/createNew \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"name":"string","directory":"5277859d-f92c-478c-acab-7680a97fea68"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"name\":\"string\",\"directory\":\"5277859d-f92c-478c-acab-7680a97fea68\"}"

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

            conn.request("POST", "/schema-service/v2/screen-views/createNew", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "name": "string",
              "directory": "5277859d-f92c-478c-acab-7680a97fea68"
            });

            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/schema-service/v2/screen-views/createNew");
            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": "/schema-service/v2/screen-views/createNew",
              "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', directory: '5277859d-f92c-478c-acab-7680a97fea68'}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/schema-service/v2/screen-views/createNew');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"name":"string","directory":"5277859d-f92c-478c-acab-7680a97fea68"}');

            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/schema-service/v2/screen-views/createNew")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"name\":\"string\",\"directory\":\"5277859d-f92c-478c-acab-7680a97fea68\"}")
              .asString();
  /schema-service/v2/screen-views/{screenViewId}/content:
    post:
      tags:
        - Screen views
      summary: Add content to screen view
      description: |
        Add content to a screen view. This overwrites any existing content.

        ---

        **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:** `SCHEMA_SERVICE_SCHEMA_CREATE`

        **User role permission required:** `assets_docs: create`
      operationId: create-screen-view-content
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/schema-service-pathScreenViewId"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/schema-service-ScreenViewContent"
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/schema-service-standardApiResponse"
        "400":
          $ref: "#/components/responses/schema-service-genericError"
        "401":
          $ref: "#/components/responses/schema-service-401"
        "403":
          $ref: "#/components/responses/schema-service-403"
        "404":
          $ref: "#/components/responses/schema-service-404"
        "500":
          $ref: "#/components/responses/schema-service-genericError"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Screen-views/operation/create-screen-view-content
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/content \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"json":{"property1":null,"property2":null},"documents":["string"],"data":[{"slug":"basket"}],"groups":["43c97b25-4a10-45d0-99b7-d472eea2bb24"],"groupsOrder":false}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"json\":{\"property1\":null,\"property2\":null},\"documents\":[\"string\"],\"data\":[{\"slug\":\"basket\"}],\"groups\":[\"43c97b25-4a10-45d0-99b7-d472eea2bb24\"],\"groupsOrder\":false}"

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

            conn.request("POST", "/schema-service/v2/screen-views/%7BscreenViewId%7D/content", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "json": {
                "property1": null,
                "property2": null
              },
              "documents": [
                "string"
              ],
              "data": [
                {
                  "slug": "basket"
                }
              ],
              "groups": [
                "43c97b25-4a10-45d0-99b7-d472eea2bb24"
              ],
              "groupsOrder": 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/schema-service/v2/screen-views/%7BscreenViewId%7D/content");
            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": "/schema-service/v2/screen-views/%7BscreenViewId%7D/content",
              "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({
              json: {property1: null, property2: null},
              documents: ['string'],
              data: [{slug: 'basket'}],
              groups: ['43c97b25-4a10-45d0-99b7-d472eea2bb24'],
              groupsOrder: false
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/content');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"json":{"property1":null,"property2":null},"documents":["string"],"data":[{"slug":"basket"}],"groups":["43c97b25-4a10-45d0-99b7-d472eea2bb24"],"groupsOrder":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/schema-service/v2/screen-views/%7BscreenViewId%7D/content")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"json\":{\"property1\":null,\"property2\":null},\"documents\":[\"string\"],\"data\":[{\"slug\":\"basket\"}],\"groups\":[\"43c97b25-4a10-45d0-99b7-d472eea2bb24\"],\"groupsOrder\":false}")
              .asString();
  /schema-service/v2/screen-views/{screenViewId}/audience:
    post:
      tags:
        - Screen views
      summary: Add audience to screen view
      description: |
        Define the audience for a screen view.

        ---

        **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:** `SCHEMA_SERVICE_SCHEMA_CREATE`

        **User role permission required:** `assets_docs: create`
      operationId: create-screen-view-audience
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/schema-service-pathScreenViewId"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/schema-service-Audience"
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/schema-service-standardApiResponse"
        "400":
          $ref: "#/components/responses/schema-service-genericError"
        "401":
          $ref: "#/components/responses/schema-service-401"
        "403":
          $ref: "#/components/responses/schema-service-403"
        "404":
          $ref: "#/components/responses/schema-service-404"
        "500":
          $ref: "#/components/responses/schema-service-genericError"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Screen-views/operation/create-screen-view-audience
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/audience \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"targetType":"SEGMENT","segments":["string"],"query":"{\"analysis\":{\"title\":\"Unnamed segmentation\",\"description\":\"\",\"unique\":true,\"segments\":[{\"title\":\"Segmentation A\",\"description\":\"\",\"filter\":{\"matching\":true,\"expressions\":[{\"_id\":\"a9b76c8e-34bd-4ac3-be8f-f37041d126bd\",\"name\":\"\",\"type\":\"FUNNEL\",\"matching\":true,\"funnel\":{\"_id\":\"5c759d73-49c6-409f-96a3-b569dff8f8ff\",\"title\":\"Unnamed\",\"completedWithin\":null,\"dateFilter\":{\"type\":\"RELATIVE\",\"offset\":{\"type\":\"DAYS\",\"value\":0},\"duration\":{\"type\":\"DAYS\",\"value\":30}},\"steps\":[{\"_id\":\"78b97ae0-1bc5-45fb-82a4-4f1280cfbdff\",\"title\":\"\",\"action\":{\"id\":944,\"name\":\"page.visit\"},\"eventName\":\"page.visit\",\"expressions\":[]}],\"exact\":false}}]}}]}}"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"targetType\":\"SEGMENT\",\"segments\":[\"string\"],\"query\":\"{\\\"analysis\\\":{\\\"title\\\":\\\"Unnamed segmentation\\\",\\\"description\\\":\\\"\\\",\\\"unique\\\":true,\\\"segments\\\":[{\\\"title\\\":\\\"Segmentation A\\\",\\\"description\\\":\\\"\\\",\\\"filter\\\":{\\\"matching\\\":true,\\\"expressions\\\":[{\\\"_id\\\":\\\"a9b76c8e-34bd-4ac3-be8f-f37041d126bd\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"FUNNEL\\\",\\\"matching\\\":true,\\\"funnel\\\":{\\\"_id\\\":\\\"5c759d73-49c6-409f-96a3-b569dff8f8ff\\\",\\\"title\\\":\\\"Unnamed\\\",\\\"completedWithin\\\":null,\\\"dateFilter\\\":{\\\"type\\\":\\\"RELATIVE\\\",\\\"offset\\\":{\\\"type\\\":\\\"DAYS\\\",\\\"value\\\":0},\\\"duration\\\":{\\\"type\\\":\\\"DAYS\\\",\\\"value\\\":30}},\\\"steps\\\":[{\\\"_id\\\":\\\"78b97ae0-1bc5-45fb-82a4-4f1280cfbdff\\\",\\\"title\\\":\\\"\\\",\\\"action\\\":{\\\"id\\\":944,\\\"name\\\":\\\"page.visit\\\"},\\\"eventName\\\":\\\"page.visit\\\",\\\"expressions\\\":[]}],\\\"exact\\\":false}}]}}]}}\"}"

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

            conn.request("POST", "/schema-service/v2/screen-views/%7BscreenViewId%7D/audience", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "targetType": "SEGMENT",
              "segments": [
                "string"
              ],
              "query": "{\"analysis\":{\"title\":\"Unnamed segmentation\",\"description\":\"\",\"unique\":true,\"segments\":[{\"title\":\"Segmentation A\",\"description\":\"\",\"filter\":{\"matching\":true,\"expressions\":[{\"_id\":\"a9b76c8e-34bd-4ac3-be8f-f37041d126bd\",\"name\":\"\",\"type\":\"FUNNEL\",\"matching\":true,\"funnel\":{\"_id\":\"5c759d73-49c6-409f-96a3-b569dff8f8ff\",\"title\":\"Unnamed\",\"completedWithin\":null,\"dateFilter\":{\"type\":\"RELATIVE\",\"offset\":{\"type\":\"DAYS\",\"value\":0},\"duration\":{\"type\":\"DAYS\",\"value\":30}},\"steps\":[{\"_id\":\"78b97ae0-1bc5-45fb-82a4-4f1280cfbdff\",\"title\":\"\",\"action\":{\"id\":944,\"name\":\"page.visit\"},\"eventName\":\"page.visit\",\"expressions\":[]}],\"exact\":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/schema-service/v2/screen-views/%7BscreenViewId%7D/audience");
            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": "/schema-service/v2/screen-views/%7BscreenViewId%7D/audience",
              "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({
              targetType: 'SEGMENT',
              segments: ['string'],
              query: '{"analysis":{"title":"Unnamed segmentation","description":"","unique":true,"segments":[{"title":"Segmentation A","description":"","filter":{"matching":true,"expressions":[{"_id":"a9b76c8e-34bd-4ac3-be8f-f37041d126bd","name":"","type":"FUNNEL","matching":true,"funnel":{"_id":"5c759d73-49c6-409f-96a3-b569dff8f8ff","title":"Unnamed","completedWithin":null,"dateFilter":{"type":"RELATIVE","offset":{"type":"DAYS","value":0},"duration":{"type":"DAYS","value":30}},"steps":[{"_id":"78b97ae0-1bc5-45fb-82a4-4f1280cfbdff","title":"","action":{"id":944,"name":"page.visit"},"eventName":"page.visit","expressions":[]}],"exact":false}}]}}]}}'
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/audience');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"targetType":"SEGMENT","segments":["string"],"query":"{\\"analysis\\":{\\"title\\":\\"Unnamed segmentation\\",\\"description\\":\\"\\",\\"unique\\":true,\\"segments\\":[{\\"title\\":\\"Segmentation A\\",\\"description\\":\\"\\",\\"filter\\":{\\"matching\\":true,\\"expressions\\":[{\\"_id\\":\\"a9b76c8e-34bd-4ac3-be8f-f37041d126bd\\",\\"name\\":\\"\\",\\"type\\":\\"FUNNEL\\",\\"matching\\":true,\\"funnel\\":{\\"_id\\":\\"5c759d73-49c6-409f-96a3-b569dff8f8ff\\",\\"title\\":\\"Unnamed\\",\\"completedWithin\\":null,\\"dateFilter\\":{\\"type\\":\\"RELATIVE\\",\\"offset\\":{\\"type\\":\\"DAYS\\",\\"value\\":0},\\"duration\\":{\\"type\\":\\"DAYS\\",\\"value\\":30}},\\"steps\\":[{\\"_id\\":\\"78b97ae0-1bc5-45fb-82a4-4f1280cfbdff\\",\\"title\\":\\"\\",\\"action\\":{\\"id\\":944,\\"name\\":\\"page.visit\\"},\\"eventName\\":\\"page.visit\\",\\"expressions\\":[]}],\\"exact\\":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/schema-service/v2/screen-views/%7BscreenViewId%7D/audience")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"targetType\":\"SEGMENT\",\"segments\":[\"string\"],\"query\":\"{\\\"analysis\\\":{\\\"title\\\":\\\"Unnamed segmentation\\\",\\\"description\\\":\\\"\\\",\\\"unique\\\":true,\\\"segments\\\":[{\\\"title\\\":\\\"Segmentation A\\\",\\\"description\\\":\\\"\\\",\\\"filter\\\":{\\\"matching\\\":true,\\\"expressions\\\":[{\\\"_id\\\":\\\"a9b76c8e-34bd-4ac3-be8f-f37041d126bd\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"FUNNEL\\\",\\\"matching\\\":true,\\\"funnel\\\":{\\\"_id\\\":\\\"5c759d73-49c6-409f-96a3-b569dff8f8ff\\\",\\\"title\\\":\\\"Unnamed\\\",\\\"completedWithin\\\":null,\\\"dateFilter\\\":{\\\"type\\\":\\\"RELATIVE\\\",\\\"offset\\\":{\\\"type\\\":\\\"DAYS\\\",\\\"value\\\":0},\\\"duration\\\":{\\\"type\\\":\\\"DAYS\\\",\\\"value\\\":30}},\\\"steps\\\":[{\\\"_id\\\":\\\"78b97ae0-1bc5-45fb-82a4-4f1280cfbdff\\\",\\\"title\\\":\\\"\\\",\\\"action\\\":{\\\"id\\\":944,\\\"name\\\":\\\"page.visit\\\"},\\\"eventName\\\":\\\"page.visit\\\",\\\"expressions\\\":[]}],\\\"exact\\\":false}}]}}]}}\"}")
              .asString();
  /schema-service/v2/screen-views/{screenViewId}/priority:
    put:
      tags:
        - Screen views
      summary: Update screen view priority
      description: |
        Update priority in a screen view.

        ---

        **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:** `SCHEMA_SERVICE_SCHEMA_CREATE`

        **User role permission required:** `assets_docs: create`
      operationId: updateScreenViewPriority
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/schema-service-pathScreenViewId"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/schema-service-screenViewPriority"
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/schema-service-standardApiResponse"
        "400":
          $ref: "#/components/responses/schema-service-genericError"
        "401":
          $ref: "#/components/responses/schema-service-401"
        "403":
          $ref: "#/components/responses/schema-service-403"
        "404":
          $ref: "#/components/responses/schema-service-404"
        "500":
          $ref: "#/components/responses/schema-service-genericError"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Screen-views/operation/updateScreenViewPriority
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request PUT \
              --url https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/priority \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data 99
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "99"

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

            conn.request("PUT", "/schema-service/v2/screen-views/%7BscreenViewId%7D/priority", payload, headers)

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

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

            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/schema-service/v2/screen-views/%7BscreenViewId%7D/priority");
            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": "/schema-service/v2/screen-views/%7BscreenViewId%7D/priority",
              "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(99));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/priority');
            $request->setMethod(HTTP_METH_PUT);

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

            $request->setBody('99');

            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/schema-service/v2/screen-views/%7BscreenViewId%7D/priority")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("99")
              .asString();
  /schema-service/v2/screen-views/{screenViewId}/name:
    put:
      tags:
        - Screen views
      summary: Rename screen view
      description: |
        Update the name of a screen view. You can update the names of active screen views.

        ---

        **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:** `SCHEMA_SERVICE_SCHEMA_CREATE`

        **User role permission required:** `assets_docs: create`
      operationId: updateNameOfScreenView
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/schema-service-pathScreenViewId"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              title: update screenview name
              type: string
              description: New name for the screen view
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/schema-service-standardApiResponse"
        "400":
          $ref: "#/components/responses/schema-service-genericError"
        "401":
          $ref: "#/components/responses/schema-service-401"
        "403":
          $ref: "#/components/responses/schema-service-403"
        "404":
          $ref: "#/components/responses/schema-service-404"
        "500":
          $ref: "#/components/responses/schema-service-genericError"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Screen-views/operation/updateNameOfScreenView
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request PUT \
              --url https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/name \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '"string"'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "\"string\""

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

            conn.request("PUT", "/schema-service/v2/screen-views/%7BscreenViewId%7D/name", payload, headers)

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

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

            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/schema-service/v2/screen-views/%7BscreenViewId%7D/name");
            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": "/schema-service/v2/screen-views/%7BscreenViewId%7D/name",
              "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('string'));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/name');
            $request->setMethod(HTTP_METH_PUT);

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

            $request->setBody('"string"');

            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/schema-service/v2/screen-views/%7BscreenViewId%7D/name")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("\"string\"")
              .asString();
  /schema-service/v2/screen-views/{feedSlug}/generate/by/{identifierType}:
    post:
      tags:
        - Screen views
      summary: Preview screen view with a profile context
      description: |
        This endpoint can be used to preview a generated document as a Workspace or Synerise User. To generate the output as a profile (client), use one of the following methods:
        - [POST `/v3/screen-views/{feedSlug}/generate`](#operation/generateScreenViewByFeedPostV2)
        - [GET `/v3/screen-views/{feedSlug}/generate`](#operation/generateScreenViewByFeedGetV2)


        When this method is called, the Synerise backend finds all screen view campaigns in the requested feed which are applicable to the profile and returns the screen view with the highest priority (1). Inserts are processed. If an insert can't be processed, the returned `data` is empty.


        ---

        **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:** `SCHEMA_SERVICE_SCHEMA_READ`

        **User role permission required:** `assets_docs: read`
      operationId: generateScreenViewByIdentifierPostV2
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/schema-service-pathFeedSlug"
        - $ref: "#/components/parameters/schema-service-pathIdentifierType"
      requestBody:
        content:
          application/json:
            schema:
              title: Generate Screen View Request Data
              type: object
              required:
                - identifierValue
              properties:
                identifierValue:
                  $ref: "#/components/schemas/schema-service-identifierValue"
                params:
                  type: object
                  description: Additional parameters
                  additionalProperties:
                    $ref: "#/components/schemas/schema-service-additionalPropertiesForGenerate"
      responses:
        "200":
          description: Processed JSON content
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/schema-service-GenerateResponse"
        "400":
          $ref: "#/components/responses/schema-service-genericError"
        "401":
          $ref: "#/components/responses/schema-service-401"
        "403":
          $ref: "#/components/responses/schema-service-403"
        "404":
          $ref: "#/components/responses/schema-service-404"
        "500":
          $ref: "#/components/responses/schema-service-genericError"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Screen-views/operation/generateScreenViewByIdentifierPostV2
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/schema-service/v2/screen-views/%7BfeedSlug%7D/generate/by/%7BidentifierType%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"identifierValue":"string","params":{"property1":"string","property2":"string"}}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"identifierValue\":\"string\",\"params\":{\"property1\":\"string\",\"property2\":\"string\"}}"

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

            conn.request("POST", "/schema-service/v2/screen-views/%7BfeedSlug%7D/generate/by/%7BidentifierType%7D", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "identifierValue": "string",
              "params": {
                "property1": "string",
                "property2": "string"
              }
            });

            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/schema-service/v2/screen-views/%7BfeedSlug%7D/generate/by/%7BidentifierType%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": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/schema-service/v2/screen-views/%7BfeedSlug%7D/generate/by/%7BidentifierType%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({identifierValue: 'string', params: {property1: 'string', property2: 'string'}}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/schema-service/v2/screen-views/%7BfeedSlug%7D/generate/by/%7BidentifierType%7D');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"identifierValue":"string","params":{"property1":"string","property2":"string"}}');

            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/schema-service/v2/screen-views/%7BfeedSlug%7D/generate/by/%7BidentifierType%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"identifierValue\":\"string\",\"params\":{\"property1\":\"string\",\"property2\":\"string\"}}")
              .asString();
  /schema-service/v2/screen-views/feeds:
    get:
      tags:
        - Screen views
      summary: List screen view feeds
      description: |
        Returns a list of screen view feeds.

        ---

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

        **API key permission required:** `SCHEMA_SERVICE_SCHEMA_CREATE`

        **User role permission required:** `assets_docs: create`
      operationId: feed-list
      security:
        - JWT: []
      responses:
        "200":
          description: List of feeds
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/schema-service-Feed"
        "400":
          $ref: "#/components/responses/schema-service-genericError"
        "401":
          $ref: "#/components/responses/schema-service-401"
        "403":
          $ref: "#/components/responses/schema-service-403"
        "404":
          $ref: "#/components/responses/schema-service-404"
        "500":
          $ref: "#/components/responses/schema-service-genericError"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Screen-views/operation/feed-list
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/schema-service/v2/screen-views/feeds \
              --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", "/schema-service/v2/screen-views/feeds", 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/schema-service/v2/screen-views/feeds");
            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": "/schema-service/v2/screen-views/feeds",
              "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/schema-service/v2/screen-views/feeds');
            $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/schema-service/v2/screen-views/feeds")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    post:
      tags:
        - Screen views
      summary: Create screen view feed
      description: |
        Create a new screen view feed.

        ---

        **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:** `SCHEMA_SERVICE_SCHEMA_CREATE`

        **User role permission required:** `assets_docs: create`
      operationId: add-feed
      security:
        - JWT: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/schema-service-ScreenViewFeed"
      responses:
        "200":
          description: Feed created
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/schema-service-Feed"
        "400":
          $ref: "#/components/responses/schema-service-genericError"
        "401":
          $ref: "#/components/responses/schema-service-401"
        "403":
          $ref: "#/components/responses/schema-service-403"
        "404":
          $ref: "#/components/responses/schema-service-404"
        "500":
          $ref: "#/components/responses/schema-service-genericError"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Screen-views/operation/add-feed
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/schema-service/v2/screen-views/feeds \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"slug":"string","name":"string"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"slug\":\"string\",\"name\":\"string\"}"

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

            conn.request("POST", "/schema-service/v2/screen-views/feeds", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "slug": "string",
              "name": "string"
            });

            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/schema-service/v2/screen-views/feeds");
            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": "/schema-service/v2/screen-views/feeds",
              "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({slug: 'string', name: 'string'}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/schema-service/v2/screen-views/feeds');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"slug":"string","name":"string"}');

            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/schema-service/v2/screen-views/feeds")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"slug\":\"string\",\"name\":\"string\"}")
              .asString();
  /schema-service/v2/screen-views:
    get:
      tags:
        - Screen views
      summary: List screen views
      description: |
        Returns a paginated list of screen views.

        ---

        **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:** `SCHEMA_SERVICE_SCHEMA_CREATE`

        **User role permission required:** `assets_docs: create`
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/schema-service-queryPage"
        - $ref: "#/components/parameters/schema-service-queryLimit"
        - $ref: "#/components/parameters/schema-service-querySearch"
        - $ref: "#/components/parameters/schema-service-queryDirectoryId"
        - $ref: "#/components/parameters/schema-service-queryStatus"
        - $ref: "#/components/parameters/schema-service-queryFeedId"
      responses:
        "200":
          description: List of screen views
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/schema-service-ScreenViewsListResponse"
        "400":
          $ref: "#/components/responses/schema-service-genericError"
        "401":
          $ref: "#/components/responses/schema-service-401"
        "403":
          $ref: "#/components/responses/schema-service-403"
        "404":
          $ref: "#/components/responses/schema-service-404"
        "500":
          $ref: "#/components/responses/schema-service-genericError"
      operationId: screen-views-list
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Screen-views/operation/screen-views-list
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/schema-service/v2/screen-views?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE&search=SOME_STRING_VALUE&directoryId=SOME_STRING_VALUE&status=SOME_STRING_VALUE&feedId=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", "/schema-service/v2/screen-views?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE&search=SOME_STRING_VALUE&directoryId=SOME_STRING_VALUE&status=SOME_STRING_VALUE&feedId=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/schema-service/v2/screen-views?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE&search=SOME_STRING_VALUE&directoryId=SOME_STRING_VALUE&status=SOME_STRING_VALUE&feedId=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": "/schema-service/v2/screen-views?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE&search=SOME_STRING_VALUE&directoryId=SOME_STRING_VALUE&status=SOME_STRING_VALUE&feedId=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/schema-service/v2/screen-views');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'page' => 'SOME_NUMBER_VALUE',
              'limit' => 'SOME_NUMBER_VALUE',
              'search' => 'SOME_STRING_VALUE',
              'directoryId' => 'SOME_STRING_VALUE',
              'status' => 'SOME_STRING_VALUE',
              'feedId' => '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/schema-service/v2/screen-views?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE&search=SOME_STRING_VALUE&directoryId=SOME_STRING_VALUE&status=SOME_STRING_VALUE&feedId=SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /schema-service/v2/screen-views/{screenViewId}:
    get:
      tags:
        - Screen views
      summary: Get screen view
      description: |
        Retrieve the details of a screen view.

        ---

        **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:** `SCHEMA_SERVICE_SCHEMA_READ`

        **User role permission required:** `assets_docs: read`
      operationId: get-screen-view
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/schema-service-pathScreenViewId"
      responses:
        "200":
          description: Details of the screen view
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/schema-service-screenView"
        "400":
          $ref: "#/components/responses/schema-service-genericError"
        "401":
          $ref: "#/components/responses/schema-service-401"
        "403":
          $ref: "#/components/responses/schema-service-403"
        "404":
          $ref: "#/components/responses/schema-service-404"
        "500":
          $ref: "#/components/responses/schema-service-genericError"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Screen-views/operation/get-screen-view
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%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", "/schema-service/v2/screen-views/%7BscreenViewId%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/schema-service/v2/screen-views/%7BscreenViewId%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": "/schema-service/v2/screen-views/%7BscreenViewId%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/schema-service/v2/screen-views/%7BscreenViewId%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/schema-service/v2/screen-views/%7BscreenViewId%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    delete:
      tags:
        - Screen views
      summary: Delete screen view
      description: |
        Delete a screen view.

        ---

        **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:** `SCHEMA_SERVICE_SCHEMA_DELETE`

        **User role permission required:** `assets_docs: delete`
      operationId: delete-screen-view
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/schema-service-pathScreenViewId"
      responses:
        "200":
          description: Screen view deleted
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/schema-service-standardApiResponse"
        "400":
          $ref: "#/components/responses/schema-service-genericError"
        "401":
          $ref: "#/components/responses/schema-service-401"
        "403":
          $ref: "#/components/responses/schema-service-403"
        "404":
          $ref: "#/components/responses/schema-service-404"
        "500":
          $ref: "#/components/responses/schema-service-genericError"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Screen-views/operation/delete-screen-view
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request DELETE \
              --url https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%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", "/schema-service/v2/screen-views/%7BscreenViewId%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/schema-service/v2/screen-views/%7BscreenViewId%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": "/schema-service/v2/screen-views/%7BscreenViewId%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/schema-service/v2/screen-views/%7BscreenViewId%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/schema-service/v2/screen-views/%7BscreenViewId%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /schema-service/v2/screen-views/{screenViewId}/copy:
    post:
      tags:
        - Screen views
      summary: Copy screen view
      description: |
        Copy a screen view. The copy receives the DRAFT status, regardless of the status of the original screen view.

        ---

        **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:** `SCHEMA_SERVICE_SCHEMA_CREATE`

        **User role permission required:** `assets_docs: create`
      operationId: copy-screen-view
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/schema-service-pathScreenViewId"
      responses:
        "200":
          description: Data of the created copy
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/schema-service-screenViewMetadata"
        "400":
          $ref: "#/components/responses/schema-service-genericError"
        "401":
          $ref: "#/components/responses/schema-service-401"
        "403":
          $ref: "#/components/responses/schema-service-403"
        "404":
          $ref: "#/components/responses/schema-service-404"
        "500":
          $ref: "#/components/responses/schema-service-genericError"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Screen-views/operation/copy-screen-view
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/copy \
              --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", "/schema-service/v2/screen-views/%7BscreenViewId%7D/copy", 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/schema-service/v2/screen-views/%7BscreenViewId%7D/copy");
            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": "/schema-service/v2/screen-views/%7BscreenViewId%7D/copy",
              "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/schema-service/v2/screen-views/%7BscreenViewId%7D/copy');
            $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/schema-service/v2/screen-views/%7BscreenViewId%7D/copy")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /schema-service/v2/screen-views/{screenViewId}/predecessors:
    get:
      tags:
        - Screen views
      summary: Get predecessors for screen view
      description: |
        Retrieve information about documents or screen views that refer **to** the requested screen view.

        ---

        **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:** `SCHEMA_SERVICE_SCHEMA_READ`

        **User role permission required:** `assets_docs: read`
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/schema-service-pathScreenViewId"
      responses:
        "200":
          description: Entities which refer to the requested screen view
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/schema-service-GraphObject"
        "400":
          $ref: "#/components/responses/schema-service-genericError"
        "401":
          $ref: "#/components/responses/schema-service-401"
        "403":
          $ref: "#/components/responses/schema-service-403"
        "404":
          $ref: "#/components/responses/schema-service-404"
        "500":
          $ref: "#/components/responses/schema-service-genericError"
      operationId: screenview-predecessors-get
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Screen-views/operation/screenview-predecessors-get
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/predecessors \
              --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", "/schema-service/v2/screen-views/%7BscreenViewId%7D/predecessors", 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/schema-service/v2/screen-views/%7BscreenViewId%7D/predecessors");
            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": "/schema-service/v2/screen-views/%7BscreenViewId%7D/predecessors",
              "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/schema-service/v2/screen-views/%7BscreenViewId%7D/predecessors');
            $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/schema-service/v2/screen-views/%7BscreenViewId%7D/predecessors")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /schema-service/v2/screen-views/{screenViewId}/successors:
    get:
      tags:
        - Screen views
      summary: Get successors for screen view
      description: |
        Retrieve information about documents referenced **from** the requested screen view.

        ---

        **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:** `SCHEMA_SERVICE_SCHEMA_READ`

        **User role permission required:** `assets_docs: read`
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/schema-service-pathScreenViewId"
      responses:
        "200":
          description: Documents referenced from the requested screen view
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/schema-service-GraphObject"
        "400":
          $ref: "#/components/responses/schema-service-genericError"
        "401":
          $ref: "#/components/responses/schema-service-401"
        "403":
          $ref: "#/components/responses/schema-service-403"
        "404":
          $ref: "#/components/responses/schema-service-404"
        "500":
          $ref: "#/components/responses/schema-service-genericError"
      operationId: screenview-successors-get
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Screen-views/operation/screenview-successors-get
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/successors \
              --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", "/schema-service/v2/screen-views/%7BscreenViewId%7D/successors", 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/schema-service/v2/screen-views/%7BscreenViewId%7D/successors");
            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": "/schema-service/v2/screen-views/%7BscreenViewId%7D/successors",
              "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/schema-service/v2/screen-views/%7BscreenViewId%7D/successors');
            $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/schema-service/v2/screen-views/%7BscreenViewId%7D/successors")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /schema-service/v2/screen-views/directory:
    get:
      tags:
        - Screen views
      summary: List screen view directories
      description: |
        Returns a list of screen view directories.

        ---

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

        **API key permission required:** `SCHEMA_SERVICE_SCHEMA_CREATE`

        **User role permission required:** `assets_docs: create`
      security:
        - JWT: []
      responses:
        "200":
          description: List of directories
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/schema-service-Directory"
        "400":
          $ref: "#/components/responses/schema-service-genericError"
        "401":
          $ref: "#/components/responses/schema-service-401"
        "403":
          $ref: "#/components/responses/schema-service-403"
        "404":
          $ref: "#/components/responses/schema-service-404"
        "500":
          $ref: "#/components/responses/schema-service-genericError"
      operationId: directory-list
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Screen-views/operation/directory-list
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/schema-service/v2/screen-views/directory \
              --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", "/schema-service/v2/screen-views/directory", 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/schema-service/v2/screen-views/directory");
            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": "/schema-service/v2/screen-views/directory",
              "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/schema-service/v2/screen-views/directory');
            $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/schema-service/v2/screen-views/directory")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    post:
      tags:
        - Screen views
      summary: Add screen view directory
      description: |
        Create a directory for screen views.

        ---

        **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:** `SCHEMA_SERVICE_SCHEMA_CREATE`

        **User role permission required:** `assets_docs: create`
      operationId: add-directory
      security:
        - JWT: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/schema-service-NewDirectory"
      responses:
        "200":
          description: Directory created
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/schema-service-Directory"
        "400":
          $ref: "#/components/responses/schema-service-genericError"
        "401":
          $ref: "#/components/responses/schema-service-401"
        "403":
          $ref: "#/components/responses/schema-service-403"
        "404":
          $ref: "#/components/responses/schema-service-404"
        "500":
          $ref: "#/components/responses/schema-service-genericError"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Screen-views/operation/add-directory
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/schema-service/v2/screen-views/directory \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"name":"string"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"name\":\"string\"}"

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

            conn.request("POST", "/schema-service/v2/screen-views/directory", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "name": "string"
            });

            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/schema-service/v2/screen-views/directory");
            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": "/schema-service/v2/screen-views/directory",
              "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'}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/schema-service/v2/screen-views/directory');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"name":"string"}');

            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/schema-service/v2/screen-views/directory")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"name\":\"string\"}")
              .asString();
  /schema-service/v2/screen-views/directory/{directoryId}:
    post:
      tags:
        - Screen views
      summary: Rename screen view directory
      description: |
        Update the name of a screen view directory.

        ---

        **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:** `SCHEMA_SERVICE_SCHEMA_DELETE`

        **User role permission required:** `assets_docs: delete`
      operationId: update-name-directory
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/schema-service-pathDirectoryId"
      requestBody:
        content:
          application/json:
            schema:
              title: update screenview directory name
              type: object
              required:
                - name
              properties:
                name:
                  type: string
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/schema-service-Directory"
        "400":
          $ref: "#/components/responses/schema-service-genericError"
        "401":
          $ref: "#/components/responses/schema-service-401"
        "403":
          $ref: "#/components/responses/schema-service-403"
        "404":
          $ref: "#/components/responses/schema-service-404"
        "500":
          $ref: "#/components/responses/schema-service-genericError"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Screen-views/operation/update-name-directory
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/schema-service/v2/screen-views/directory/%7BdirectoryId%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"name":"string"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"name\":\"string\"}"

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

            conn.request("POST", "/schema-service/v2/screen-views/directory/%7BdirectoryId%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"
            });

            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/schema-service/v2/screen-views/directory/%7BdirectoryId%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": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/schema-service/v2/screen-views/directory/%7BdirectoryId%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'}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/schema-service/v2/screen-views/directory/%7BdirectoryId%7D');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"name":"string"}');

            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/schema-service/v2/screen-views/directory/%7BdirectoryId%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"name\":\"string\"}")
              .asString();
    delete:
      tags:
        - Screen views
      summary: Delete screen view directory
      description: |
        Delete a screen view directory. The contents are moved into the default directory.

        ---

        **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:** `SCHEMA_SERVICE_SCHEMA_DELETE`

        **User role permission required:** `assets_docs: delete`
      operationId: deleteDirectory
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/schema-service-pathDirectoryId"
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/schema-service-Directory"
        "400":
          $ref: "#/components/responses/schema-service-genericError"
        "401":
          $ref: "#/components/responses/schema-service-401"
        "403":
          $ref: "#/components/responses/schema-service-403"
        "404":
          $ref: "#/components/responses/schema-service-404"
        "500":
          $ref: "#/components/responses/schema-service-genericError"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Screen-views/operation/deleteDirectory
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request DELETE \
              --url https://api.synerise.com/schema-service/v2/screen-views/directory/%7BdirectoryId%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", "/schema-service/v2/screen-views/directory/%7BdirectoryId%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/schema-service/v2/screen-views/directory/%7BdirectoryId%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": "/schema-service/v2/screen-views/directory/%7BdirectoryId%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/schema-service/v2/screen-views/directory/%7BdirectoryId%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/schema-service/v2/screen-views/directory/%7BdirectoryId%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /schema-service/v2/screen-views/{screenViewId}/directory/{directoryId}/attach:
    post:
      tags:
        - Screen views
      summary: Assign screen view to directory
      description: |
        Assign a screen view to a directory. A screen view can only belong to one directory and using this endpoint overwrites the current assignment.

        ---

        **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:** `SCHEMA_SERVICE_SCHEMA_DELETE`

        **User role permission required:** `assets_docs: delete`
      operationId: attach-screen-views-to-directory
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/schema-service-pathScreenViewId"
        - $ref: "#/components/parameters/schema-service-pathDirectoryId"
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/schema-service-DocumentMetadata"
        "400":
          $ref: "#/components/responses/schema-service-genericError"
        "401":
          $ref: "#/components/responses/schema-service-401"
        "403":
          $ref: "#/components/responses/schema-service-403"
        "404":
          $ref: "#/components/responses/schema-service-404"
        "500":
          $ref: "#/components/responses/schema-service-genericError"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Screen-views/operation/attach-screen-views-to-directory
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/directory/%7BdirectoryId%7D/attach \
              --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", "/schema-service/v2/screen-views/%7BscreenViewId%7D/directory/%7BdirectoryId%7D/attach", 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/schema-service/v2/screen-views/%7BscreenViewId%7D/directory/%7BdirectoryId%7D/attach");
            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": "/schema-service/v2/screen-views/%7BscreenViewId%7D/directory/%7BdirectoryId%7D/attach",
              "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/schema-service/v2/screen-views/%7BscreenViewId%7D/directory/%7BdirectoryId%7D/attach');
            $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/schema-service/v2/screen-views/%7BscreenViewId%7D/directory/%7BdirectoryId%7D/attach")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /schema-service/v2/screen-views/{screenViewId}/feed:
    post:
      tags:
        - Screen views
      summary: Assign screen view to feed
      description: |
        Assign a screen view to a feed.

        ---

        **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:** `SCHEMA_SERVICE_SCHEMA_CREATE`

        **User role permission required:** `assets_docs: create`
      operationId: create-screen-view-feed
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/schema-service-pathScreenViewId"
      requestBody:
        content:
          application/json:
            schema:
              type: string
              format: uuid
              description: UUID of the feed to which you want to assign the screen view
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/schema-service-standardApiResponse"
        "400":
          $ref: "#/components/responses/schema-service-genericError"
        "401":
          $ref: "#/components/responses/schema-service-401"
        "403":
          $ref: "#/components/responses/schema-service-403"
        "404":
          $ref: "#/components/responses/schema-service-404"
        "500":
          $ref: "#/components/responses/schema-service-genericError"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Screen-views/operation/create-screen-view-feed
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/feed \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '"497f6eca-6276-4993-bfeb-53cbbbba6f08"'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "\"497f6eca-6276-4993-bfeb-53cbbbba6f08\""

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

            conn.request("POST", "/schema-service/v2/screen-views/%7BscreenViewId%7D/feed", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify("497f6eca-6276-4993-bfeb-53cbbbba6f08");

            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/schema-service/v2/screen-views/%7BscreenViewId%7D/feed");
            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": "/schema-service/v2/screen-views/%7BscreenViewId%7D/feed",
              "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('497f6eca-6276-4993-bfeb-53cbbbba6f08'));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/feed');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('"497f6eca-6276-4993-bfeb-53cbbbba6f08"');

            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/schema-service/v2/screen-views/%7BscreenViewId%7D/feed")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"")
              .asString();
  /schema-service/v2/screen-views/feeds/{feedId}:
    post:
      tags:
        - Screen views
      summary: Rename screen view feed
      description: |
        Update the name of a screen view feed.

        ---

        **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:** `SCHEMA_SERVICE_SCHEMA_CREATE`

        **User role permission required:** `assets_docs: create`
      operationId: update-name-feed
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/schema-service-pathFeedId"
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - name
              properties:
                name:
                  type: string
                  description: New name of the feed
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/schema-service-Directory"
        "400":
          $ref: "#/components/responses/schema-service-genericError"
        "401":
          $ref: "#/components/responses/schema-service-401"
        "403":
          $ref: "#/components/responses/schema-service-403"
        "404":
          $ref: "#/components/responses/schema-service-404"
        "500":
          $ref: "#/components/responses/schema-service-genericError"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Screen-views/operation/update-name-feed
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/schema-service/v2/screen-views/feeds/%7BfeedId%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"name":"string"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"name\":\"string\"}"

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

            conn.request("POST", "/schema-service/v2/screen-views/feeds/%7BfeedId%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"
            });

            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/schema-service/v2/screen-views/feeds/%7BfeedId%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": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/schema-service/v2/screen-views/feeds/%7BfeedId%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'}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/schema-service/v2/screen-views/feeds/%7BfeedId%7D');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"name":"string"}');

            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/schema-service/v2/screen-views/feeds/%7BfeedId%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"name\":\"string\"}")
              .asString();
    delete:
      tags:
        - Screen views
      summary: Delete screen view feed
      description: |
        Delete a screen view feed. The screen views currently in this feed are moved to the default feed.

        ---

        **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:** `SCHEMA_SERVICE_SCHEMA_DELETE`

        **User role permission required:** `assets_docs: delete`
      operationId: deleteFeed
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/schema-service-pathFeedId"
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/schema-service-Feed"
        "400":
          $ref: "#/components/responses/schema-service-genericError"
        "401":
          $ref: "#/components/responses/schema-service-401"
        "403":
          $ref: "#/components/responses/schema-service-403"
        "404":
          $ref: "#/components/responses/schema-service-404"
        "500":
          $ref: "#/components/responses/schema-service-genericError"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Screen-views/operation/deleteFeed
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request DELETE \
              --url https://api.synerise.com/schema-service/v2/screen-views/feeds/%7BfeedId%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", "/schema-service/v2/screen-views/feeds/%7BfeedId%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/schema-service/v2/screen-views/feeds/%7BfeedId%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": "/schema-service/v2/screen-views/feeds/%7BfeedId%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/schema-service/v2/screen-views/feeds/%7BfeedId%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/schema-service/v2/screen-views/feeds/%7BfeedId%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /schema-service/scheduler/entry:
    post:
      tags:
        - Screen views
      summary: Schedule object
      description: |
        Add a schedule to a document or screen view.

        ---

        **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:** `SCHEMA_SERVICE_SCHEMA_CREATE`

        **User role permission required:** `assets_docs: create`
      operationId: schedule-object
      security:
        - JWT: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/schema-service-SchedulerRequest"
      responses:
        "200":
          description: Schedule added
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/schema-service-SchedulerResponse"
        "400":
          $ref: "#/components/responses/schema-service-genericError"
        "401":
          $ref: "#/components/responses/schema-service-401"
        "403":
          $ref: "#/components/responses/schema-service-403"
        "404":
          $ref: "#/components/responses/schema-service-404"
        "500":
          $ref: "#/components/responses/schema-service-genericError"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Screen-views/operation/schedule-object
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/schema-service/scheduler/entry \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"externalId":"3200d382-adfe-4314-ab30-798cdd0fcdb5","type":"SCREENVIEW","schedule":{"enabled":true,"endDate":"2019-08-24T14:15:22Z","endType":"NEVER","parts":[{"startDay":1,"startTime":"08:18:03","endDay":1,"endTime":44283}],"periodType":"ENTIRE","startDate":"2019-08-24T14:15:22Z","startType":"NOW","timezone":"Europe/Warsaw"}}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"externalId\":\"3200d382-adfe-4314-ab30-798cdd0fcdb5\",\"type\":\"SCREENVIEW\",\"schedule\":{\"enabled\":true,\"endDate\":\"2019-08-24T14:15:22Z\",\"endType\":\"NEVER\",\"parts\":[{\"startDay\":1,\"startTime\":\"08:18:03\",\"endDay\":1,\"endTime\":44283}],\"periodType\":\"ENTIRE\",\"startDate\":\"2019-08-24T14:15:22Z\",\"startType\":\"NOW\",\"timezone\":\"Europe/Warsaw\"}}"

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

            conn.request("POST", "/schema-service/scheduler/entry", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "externalId": "3200d382-adfe-4314-ab30-798cdd0fcdb5",
              "type": "SCREENVIEW",
              "schedule": {
                "enabled": true,
                "endDate": "2019-08-24T14:15:22Z",
                "endType": "NEVER",
                "parts": [
                  {
                    "startDay": 1,
                    "startTime": "08:18:03",
                    "endDay": 1,
                    "endTime": 44283
                  }
                ],
                "periodType": "ENTIRE",
                "startDate": "2019-08-24T14:15:22Z",
                "startType": "NOW",
                "timezone": "Europe/Warsaw"
              }
            });

            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/schema-service/scheduler/entry");
            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": "/schema-service/scheduler/entry",
              "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({
              externalId: '3200d382-adfe-4314-ab30-798cdd0fcdb5',
              type: 'SCREENVIEW',
              schedule: {
                enabled: true,
                endDate: '2019-08-24T14:15:22Z',
                endType: 'NEVER',
                parts: [{startDay: 1, startTime: '08:18:03', endDay: 1, endTime: 44283}],
                periodType: 'ENTIRE',
                startDate: '2019-08-24T14:15:22Z',
                startType: 'NOW',
                timezone: 'Europe/Warsaw'
              }
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/schema-service/scheduler/entry');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"externalId":"3200d382-adfe-4314-ab30-798cdd0fcdb5","type":"SCREENVIEW","schedule":{"enabled":true,"endDate":"2019-08-24T14:15:22Z","endType":"NEVER","parts":[{"startDay":1,"startTime":"08:18:03","endDay":1,"endTime":44283}],"periodType":"ENTIRE","startDate":"2019-08-24T14:15:22Z","startType":"NOW","timezone":"Europe/Warsaw"}}');

            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/schema-service/scheduler/entry")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"externalId\":\"3200d382-adfe-4314-ab30-798cdd0fcdb5\",\"type\":\"SCREENVIEW\",\"schedule\":{\"enabled\":true,\"endDate\":\"2019-08-24T14:15:22Z\",\"endType\":\"NEVER\",\"parts\":[{\"startDay\":1,\"startTime\":\"08:18:03\",\"endDay\":1,\"endTime\":44283}],\"periodType\":\"ENTIRE\",\"startDate\":\"2019-08-24T14:15:22Z\",\"startType\":\"NOW\",\"timezone\":\"Europe/Warsaw\"}}")
              .asString();
  /schema-service/scheduler/entry/{objectType}/{objectId}:
    get:
      tags:
        - Screen views
      summary: Get schedule the schedule of an object
      description: |
        Get schedule object.

        ---

        **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:** `SCHEMA_SERVICE_SCHEMA_CREATE`

        **User role permission required:** `assets_docs: create`
      operationId: getschedule-object
      security:
        - JWT: []
      parameters:
        - name: objectId
          in: path
          required: true
          description: Screen view or document ID
          schema:
            type: string
            format: uuid
        - name: objectType
          in: path
          required: true
          description: Object type
          schema:
            type: string
            description: Type of the scheduled object
            enum:
              - SCREENVIEW
              - DOCUMENT
      responses:
        "200":
          description: Schedule details
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/schema-service-SchedulerResponse"
        "400":
          $ref: "#/components/responses/schema-service-genericError"
        "401":
          $ref: "#/components/responses/schema-service-401"
        "403":
          $ref: "#/components/responses/schema-service-403"
        "404":
          $ref: "#/components/responses/schema-service-404"
        "500":
          description: Object has no schedule; or an exception occurred.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/schema-service-ErrorSchemaService"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Screen-views/operation/getschedule-object
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/schema-service/scheduler/entry/%7BobjectType%7D/%7BobjectId%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", "/schema-service/scheduler/entry/%7BobjectType%7D/%7BobjectId%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/schema-service/scheduler/entry/%7BobjectType%7D/%7BobjectId%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": "/schema-service/scheduler/entry/%7BobjectType%7D/%7BobjectId%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/schema-service/scheduler/entry/%7BobjectType%7D/%7BobjectId%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/schema-service/scheduler/entry/%7BobjectType%7D/%7BobjectId%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /schema-service/v2/screen-views/{screenViewId}/status/finish:
    post:
      tags:
        - Screen views
      summary: Finish screen view
      description: |
        Finish a screen view. A finished document is no longer displayed.

        ---

        **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:** `SCHEMA_SERVICE_SCHEMA_CREATE`

        **User role permission required:** `assets_docs: create`
      operationId: finish-screen-view
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/schema-service-pathScreenViewId"
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/schema-service-standardApiResponse"
        "400":
          $ref: "#/components/responses/schema-service-genericError"
        "401":
          $ref: "#/components/responses/schema-service-401"
        "403":
          $ref: "#/components/responses/schema-service-403"
        "404":
          $ref: "#/components/responses/schema-service-404"
        "500":
          $ref: "#/components/responses/schema-service-genericError"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Screen-views/operation/finish-screen-view
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/status/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", "/schema-service/v2/screen-views/%7BscreenViewId%7D/status/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/schema-service/v2/screen-views/%7BscreenViewId%7D/status/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": "/schema-service/v2/screen-views/%7BscreenViewId%7D/status/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/schema-service/v2/screen-views/%7BscreenViewId%7D/status/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/schema-service/v2/screen-views/%7BscreenViewId%7D/status/finish")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /schema-service/v2/screen-views/{screenViewId}/status/resume:
    post:
      tags:
        - Screen views
      summary: Resume screen view
      description: |
        Resume a screen view that was paused.

        ---

        **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:** `SCHEMA_SERVICE_SCHEMA_CREATE`

        **User role permission required:** `assets_docs: create`
      operationId: resume-screen-view
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/schema-service-pathScreenViewId"
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/schema-service-standardApiResponse"
        "400":
          $ref: "#/components/responses/schema-service-genericError"
        "401":
          $ref: "#/components/responses/schema-service-401"
        "403":
          $ref: "#/components/responses/schema-service-403"
        "404":
          $ref: "#/components/responses/schema-service-404"
        "500":
          $ref: "#/components/responses/schema-service-genericError"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Screen-views/operation/resume-screen-view
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/status/resume \
              --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", "/schema-service/v2/screen-views/%7BscreenViewId%7D/status/resume", 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/schema-service/v2/screen-views/%7BscreenViewId%7D/status/resume");
            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": "/schema-service/v2/screen-views/%7BscreenViewId%7D/status/resume",
              "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/schema-service/v2/screen-views/%7BscreenViewId%7D/status/resume');
            $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/schema-service/v2/screen-views/%7BscreenViewId%7D/status/resume")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /schema-service/v2/screen-views/{screenViewId}/status/activate:
    post:
      tags:
        - Screen views
      summary: Activate screen view
      description: |
        Activate a screen view. It can be displayed to customers.

        ---

        **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:** `SCHEMA_SERVICE_SCHEMA_CREATE`

        **User role permission required:** `assets_docs: create`
      operationId: activate-screen-view
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/schema-service-pathScreenViewId"
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/schema-service-standardApiResponse"
        "400":
          $ref: "#/components/responses/schema-service-genericError"
        "401":
          $ref: "#/components/responses/schema-service-401"
        "403":
          $ref: "#/components/responses/schema-service-403"
        "404":
          $ref: "#/components/responses/schema-service-404"
        "500":
          $ref: "#/components/responses/schema-service-genericError"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Screen-views/operation/activate-screen-view
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/status/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", "/schema-service/v2/screen-views/%7BscreenViewId%7D/status/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/schema-service/v2/screen-views/%7BscreenViewId%7D/status/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": "/schema-service/v2/screen-views/%7BscreenViewId%7D/status/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/schema-service/v2/screen-views/%7BscreenViewId%7D/status/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/schema-service/v2/screen-views/%7BscreenViewId%7D/status/activate")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /schema-service/v2/screen-views/{screenViewId}/status/pause:
    post:
      tags:
        - Screen views
      summary: Pause screen view
      description: |
        Pause a screen view. Until resumed, it can't be displayed to customers.

        ---

        **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:** `SCHEMA_SERVICE_SCHEMA_CREATE`

        **User role permission required:** `assets_docs: create`
      operationId: pause-screen-view
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/schema-service-pathScreenViewId"
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/schema-service-standardApiResponse"
        "400":
          $ref: "#/components/responses/schema-service-genericError"
        "401":
          $ref: "#/components/responses/schema-service-401"
        "403":
          $ref: "#/components/responses/schema-service-403"
        "404":
          $ref: "#/components/responses/schema-service-404"
        "500":
          $ref: "#/components/responses/schema-service-genericError"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Screen-views/operation/pause-screen-view
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/status/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", "/schema-service/v2/screen-views/%7BscreenViewId%7D/status/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/schema-service/v2/screen-views/%7BscreenViewId%7D/status/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": "/schema-service/v2/screen-views/%7BscreenViewId%7D/status/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/schema-service/v2/screen-views/%7BscreenViewId%7D/status/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/schema-service/v2/screen-views/%7BscreenViewId%7D/status/pause")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /schema-service/screenViews:
    get:
      deprecated: true
      tags:
        - Screen views (legacy)
      summary: Get all screen views
      description: |
        Retrieve a paginated list of all screen view campaigns in the workspace.

        ---

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

        **API key permission required:** `SCHEMA_SERVICE_SCHEMA_READ`

        **User role permission required:** `assets_docs: read`
      operationId: listOfScreenViews
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/schema-service-QueryLimitRequired"
        - $ref: "#/components/parameters/schema-service-QueryPageRequired"
        - name: status
          in: query
          required: false
          schema:
            type: string
            enum:
              - DRAFT
              - ACTIVE
              - SCHEDULED
              - PAUSED
              - FINISHED
          description: Filter the results by screen view status
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/schema-service-paginatedScreenViews"
        "400":
          $ref: "#/components/responses/schema-service-genericError"
        "401":
          $ref: "#/components/responses/schema-service-401"
        "403":
          $ref: "#/components/responses/schema-service-403"
        "404":
          $ref: "#/components/responses/schema-service-404"
        "500":
          $ref: "#/components/responses/schema-service-genericError"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Screen-views-(legacy)/operation/listOfScreenViews
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/schema-service/screenViews?limit=SOME_STRING_VALUE&page=SOME_INTEGER_VALUE&status=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", "/schema-service/screenViews?limit=SOME_STRING_VALUE&page=SOME_INTEGER_VALUE&status=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/schema-service/screenViews?limit=SOME_STRING_VALUE&page=SOME_INTEGER_VALUE&status=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": "/schema-service/screenViews?limit=SOME_STRING_VALUE&page=SOME_INTEGER_VALUE&status=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/schema-service/screenViews');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'limit' => 'SOME_STRING_VALUE',
              'page' => 'SOME_INTEGER_VALUE',
              'status' => '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/schema-service/screenViews?limit=SOME_STRING_VALUE&page=SOME_INTEGER_VALUE&status=SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /schema-service/screenViews/byKeys:
    post:
      deprecated: true
      tags:
        - Screen views (legacy)
      summary: Get screen views by keys
      description: |
        Retrieve list of screen view campaigns by keys in the workspace.

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **User role permission required:** `assets_docs: read`
      operationId: listOfScreenViewsByKeys
      security:
        - JWT: []
      requestBody:
        content:
          application/json:
            schema:
              title: get screenviews by keys
              type: array
              items:
                type: string
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/schema-service-paginatedScreenViews"
        "400":
          $ref: "#/components/responses/schema-service-genericError"
        "401":
          $ref: "#/components/responses/schema-service-401"
        "403":
          $ref: "#/components/responses/schema-service-403"
        "404":
          $ref: "#/components/responses/schema-service-404"
        "500":
          $ref: "#/components/responses/schema-service-genericError"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Screen-views-(legacy)/operation/listOfScreenViewsByKeys
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/schema-service/screenViews/byKeys \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '["string"]'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "[\"string\"]"

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

            conn.request("POST", "/schema-service/screenViews/byKeys", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify([
              "string"
            ]);

            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/schema-service/screenViews/byKeys");
            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": "/schema-service/screenViews/byKeys",
              "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(['string']));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/schema-service/screenViews/byKeys');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('["string"]');

            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/schema-service/screenViews/byKeys")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("[\"string\"]")
              .asString();
  /schema-service/screenViews/single/{screenViewId}/{screenViewVersion}:
    get:
      deprecated: true
      tags:
        - Screen views (legacy)
      summary: Get screen view
      description: |
        Retrieve the details of a single screen view campaign.

        ---

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

        **API key permission required:** `SCHEMA_SERVICE_SCHEMA_READ`

        **User role permission required:** `assets_docs: read`
      operationId: getScreenViewByVersion
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/schema-service-pathScreenViewId"
        - $ref: "#/components/parameters/schema-service-pathScreenViewVersion"
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/schema-service-screenViewLegacy"
        "400":
          $ref: "#/components/responses/schema-service-genericError"
        "401":
          $ref: "#/components/responses/schema-service-401"
        "403":
          $ref: "#/components/responses/schema-service-403"
        "404":
          $ref: "#/components/responses/schema-service-404"
        "500":
          $ref: "#/components/responses/schema-service-genericError"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Screen-views-(legacy)/operation/getScreenViewByVersion
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/schema-service/screenViews/single/%7BscreenViewId%7D/%7BscreenViewVersion%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", "/schema-service/screenViews/single/%7BscreenViewId%7D/%7BscreenViewVersion%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/schema-service/screenViews/single/%7BscreenViewId%7D/%7BscreenViewVersion%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": "/schema-service/screenViews/single/%7BscreenViewId%7D/%7BscreenViewVersion%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/schema-service/screenViews/single/%7BscreenViewId%7D/%7BscreenViewVersion%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/schema-service/screenViews/single/%7BscreenViewId%7D/%7BscreenViewVersion%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /schema-service/screenViews/versions/{screenViewId}:
    get:
      deprecated: true
      tags:
        - Screen views (legacy)
      summary: Get screen view versions
      description: |
        Retrieve all versions of a screen view campaign.

        ---

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

        **API key permission required:** `SCHEMA_SERVICE_SCHEMA_READ`

        **User role permission required:** `assets_docs: read`
      operationId: listOfScreenViewVersions
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/schema-service-pathScreenViewId"
        - $ref: "#/components/parameters/schema-service-QueryLimitRequired"
        - $ref: "#/components/parameters/schema-service-QueryPageRequired"
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/schema-service-versionsOfScreenView"
        "400":
          $ref: "#/components/responses/schema-service-genericError"
        "401":
          $ref: "#/components/responses/schema-service-401"
        "403":
          $ref: "#/components/responses/schema-service-403"
        "404":
          $ref: "#/components/responses/schema-service-404"
        "500":
          $ref: "#/components/responses/schema-service-genericError"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Screen-views-(legacy)/operation/listOfScreenViewVersions
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/schema-service/screenViews/versions/%7BscreenViewId%7D?limit=SOME_STRING_VALUE&page=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", "/schema-service/screenViews/versions/%7BscreenViewId%7D?limit=SOME_STRING_VALUE&page=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/schema-service/screenViews/versions/%7BscreenViewId%7D?limit=SOME_STRING_VALUE&page=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": "/schema-service/screenViews/versions/%7BscreenViewId%7D?limit=SOME_STRING_VALUE&page=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/schema-service/screenViews/versions/%7BscreenViewId%7D');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'limit' => 'SOME_STRING_VALUE',
              'page' => '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/schema-service/screenViews/versions/%7BscreenViewId%7D?limit=SOME_STRING_VALUE&page=SOME_INTEGER_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /schema-service/screenViews/generate:
    get:
      deprecated: true
      tags:
        - Screen views (legacy)
      summary: Generate screen view
      description: |
        When this method is called, the Synerise backend finds all screen view campaigns applicable to the profile and returns the screen view with the highest priority (1).

        ---

        **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>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3" target="_blank" rel="noopener">Profile (Client)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3" target="_blank" rel="noopener">Anonymous Profile</a>

        **API key permission required:** `SCHEMA_SERVICE_SCHEMA_CREATE`

        **User role permission required:** `assets_docs: create`
      operationId: generateScreenViewGet
      security:
        - JWT: []
      responses:
        "200":
          description: Processed JSON content
          content:
            application/json:
              schema:
                type: object
        "400":
          $ref: "#/components/responses/schema-service-genericError"
        "401":
          $ref: "#/components/responses/schema-service-401"
        "403":
          $ref: "#/components/responses/schema-service-403"
        "404":
          $ref: "#/components/responses/schema-service-404"
        "500":
          $ref: "#/components/responses/schema-service-genericError"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Screen-views-(legacy)/operation/generateScreenViewGet
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/schema-service/screenViews/generate \
              --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", "/schema-service/screenViews/generate", 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/schema-service/screenViews/generate");
            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": "/schema-service/screenViews/generate",
              "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/schema-service/screenViews/generate');
            $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/schema-service/screenViews/generate")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /schema-service/v2/screenViews/generate:
    get:
      deprecated: true
      tags:
        - Screen views (legacy)
      summary: Generate screen view
      description: |
        When this method is called, the Synerise backend finds all screen view campaigns applicable to the profile and returns the screen view with the highest priority (1).

        ---

        **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>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3" target="_blank" rel="noopener">Profile (Client)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3" target="_blank" rel="noopener">Anonymous Profile</a>

        **API key permission required:** `SCHEMA_SERVICE_SCHEMA_CREATE`

        **User role permission required:** `assets_docs: create`
      operationId: generateScreenViewWithAdditionalDataGet
      security:
        - JWT: []
      responses:
        "200":
          description: Processed JSON content
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/schema-service-GenerateScreenViewResponse"
        "400":
          $ref: "#/components/responses/schema-service-genericError"
        "401":
          $ref: "#/components/responses/schema-service-401"
        "403":
          $ref: "#/components/responses/schema-service-403"
        "404":
          $ref: "#/components/responses/schema-service-404"
        "500":
          $ref: "#/components/responses/schema-service-genericError"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Screen-views-(legacy)/operation/generateScreenViewWithAdditionalDataGet
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/schema-service/v2/screenViews/generate \
              --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", "/schema-service/v2/screenViews/generate", 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/schema-service/v2/screenViews/generate");
            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": "/schema-service/v2/screenViews/generate",
              "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/schema-service/v2/screenViews/generate');
            $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/schema-service/v2/screenViews/generate")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /schema-service/screenViews/createNew:
    post:
      deprecated: true
      tags:
        - Screen views (legacy)
      summary: Initialize screen view
      description: |
        Create a new screen view campaign. It is created as a blank, without any conditions.

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **User role permission required:** `assets_docs: create`
      operationId: initializeScreenViewPost
      security:
        - JWT: []
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/schema-service-screenViewMetadata"
        "400":
          $ref: "#/components/responses/schema-service-genericError"
        "401":
          $ref: "#/components/responses/schema-service-401"
        "403":
          $ref: "#/components/responses/schema-service-403"
        "404":
          $ref: "#/components/responses/schema-service-404"
        "500":
          $ref: "#/components/responses/schema-service-genericError"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Screen-views-(legacy)/operation/initializeScreenViewPost
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/schema-service/screenViews/createNew \
              --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", "/schema-service/screenViews/createNew", 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/schema-service/screenViews/createNew");
            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": "/schema-service/screenViews/createNew",
              "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/schema-service/screenViews/createNew');
            $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/schema-service/screenViews/createNew")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /schema-service/screenViews/content/{screenViewId}/{screenViewVersion}/copyFromExistingScreenView:
    post:
      deprecated: true
      tags:
        - Screen views (legacy)
      summary: Copy content
      description: |
        Copy content to a screen view draft from another screen view.

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **User role permission required:** `assets_docs: create`
      operationId: copyContent
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/schema-service-pathScreenViewId"
        - $ref: "#/components/parameters/schema-service-pathScreenViewVersion"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/schema-service-versionedScreenViewKey"
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/schema-service-standardApiResponse"
        "400":
          $ref: "#/components/responses/schema-service-genericError"
        "401":
          $ref: "#/components/responses/schema-service-401"
        "403":
          $ref: "#/components/responses/schema-service-403"
        "404":
          $ref: "#/components/responses/schema-service-404"
        "500":
          $ref: "#/components/responses/schema-service-genericError"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Screen-views-(legacy)/operation/copyContent
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/schema-service/screenViews/content/%7BscreenViewId%7D/%7BscreenViewVersion%7D/copyFromExistingScreenView \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"screenViewId":"481855c5-f86e-453f-a0fa-d34b5a2be745","screenViewVersion":"string"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"screenViewId\":\"481855c5-f86e-453f-a0fa-d34b5a2be745\",\"screenViewVersion\":\"string\"}"

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

            conn.request("POST", "/schema-service/screenViews/content/%7BscreenViewId%7D/%7BscreenViewVersion%7D/copyFromExistingScreenView", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "screenViewId": "481855c5-f86e-453f-a0fa-d34b5a2be745",
              "screenViewVersion": "string"
            });

            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/schema-service/screenViews/content/%7BscreenViewId%7D/%7BscreenViewVersion%7D/copyFromExistingScreenView");
            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": "/schema-service/screenViews/content/%7BscreenViewId%7D/%7BscreenViewVersion%7D/copyFromExistingScreenView",
              "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({
              screenViewId: '481855c5-f86e-453f-a0fa-d34b5a2be745',
              screenViewVersion: 'string'
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/schema-service/screenViews/content/%7BscreenViewId%7D/%7BscreenViewVersion%7D/copyFromExistingScreenView');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"screenViewId":"481855c5-f86e-453f-a0fa-d34b5a2be745","screenViewVersion":"string"}');

            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/schema-service/screenViews/content/%7BscreenViewId%7D/%7BscreenViewVersion%7D/copyFromExistingScreenView")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"screenViewId\":\"481855c5-f86e-453f-a0fa-d34b5a2be745\",\"screenViewVersion\":\"string\"}")
              .asString();
  /schema-service/screenViews/content/{screenViewId}/{screenViewVersion}:
    post:
      deprecated: true
      tags:
        - Screen views (legacy)
      summary: Add content
      description: |
        Add content to a screen view draft.

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **User role permission required:** `assets_docs: create`
      operationId: createContent
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/schema-service-pathScreenViewId"
        - $ref: "#/components/parameters/schema-service-pathScreenViewVersion"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/schema-service-ScreenViewContent"
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/schema-service-standardApiResponse"
        "400":
          $ref: "#/components/responses/schema-service-genericError"
        "401":
          $ref: "#/components/responses/schema-service-401"
        "403":
          $ref: "#/components/responses/schema-service-403"
        "404":
          $ref: "#/components/responses/schema-service-404"
        "500":
          $ref: "#/components/responses/schema-service-genericError"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Screen-views-(legacy)/operation/createContent
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/schema-service/screenViews/content/%7BscreenViewId%7D/%7BscreenViewVersion%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"json":{"property1":null,"property2":null},"documents":["string"],"data":[{"slug":"basket"}],"groups":["43c97b25-4a10-45d0-99b7-d472eea2bb24"],"groupsOrder":false}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"json\":{\"property1\":null,\"property2\":null},\"documents\":[\"string\"],\"data\":[{\"slug\":\"basket\"}],\"groups\":[\"43c97b25-4a10-45d0-99b7-d472eea2bb24\"],\"groupsOrder\":false}"

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

            conn.request("POST", "/schema-service/screenViews/content/%7BscreenViewId%7D/%7BscreenViewVersion%7D", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "json": {
                "property1": null,
                "property2": null
              },
              "documents": [
                "string"
              ],
              "data": [
                {
                  "slug": "basket"
                }
              ],
              "groups": [
                "43c97b25-4a10-45d0-99b7-d472eea2bb24"
              ],
              "groupsOrder": 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/schema-service/screenViews/content/%7BscreenViewId%7D/%7BscreenViewVersion%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": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/schema-service/screenViews/content/%7BscreenViewId%7D/%7BscreenViewVersion%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({
              json: {property1: null, property2: null},
              documents: ['string'],
              data: [{slug: 'basket'}],
              groups: ['43c97b25-4a10-45d0-99b7-d472eea2bb24'],
              groupsOrder: false
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/schema-service/screenViews/content/%7BscreenViewId%7D/%7BscreenViewVersion%7D');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"json":{"property1":null,"property2":null},"documents":["string"],"data":[{"slug":"basket"}],"groups":["43c97b25-4a10-45d0-99b7-d472eea2bb24"],"groupsOrder":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/schema-service/screenViews/content/%7BscreenViewId%7D/%7BscreenViewVersion%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"json\":{\"property1\":null,\"property2\":null},\"documents\":[\"string\"],\"data\":[{\"slug\":\"basket\"}],\"groups\":[\"43c97b25-4a10-45d0-99b7-d472eea2bb24\"],\"groupsOrder\":false}")
              .asString();
  /schema-service/screenViews/audience/{screenViewId}/{screenViewVersion}:
    post:
      deprecated: true
      tags:
        - Screen views (legacy)
      summary: Add audience
      description: |
        Define the audience for a screen view draft.

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **User role permission required:** `assets_docs: create`
      operationId: createAudience
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/schema-service-pathScreenViewId"
        - $ref: "#/components/parameters/schema-service-pathScreenViewVersion"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/schema-service-Audience"
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/schema-service-standardApiResponse"
        "400":
          $ref: "#/components/responses/schema-service-genericError"
        "401":
          $ref: "#/components/responses/schema-service-401"
        "403":
          $ref: "#/components/responses/schema-service-403"
        "404":
          $ref: "#/components/responses/schema-service-404"
        "500":
          $ref: "#/components/responses/schema-service-genericError"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Screen-views-(legacy)/operation/createAudience
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/schema-service/screenViews/audience/%7BscreenViewId%7D/%7BscreenViewVersion%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"targetType":"SEGMENT","segments":["string"],"query":"{\"analysis\":{\"title\":\"Unnamed segmentation\",\"description\":\"\",\"unique\":true,\"segments\":[{\"title\":\"Segmentation A\",\"description\":\"\",\"filter\":{\"matching\":true,\"expressions\":[{\"_id\":\"a9b76c8e-34bd-4ac3-be8f-f37041d126bd\",\"name\":\"\",\"type\":\"FUNNEL\",\"matching\":true,\"funnel\":{\"_id\":\"5c759d73-49c6-409f-96a3-b569dff8f8ff\",\"title\":\"Unnamed\",\"completedWithin\":null,\"dateFilter\":{\"type\":\"RELATIVE\",\"offset\":{\"type\":\"DAYS\",\"value\":0},\"duration\":{\"type\":\"DAYS\",\"value\":30}},\"steps\":[{\"_id\":\"78b97ae0-1bc5-45fb-82a4-4f1280cfbdff\",\"title\":\"\",\"action\":{\"id\":944,\"name\":\"page.visit\"},\"eventName\":\"page.visit\",\"expressions\":[]}],\"exact\":false}}]}}]}}"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"targetType\":\"SEGMENT\",\"segments\":[\"string\"],\"query\":\"{\\\"analysis\\\":{\\\"title\\\":\\\"Unnamed segmentation\\\",\\\"description\\\":\\\"\\\",\\\"unique\\\":true,\\\"segments\\\":[{\\\"title\\\":\\\"Segmentation A\\\",\\\"description\\\":\\\"\\\",\\\"filter\\\":{\\\"matching\\\":true,\\\"expressions\\\":[{\\\"_id\\\":\\\"a9b76c8e-34bd-4ac3-be8f-f37041d126bd\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"FUNNEL\\\",\\\"matching\\\":true,\\\"funnel\\\":{\\\"_id\\\":\\\"5c759d73-49c6-409f-96a3-b569dff8f8ff\\\",\\\"title\\\":\\\"Unnamed\\\",\\\"completedWithin\\\":null,\\\"dateFilter\\\":{\\\"type\\\":\\\"RELATIVE\\\",\\\"offset\\\":{\\\"type\\\":\\\"DAYS\\\",\\\"value\\\":0},\\\"duration\\\":{\\\"type\\\":\\\"DAYS\\\",\\\"value\\\":30}},\\\"steps\\\":[{\\\"_id\\\":\\\"78b97ae0-1bc5-45fb-82a4-4f1280cfbdff\\\",\\\"title\\\":\\\"\\\",\\\"action\\\":{\\\"id\\\":944,\\\"name\\\":\\\"page.visit\\\"},\\\"eventName\\\":\\\"page.visit\\\",\\\"expressions\\\":[]}],\\\"exact\\\":false}}]}}]}}\"}"

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

            conn.request("POST", "/schema-service/screenViews/audience/%7BscreenViewId%7D/%7BscreenViewVersion%7D", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "targetType": "SEGMENT",
              "segments": [
                "string"
              ],
              "query": "{\"analysis\":{\"title\":\"Unnamed segmentation\",\"description\":\"\",\"unique\":true,\"segments\":[{\"title\":\"Segmentation A\",\"description\":\"\",\"filter\":{\"matching\":true,\"expressions\":[{\"_id\":\"a9b76c8e-34bd-4ac3-be8f-f37041d126bd\",\"name\":\"\",\"type\":\"FUNNEL\",\"matching\":true,\"funnel\":{\"_id\":\"5c759d73-49c6-409f-96a3-b569dff8f8ff\",\"title\":\"Unnamed\",\"completedWithin\":null,\"dateFilter\":{\"type\":\"RELATIVE\",\"offset\":{\"type\":\"DAYS\",\"value\":0},\"duration\":{\"type\":\"DAYS\",\"value\":30}},\"steps\":[{\"_id\":\"78b97ae0-1bc5-45fb-82a4-4f1280cfbdff\",\"title\":\"\",\"action\":{\"id\":944,\"name\":\"page.visit\"},\"eventName\":\"page.visit\",\"expressions\":[]}],\"exact\":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/schema-service/screenViews/audience/%7BscreenViewId%7D/%7BscreenViewVersion%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": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/schema-service/screenViews/audience/%7BscreenViewId%7D/%7BscreenViewVersion%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({
              targetType: 'SEGMENT',
              segments: ['string'],
              query: '{"analysis":{"title":"Unnamed segmentation","description":"","unique":true,"segments":[{"title":"Segmentation A","description":"","filter":{"matching":true,"expressions":[{"_id":"a9b76c8e-34bd-4ac3-be8f-f37041d126bd","name":"","type":"FUNNEL","matching":true,"funnel":{"_id":"5c759d73-49c6-409f-96a3-b569dff8f8ff","title":"Unnamed","completedWithin":null,"dateFilter":{"type":"RELATIVE","offset":{"type":"DAYS","value":0},"duration":{"type":"DAYS","value":30}},"steps":[{"_id":"78b97ae0-1bc5-45fb-82a4-4f1280cfbdff","title":"","action":{"id":944,"name":"page.visit"},"eventName":"page.visit","expressions":[]}],"exact":false}}]}}]}}'
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/schema-service/screenViews/audience/%7BscreenViewId%7D/%7BscreenViewVersion%7D');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"targetType":"SEGMENT","segments":["string"],"query":"{\\"analysis\\":{\\"title\\":\\"Unnamed segmentation\\",\\"description\\":\\"\\",\\"unique\\":true,\\"segments\\":[{\\"title\\":\\"Segmentation A\\",\\"description\\":\\"\\",\\"filter\\":{\\"matching\\":true,\\"expressions\\":[{\\"_id\\":\\"a9b76c8e-34bd-4ac3-be8f-f37041d126bd\\",\\"name\\":\\"\\",\\"type\\":\\"FUNNEL\\",\\"matching\\":true,\\"funnel\\":{\\"_id\\":\\"5c759d73-49c6-409f-96a3-b569dff8f8ff\\",\\"title\\":\\"Unnamed\\",\\"completedWithin\\":null,\\"dateFilter\\":{\\"type\\":\\"RELATIVE\\",\\"offset\\":{\\"type\\":\\"DAYS\\",\\"value\\":0},\\"duration\\":{\\"type\\":\\"DAYS\\",\\"value\\":30}},\\"steps\\":[{\\"_id\\":\\"78b97ae0-1bc5-45fb-82a4-4f1280cfbdff\\",\\"title\\":\\"\\",\\"action\\":{\\"id\\":944,\\"name\\":\\"page.visit\\"},\\"eventName\\":\\"page.visit\\",\\"expressions\\":[]}],\\"exact\\":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/schema-service/screenViews/audience/%7BscreenViewId%7D/%7BscreenViewVersion%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"targetType\":\"SEGMENT\",\"segments\":[\"string\"],\"query\":\"{\\\"analysis\\\":{\\\"title\\\":\\\"Unnamed segmentation\\\",\\\"description\\\":\\\"\\\",\\\"unique\\\":true,\\\"segments\\\":[{\\\"title\\\":\\\"Segmentation A\\\",\\\"description\\\":\\\"\\\",\\\"filter\\\":{\\\"matching\\\":true,\\\"expressions\\\":[{\\\"_id\\\":\\\"a9b76c8e-34bd-4ac3-be8f-f37041d126bd\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"FUNNEL\\\",\\\"matching\\\":true,\\\"funnel\\\":{\\\"_id\\\":\\\"5c759d73-49c6-409f-96a3-b569dff8f8ff\\\",\\\"title\\\":\\\"Unnamed\\\",\\\"completedWithin\\\":null,\\\"dateFilter\\\":{\\\"type\\\":\\\"RELATIVE\\\",\\\"offset\\\":{\\\"type\\\":\\\"DAYS\\\",\\\"value\\\":0},\\\"duration\\\":{\\\"type\\\":\\\"DAYS\\\",\\\"value\\\":30}},\\\"steps\\\":[{\\\"_id\\\":\\\"78b97ae0-1bc5-45fb-82a4-4f1280cfbdff\\\",\\\"title\\\":\\\"\\\",\\\"action\\\":{\\\"id\\\":944,\\\"name\\\":\\\"page.visit\\\"},\\\"eventName\\\":\\\"page.visit\\\",\\\"expressions\\\":[]}],\\\"exact\\\":false}}]}}]}}\"}")
              .asString();
  /schema-service/screenViews/publish/{screenViewId}/{screenViewVersion}:
    post:
      deprecated: true
      tags:
        - Screen views (legacy)
      summary: Publish screen view
      description: |
        Make the screen view accessible to customers.

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **User role permission required:** `assets_docs: create`
      operationId: publishScreenView
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/schema-service-pathScreenViewId"
        - $ref: "#/components/parameters/schema-service-pathScreenViewVersion"
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/schema-service-publishRequest"
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/schema-service-standardApiResponse"
        "400":
          $ref: "#/components/responses/schema-service-genericError"
        "401":
          $ref: "#/components/responses/schema-service-401"
        "403":
          $ref: "#/components/responses/schema-service-403"
        "404":
          $ref: "#/components/responses/schema-service-404"
        "500":
          $ref: "#/components/responses/schema-service-genericError"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Screen-views-(legacy)/operation/publishScreenView
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/schema-service/screenViews/publish/%7BscreenViewId%7D/%7BscreenViewVersion%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"overwrite":true}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"overwrite\":true}"

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

            conn.request("POST", "/schema-service/screenViews/publish/%7BscreenViewId%7D/%7BscreenViewVersion%7D", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "overwrite": 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/schema-service/screenViews/publish/%7BscreenViewId%7D/%7BscreenViewVersion%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": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/schema-service/screenViews/publish/%7BscreenViewId%7D/%7BscreenViewVersion%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({overwrite: true}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/schema-service/screenViews/publish/%7BscreenViewId%7D/%7BscreenViewVersion%7D');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"overwrite":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/schema-service/screenViews/publish/%7BscreenViewId%7D/%7BscreenViewVersion%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"overwrite\":true}")
              .asString();
  /schema-service/screenViews/copyDraftFromExistingScreenView:
    post:
      deprecated: true
      tags:
        - Screen views (legacy)
      summary: Copy draft from existing screen view
      description: |
        Copy a duplicate of an active screen view. The duplicate is in draft status.

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **User role permission required:** `assets_docs: create`
      operationId: copyDraftFromExistingScreenView
      security:
        - JWT: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/schema-service-versionedScreenViewKey"
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/schema-service-screenViewMetadata"
        "400":
          $ref: "#/components/responses/schema-service-genericError"
        "401":
          $ref: "#/components/responses/schema-service-401"
        "403":
          $ref: "#/components/responses/schema-service-403"
        "404":
          $ref: "#/components/responses/schema-service-404"
        "500":
          $ref: "#/components/responses/schema-service-genericError"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Screen-views-(legacy)/operation/copyDraftFromExistingScreenView
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/schema-service/screenViews/copyDraftFromExistingScreenView \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"screenViewId":"481855c5-f86e-453f-a0fa-d34b5a2be745","screenViewVersion":"string"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"screenViewId\":\"481855c5-f86e-453f-a0fa-d34b5a2be745\",\"screenViewVersion\":\"string\"}"

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

            conn.request("POST", "/schema-service/screenViews/copyDraftFromExistingScreenView", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "screenViewId": "481855c5-f86e-453f-a0fa-d34b5a2be745",
              "screenViewVersion": "string"
            });

            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/schema-service/screenViews/copyDraftFromExistingScreenView");
            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": "/schema-service/screenViews/copyDraftFromExistingScreenView",
              "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({
              screenViewId: '481855c5-f86e-453f-a0fa-d34b5a2be745',
              screenViewVersion: 'string'
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/schema-service/screenViews/copyDraftFromExistingScreenView');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"screenViewId":"481855c5-f86e-453f-a0fa-d34b5a2be745","screenViewVersion":"string"}');

            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/schema-service/screenViews/copyDraftFromExistingScreenView")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"screenViewId\":\"481855c5-f86e-453f-a0fa-d34b5a2be745\",\"screenViewVersion\":\"string\"}")
              .asString();
  /schema-service/screenViews/createDraftFromExistingScreenView:
    post:
      deprecated: true
      tags:
        - Screen views (legacy)
      summary: Create draft from existing screen view
      description: |
        Create a duplicate of an active screen view. The duplicate is in draft status.

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **User role permission required:** `assets_docs: create`
      operationId: createDraftFromExistingScreenView
      security:
        - JWT: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/schema-service-versionedScreenViewKey"
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/schema-service-screenViewMetadata"
        "400":
          $ref: "#/components/responses/schema-service-genericError"
        "401":
          $ref: "#/components/responses/schema-service-401"
        "403":
          $ref: "#/components/responses/schema-service-403"
        "404":
          $ref: "#/components/responses/schema-service-404"
        "500":
          $ref: "#/components/responses/schema-service-genericError"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Screen-views-(legacy)/operation/createDraftFromExistingScreenView
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/schema-service/screenViews/createDraftFromExistingScreenView \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"screenViewId":"481855c5-f86e-453f-a0fa-d34b5a2be745","screenViewVersion":"string"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"screenViewId\":\"481855c5-f86e-453f-a0fa-d34b5a2be745\",\"screenViewVersion\":\"string\"}"

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

            conn.request("POST", "/schema-service/screenViews/createDraftFromExistingScreenView", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "screenViewId": "481855c5-f86e-453f-a0fa-d34b5a2be745",
              "screenViewVersion": "string"
            });

            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/schema-service/screenViews/createDraftFromExistingScreenView");
            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": "/schema-service/screenViews/createDraftFromExistingScreenView",
              "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({
              screenViewId: '481855c5-f86e-453f-a0fa-d34b5a2be745',
              screenViewVersion: 'string'
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/schema-service/screenViews/createDraftFromExistingScreenView');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"screenViewId":"481855c5-f86e-453f-a0fa-d34b5a2be745","screenViewVersion":"string"}');

            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/schema-service/screenViews/createDraftFromExistingScreenView")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"screenViewId\":\"481855c5-f86e-453f-a0fa-d34b5a2be745\",\"screenViewVersion\":\"string\"}")
              .asString();
  /schema-service/screenViews/single/{screenViewId}/{screenViewVersion}/description:
    put:
      deprecated: true
      tags:
        - Screen views (legacy)
      summary: Update screen view description
      description: |
        Update the description of a screen view. You can update the descriptions of active screen views.

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **User role permission required:** `assets_docs: create`
      operationId: updateDescriptionOfScreenView
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/schema-service-pathScreenViewId"
        - $ref: "#/components/parameters/schema-service-pathScreenViewVersion"
      requestBody:
        required: false
        content:
          application/json:
            schema:
              title: update screenview description
              type: string
              description: New description of the screen view
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/schema-service-standardApiResponse"
        "400":
          $ref: "#/components/responses/schema-service-genericError"
        "401":
          $ref: "#/components/responses/schema-service-401"
        "403":
          $ref: "#/components/responses/schema-service-403"
        "404":
          $ref: "#/components/responses/schema-service-404"
        "500":
          $ref: "#/components/responses/schema-service-genericError"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Screen-views-(legacy)/operation/updateDescriptionOfScreenView
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request PUT \
              --url https://api.synerise.com/schema-service/screenViews/single/%7BscreenViewId%7D/%7BscreenViewVersion%7D/description \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '"string"'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "\"string\""

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

            conn.request("PUT", "/schema-service/screenViews/single/%7BscreenViewId%7D/%7BscreenViewVersion%7D/description", payload, headers)

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

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

            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/schema-service/screenViews/single/%7BscreenViewId%7D/%7BscreenViewVersion%7D/description");
            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": "/schema-service/screenViews/single/%7BscreenViewId%7D/%7BscreenViewVersion%7D/description",
              "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('string'));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/schema-service/screenViews/single/%7BscreenViewId%7D/%7BscreenViewVersion%7D/description');
            $request->setMethod(HTTP_METH_PUT);

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

            $request->setBody('"string"');

            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/schema-service/screenViews/single/%7BscreenViewId%7D/%7BscreenViewVersion%7D/description")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("\"string\"")
              .asString();
  /schema-service/screenViews/single/{screenViewId}/{screenViewVersion}/priority:
    put:
      deprecated: true
      tags:
        - Screen views (legacy)
      summary: Update screen view priority
      description: |
        Update the priority of a screen view. You can update the priorities of active screen views.

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **User role permission required:** `assets_docs: create`
      operationId: updatePriorityOfScreenView
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/schema-service-pathScreenViewId"
        - $ref: "#/components/parameters/schema-service-pathScreenViewVersion"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              title: update screenview priority
              type: integer
              description: New priority of the screen view
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/schema-service-standardApiResponse"
        "400":
          $ref: "#/components/responses/schema-service-genericError"
        "401":
          $ref: "#/components/responses/schema-service-401"
        "403":
          $ref: "#/components/responses/schema-service-403"
        "404":
          $ref: "#/components/responses/schema-service-404"
        "500":
          $ref: "#/components/responses/schema-service-genericError"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Screen-views-(legacy)/operation/updatePriorityOfScreenView
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request PUT \
              --url https://api.synerise.com/schema-service/screenViews/single/%7BscreenViewId%7D/%7BscreenViewVersion%7D/priority \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data 0
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "0"

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

            conn.request("PUT", "/schema-service/screenViews/single/%7BscreenViewId%7D/%7BscreenViewVersion%7D/priority", payload, headers)

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

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

            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/schema-service/screenViews/single/%7BscreenViewId%7D/%7BscreenViewVersion%7D/priority");
            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": "/schema-service/screenViews/single/%7BscreenViewId%7D/%7BscreenViewVersion%7D/priority",
              "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.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/schema-service/screenViews/single/%7BscreenViewId%7D/%7BscreenViewVersion%7D/priority');
            $request->setMethod(HTTP_METH_PUT);

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

            $request->setBody('0');

            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/schema-service/screenViews/single/%7BscreenViewId%7D/%7BscreenViewVersion%7D/priority")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("0")
              .asString();
  /schema-service/screenViews/discardChanges/{screenViewId}/{screenViewVersion}:
    post:
      deprecated: true
      tags:
        - Screen views (legacy)
      summary: Discard changes
      description: |
        Discard the changes made in a version of a screen view.

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **User role permission required:** `assets_docs: create`
      operationId: discardChanges
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/schema-service-pathScreenViewId"
        - $ref: "#/components/parameters/schema-service-pathScreenViewVersion"
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/schema-service-screenViewLegacy"
        "400":
          $ref: "#/components/responses/schema-service-genericError"
        "401":
          $ref: "#/components/responses/schema-service-401"
        "403":
          $ref: "#/components/responses/schema-service-403"
        "404":
          $ref: "#/components/responses/schema-service-404"
        "500":
          $ref: "#/components/responses/schema-service-genericError"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Screen-views-(legacy)/operation/discardChanges
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/schema-service/screenViews/discardChanges/%7BscreenViewId%7D/%7BscreenViewVersion%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("POST", "/schema-service/screenViews/discardChanges/%7BscreenViewId%7D/%7BscreenViewVersion%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("POST", "https://api.synerise.com/schema-service/screenViews/discardChanges/%7BscreenViewId%7D/%7BscreenViewVersion%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": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/schema-service/screenViews/discardChanges/%7BscreenViewId%7D/%7BscreenViewVersion%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/schema-service/screenViews/discardChanges/%7BscreenViewId%7D/%7BscreenViewVersion%7D');
            $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/schema-service/screenViews/discardChanges/%7BscreenViewId%7D/%7BscreenViewVersion%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /schema-service/screenViews/delete/{screenViewId}:
    delete:
      deprecated: true
      tags:
        - Screen views (legacy)
      summary: Delete screen view
      description: |
        Delete a screen view and all its versions. This operation is irreversible.

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **User role permission required:** `assets_docs: delete`
      operationId: deleteScreenView
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/schema-service-pathScreenViewId"
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/schema-service-standardApiResponse"
        "400":
          $ref: "#/components/responses/schema-service-genericError"
        "401":
          $ref: "#/components/responses/schema-service-401"
        "403":
          $ref: "#/components/responses/schema-service-403"
        "404":
          $ref: "#/components/responses/schema-service-404"
        "500":
          $ref: "#/components/responses/schema-service-genericError"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Screen-views-(legacy)/operation/deleteScreenView
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request DELETE \
              --url https://api.synerise.com/schema-service/screenViews/delete/%7BscreenViewId%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", "/schema-service/screenViews/delete/%7BscreenViewId%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/schema-service/screenViews/delete/%7BscreenViewId%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": "/schema-service/screenViews/delete/%7BscreenViewId%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/schema-service/screenViews/delete/%7BscreenViewId%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/schema-service/screenViews/delete/%7BscreenViewId%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /schema-service/screenViews/single/delete/{screenViewId}/{screenViewVersion}:
    delete:
      deprecated: true
      tags:
        - Screen views (legacy)
      summary: Delete screen view version
      description: |
        Delete a version of a screen view.

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **User role permission required:** `assets_docs: delete`
      operationId: deleteSingleScreenView
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/schema-service-pathScreenViewId"
        - $ref: "#/components/parameters/schema-service-pathScreenViewVersion"
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/schema-service-standardApiResponse"
        "400":
          $ref: "#/components/responses/schema-service-genericError"
        "401":
          $ref: "#/components/responses/schema-service-401"
        "403":
          $ref: "#/components/responses/schema-service-403"
        "404":
          $ref: "#/components/responses/schema-service-404"
        "500":
          $ref: "#/components/responses/schema-service-genericError"
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Screen-views-(legacy)/operation/deleteSingleScreenView
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request DELETE \
              --url https://api.synerise.com/schema-service/screenViews/single/delete/%7BscreenViewId%7D/%7BscreenViewVersion%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", "/schema-service/screenViews/single/delete/%7BscreenViewId%7D/%7BscreenViewVersion%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/schema-service/screenViews/single/delete/%7BscreenViewId%7D/%7BscreenViewVersion%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": "/schema-service/screenViews/single/delete/%7BscreenViewId%7D/%7BscreenViewVersion%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/schema-service/screenViews/single/delete/%7BscreenViewId%7D/%7BscreenViewVersion%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/schema-service/screenViews/single/delete/%7BscreenViewId%7D/%7BscreenViewVersion%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /template-backend/template:
    get:
      summary: List templates
      operationId: list-templates
      tags:
        - Templates
      description: |
        Returns all templates from a Workspace, with an option to filter by type.

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **User role permission required:** `templates: read`
      parameters:
        - in: query
          name: type
          schema:
            type: string
            enum:
              - SMS
              - MOBILE_PUSH
              - WEB_PUSH
              - DYNAMIC_CONTENT
              - LANDING_PAGE
              - EMAIL
              - SOCIAL_MEDIA
              - IN_APP
          description: The type of templates to return
          required: false
        - in: query
          name: search
          schema:
            type: string
          description: Searched phrase
          required: false
        - in: query
          name: limit
          schema:
            type: number
          required: false
        - in: query
          name: offset
          schema:
            type: number
          required: false
        - in: query
          name: approved
          required: false
          schema:
            type: boolean
            default: false
          description: When approval-service enabled it filters for approved templates
      responses:
        "200":
          description: An array of templates
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/template-backend-TemplateOverviewResponse"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/campaigns#tag/Templates/operation/list-templates
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/template-backend/template?type=SOME_STRING_VALUE&search=SOME_STRING_VALUE&limit=SOME_NUMBER_VALUE&offset=SOME_NUMBER_VALUE&approved=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", "/template-backend/template?type=SOME_STRING_VALUE&search=SOME_STRING_VALUE&limit=SOME_NUMBER_VALUE&offset=SOME_NUMBER_VALUE&approved=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/template-backend/template?type=SOME_STRING_VALUE&search=SOME_STRING_VALUE&limit=SOME_NUMBER_VALUE&offset=SOME_NUMBER_VALUE&approved=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": "/template-backend/template?type=SOME_STRING_VALUE&search=SOME_STRING_VALUE&limit=SOME_NUMBER_VALUE&offset=SOME_NUMBER_VALUE&approved=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/template-backend/template');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'type' => 'SOME_STRING_VALUE',
              'search' => 'SOME_STRING_VALUE',
              'limit' => 'SOME_NUMBER_VALUE',
              'offset' => 'SOME_NUMBER_VALUE',
              'approved' => '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/template-backend/template?type=SOME_STRING_VALUE&search=SOME_STRING_VALUE&limit=SOME_NUMBER_VALUE&offset=SOME_NUMBER_VALUE&approved=SOME_BOOLEAN_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    post:
      summary: Create template
      operationId: create-template
      tags:
        - Templates
      description: |
        Create a new template.

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **User role permission required:** `templates: create`
      requestBody:
        description: Template to create
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/template-backend-TemplateCreateRequest"
      responses:
        "200":
          description: Created template
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/template-backend-TemplateDetailsResponse"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/campaigns#tag/Templates/operation/create-template
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/template-backend/template \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"name":null,"type":"EMAIL","subtype":"BANNER","contentType":"TEMPLATE","directory":"e0326a2d-7697-4ae9-b490-31f97041adcb","content":"{\"json\":\"\",\"html\":\"<p>some text</p>\",\"css\":\"p {\\n    font-weight: bold\\n}\",\"js\":\"console.log(\\\"test\\\")\",\"raw\":\"<html><head><style type=\\\"text/css\\\">p {\\n    font-weight: bold\\n}</style></head><body><p>some text</p></body></html>\",\"source\":2}","source":0,"includeSafeArea":false,"hidden":false,"temporal":false}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"name\":null,\"type\":\"EMAIL\",\"subtype\":\"BANNER\",\"contentType\":\"TEMPLATE\",\"directory\":\"e0326a2d-7697-4ae9-b490-31f97041adcb\",\"content\":\"{\\\"json\\\":\\\"\\\",\\\"html\\\":\\\"<p>some text</p>\\\",\\\"css\\\":\\\"p {\\\\n    font-weight: bold\\\\n}\\\",\\\"js\\\":\\\"console.log(\\\\\\\"test\\\\\\\")\\\",\\\"raw\\\":\\\"<html><head><style type=\\\\\\\"text/css\\\\\\\">p {\\\\n    font-weight: bold\\\\n}</style></head><body><p>some text</p></body></html>\\\",\\\"source\\\":2}\",\"source\":0,\"includeSafeArea\":false,\"hidden\":false,\"temporal\":false}"

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

            conn.request("POST", "/template-backend/template", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "name": null,
              "type": "EMAIL",
              "subtype": "BANNER",
              "contentType": "TEMPLATE",
              "directory": "e0326a2d-7697-4ae9-b490-31f97041adcb",
              "content": "{\"json\":\"\",\"html\":\"<p>some text</p>\",\"css\":\"p {\\n    font-weight: bold\\n}\",\"js\":\"console.log(\\\"test\\\")\",\"raw\":\"<html><head><style type=\\\"text/css\\\">p {\\n    font-weight: bold\\n}</style></head><body><p>some text</p></body></html>\",\"source\":2}",
              "source": 0,
              "includeSafeArea": false,
              "hidden": false,
              "temporal": 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/template-backend/template");
            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": "/template-backend/template",
              "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: null,
              type: 'EMAIL',
              subtype: 'BANNER',
              contentType: 'TEMPLATE',
              directory: 'e0326a2d-7697-4ae9-b490-31f97041adcb',
              content: '{"json":"","html":"<p>some text</p>","css":"p {\n    font-weight: bold\n}","js":"console.log(\"test\")","raw":"<html><head><style type=\"text/css\">p {\n    font-weight: bold\n}</style></head><body><p>some text</p></body></html>","source":2}',
              source: 0,
              includeSafeArea: false,
              hidden: false,
              temporal: false
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

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

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

            $request->setBody('{"name":null,"type":"EMAIL","subtype":"BANNER","contentType":"TEMPLATE","directory":"e0326a2d-7697-4ae9-b490-31f97041adcb","content":"{\\"json\\":\\"\\",\\"html\\":\\"<p>some text</p>\\",\\"css\\":\\"p {\\\\n    font-weight: bold\\\\n}\\",\\"js\\":\\"console.log(\\\\\\"test\\\\\\")\\",\\"raw\\":\\"<html><head><style type=\\\\\\"text/css\\\\\\">p {\\\\n    font-weight: bold\\\\n}</style></head><body><p>some text</p></body></html>\\",\\"source\\":2}","source":0,"includeSafeArea":false,"hidden":false,"temporal":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/template-backend/template")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"name\":null,\"type\":\"EMAIL\",\"subtype\":\"BANNER\",\"contentType\":\"TEMPLATE\",\"directory\":\"e0326a2d-7697-4ae9-b490-31f97041adcb\",\"content\":\"{\\\"json\\\":\\\"\\\",\\\"html\\\":\\\"<p>some text</p>\\\",\\\"css\\\":\\\"p {\\\\n    font-weight: bold\\\\n}\\\",\\\"js\\\":\\\"console.log(\\\\\\\"test\\\\\\\")\\\",\\\"raw\\\":\\\"<html><head><style type=\\\\\\\"text/css\\\\\\\">p {\\\\n    font-weight: bold\\\\n}</style></head><body><p>some text</p></body></html>\\\",\\\"source\\\":2}\",\"source\":0,\"includeSafeArea\":false,\"hidden\":false,\"temporal\":false}")
              .asString();
  /template-backend/template/{templateUuid}:
    get:
      summary: Get template by UUID
      operationId: get-template
      tags:
        - Templates
      description: |
        Return the details of a template identified by its UUID.

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **User role permission required:** `templates: read`
      parameters:
        - $ref: "#/components/parameters/template-backend-templateUuid"
      responses:
        "200":
          description: Template details
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/template-backend-TemplateDetailsResponse"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/campaigns#tag/Templates/operation/get-template
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/template-backend/template/e0326a2d-7697-4ae9-b490-31f97041adcb \
              --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", "/template-backend/template/e0326a2d-7697-4ae9-b490-31f97041adcb", 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/template-backend/template/e0326a2d-7697-4ae9-b490-31f97041adcb");
            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": "/template-backend/template/e0326a2d-7697-4ae9-b490-31f97041adcb",
              "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/template-backend/template/e0326a2d-7697-4ae9-b490-31f97041adcb');
            $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/template-backend/template/e0326a2d-7697-4ae9-b490-31f97041adcb")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    patch:
      summary: Patch a template
      operationId: patch-template
      tags:
        - Templates
      description: |
        Change template content.

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **User role permission required:** `templates: update`
      parameters:
        - $ref: "#/components/parameters/template-backend-templateUuid"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/template-backend-TemplateUpdateRequest"
      responses:
        "200":
          description: Template details
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/template-backend-TemplateDetailsResponse"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/campaigns#tag/Templates/operation/patch-template
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request PATCH \
              --url https://api.synerise.com/template-backend/template/e0326a2d-7697-4ae9-b490-31f97041adcb \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"name":null,"content":"{\"json\":\"\",\"html\":\"<p>some text</p>\",\"css\":\"p {\\n    font-weight: bold\\n}\",\"js\":\"console.log(\\\"test\\\")\",\"raw\":\"<html><head><style type=\\\"text/css\\\">p {\\n    font-weight: bold\\n}</style></head><body><p>some text</p></body></html>\",\"source\":2}","includeSafeArea":false}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"name\":null,\"content\":\"{\\\"json\\\":\\\"\\\",\\\"html\\\":\\\"<p>some text</p>\\\",\\\"css\\\":\\\"p {\\\\n    font-weight: bold\\\\n}\\\",\\\"js\\\":\\\"console.log(\\\\\\\"test\\\\\\\")\\\",\\\"raw\\\":\\\"<html><head><style type=\\\\\\\"text/css\\\\\\\">p {\\\\n    font-weight: bold\\\\n}</style></head><body><p>some text</p></body></html>\\\",\\\"source\\\":2}\",\"includeSafeArea\":false}"

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

            conn.request("PATCH", "/template-backend/template/e0326a2d-7697-4ae9-b490-31f97041adcb", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "name": null,
              "content": "{\"json\":\"\",\"html\":\"<p>some text</p>\",\"css\":\"p {\\n    font-weight: bold\\n}\",\"js\":\"console.log(\\\"test\\\")\",\"raw\":\"<html><head><style type=\\\"text/css\\\">p {\\n    font-weight: bold\\n}</style></head><body><p>some text</p></body></html>\",\"source\":2}",
              "includeSafeArea": false
            });

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

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

            xhr.open("PATCH", "https://api.synerise.com/template-backend/template/e0326a2d-7697-4ae9-b490-31f97041adcb");
            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": "PATCH",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/template-backend/template/e0326a2d-7697-4ae9-b490-31f97041adcb",
              "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: null,
              content: '{"json":"","html":"<p>some text</p>","css":"p {\n    font-weight: bold\n}","js":"console.log(\"test\")","raw":"<html><head><style type=\"text/css\">p {\n    font-weight: bold\n}</style></head><body><p>some text</p></body></html>","source":2}',
              includeSafeArea: false
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            HttpRequest::methodRegister('PATCH');
            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/template-backend/template/e0326a2d-7697-4ae9-b490-31f97041adcb');
            $request->setMethod(HttpRequest::HTTP_METH_PATCH);

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

            $request->setBody('{"name":null,"content":"{\\"json\\":\\"\\",\\"html\\":\\"<p>some text</p>\\",\\"css\\":\\"p {\\\\n    font-weight: bold\\\\n}\\",\\"js\\":\\"console.log(\\\\\\"test\\\\\\")\\",\\"raw\\":\\"<html><head><style type=\\\\\\"text/css\\\\\\">p {\\\\n    font-weight: bold\\\\n}</style></head><body><p>some text</p></body></html>\\",\\"source\\":2}","includeSafeArea":false}');

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.patch("https://api.synerise.com/template-backend/template/e0326a2d-7697-4ae9-b490-31f97041adcb")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"name\":null,\"content\":\"{\\\"json\\\":\\\"\\\",\\\"html\\\":\\\"<p>some text</p>\\\",\\\"css\\\":\\\"p {\\\\n    font-weight: bold\\\\n}\\\",\\\"js\\\":\\\"console.log(\\\\\\\"test\\\\\\\")\\\",\\\"raw\\\":\\\"<html><head><style type=\\\\\\\"text/css\\\\\\\">p {\\\\n    font-weight: bold\\\\n}</style></head><body><p>some text</p></body></html>\\\",\\\"source\\\":2}\",\"includeSafeArea\":false}")
              .asString();
  /template-backend/template/functional:
    post:
      summary: Create functional template
      operationId: create-functional-template
      tags:
        - Templates
      description: |
        Create a new functional template. Functional templates are used for cases not covered by the [Create template endpoint](#operation/create-template), such as a password change page.

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **User role permission required:** `templates: create`
      requestBody:
        description: Functional template to create
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/template-backend-FunctionTemplateCreateRequest"
      responses:
        "200":
          description: Created template
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/template-backend-DefaultTemplateDetailsResponse"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/campaigns#tag/Templates/operation/create-functional-template
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/template-backend/template/functional \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"name":"name","content":"<html><h1>Content</h1></html>","functionType":"Password Change","directory":"e0326a2d-7697-4ae9-b490-31f97041adcb"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"name\":\"name\",\"content\":\"<html><h1>Content</h1></html>\",\"functionType\":\"Password Change\",\"directory\":\"e0326a2d-7697-4ae9-b490-31f97041adcb\"}"

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

            conn.request("POST", "/template-backend/template/functional", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "name": "name",
              "content": "<html><h1>Content</h1></html>",
              "functionType": "Password Change",
              "directory": "e0326a2d-7697-4ae9-b490-31f97041adcb"
            });

            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/template-backend/template/functional");
            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": "/template-backend/template/functional",
              "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: 'name',
              content: '<html><h1>Content</h1></html>',
              functionType: 'Password Change',
              directory: 'e0326a2d-7697-4ae9-b490-31f97041adcb'
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/template-backend/template/functional');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"name":"name","content":"<html><h1>Content</h1></html>","functionType":"Password Change","directory":"e0326a2d-7697-4ae9-b490-31f97041adcb"}');

            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/template-backend/template/functional")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"name\":\"name\",\"content\":\"<html><h1>Content</h1></html>\",\"functionType\":\"Password Change\",\"directory\":\"e0326a2d-7697-4ae9-b490-31f97041adcb\"}")
              .asString();
  /template-backend/template/move:
    post:
      summary: Move templates to another directory
      operationId: move-templates
      tags:
        - Templates
      description: |
        Move templates to another directory.

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **User role permission required:** `templates: update`
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/template-backend-MoveTemplatesRequest"
      responses:
        "200":
          description: Number of moved templates
          content:
            application/json:
              schema:
                type: integer
                description: Number of moved templates
                example: 12
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/campaigns#tag/Templates/operation/move-templates
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/template-backend/template/move \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"templateHashIds":["2ede34f8-1c27-4131-bfb1-5c88856882e1"],"directoryHash":"2ede34f8-1c27-4131-bfb1-5c88856882e1"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"templateHashIds\":[\"2ede34f8-1c27-4131-bfb1-5c88856882e1\"],\"directoryHash\":\"2ede34f8-1c27-4131-bfb1-5c88856882e1\"}"

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

            conn.request("POST", "/template-backend/template/move", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "templateHashIds": [
                "2ede34f8-1c27-4131-bfb1-5c88856882e1"
              ],
              "directoryHash": "2ede34f8-1c27-4131-bfb1-5c88856882e1"
            });

            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/template-backend/template/move");
            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": "/template-backend/template/move",
              "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({
              templateHashIds: ['2ede34f8-1c27-4131-bfb1-5c88856882e1'],
              directoryHash: '2ede34f8-1c27-4131-bfb1-5c88856882e1'
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/template-backend/template/move');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"templateHashIds":["2ede34f8-1c27-4131-bfb1-5c88856882e1"],"directoryHash":"2ede34f8-1c27-4131-bfb1-5c88856882e1"}');

            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/template-backend/template/move")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"templateHashIds\":[\"2ede34f8-1c27-4131-bfb1-5c88856882e1\"],\"directoryHash\":\"2ede34f8-1c27-4131-bfb1-5c88856882e1\"}")
              .asString();
  /template-backend/template/remove:
    post:
      summary: Remove templates
      operationId: remove-templates
      tags:
        - Templates
      description: |
        Delete templates. This operation is irreversible.

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **User role permission required:** `templates: delete`
      requestBody:
        description: List of template UUIDs to remove
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: "#/components/schemas/template-backend-TemplateHashId"
      responses:
        "200":
          description: Number of removed templates
          content:
            application/json:
              schema:
                type: integer
                description: Number of removed templates
                example: 12
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/campaigns#tag/Templates/operation/remove-templates
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/template-backend/template/remove \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '["e0326a2d-7697-4ae9-b490-31f97041adcb"]'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "[\"e0326a2d-7697-4ae9-b490-31f97041adcb\"]"

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

            conn.request("POST", "/template-backend/template/remove", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify([
              "e0326a2d-7697-4ae9-b490-31f97041adcb"
            ]);

            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/template-backend/template/remove");
            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": "/template-backend/template/remove",
              "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(['e0326a2d-7697-4ae9-b490-31f97041adcb']));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/template-backend/template/remove');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('["e0326a2d-7697-4ae9-b490-31f97041adcb"]');

            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/template-backend/template/remove")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("[\"e0326a2d-7697-4ae9-b490-31f97041adcb\"]")
              .asString();
  /template-backend/template/getById/{id}:
    get:
      summary: Get template by ID
      operationId: get-id-template
      description: |
        Retrieve a template identified by ID.

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **User role permission required:** `templates: read`
      tags:
        - Templates
      parameters:
        - in: path
          name: id
          schema:
            type: integer
            format: int64
            example: 12
          description: Template ID
          required: true
      responses:
        "200":
          description: Template details
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/template-backend-TemplateDetailsResponse"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/campaigns#tag/Templates/operation/get-id-template
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/template-backend/template/getById/12 \
              --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", "/template-backend/template/getById/12", 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/template-backend/template/getById/12");
            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": "/template-backend/template/getById/12",
              "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/template-backend/template/getById/12');
            $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/template-backend/template/getById/12")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /template-backend/directory:
    get:
      tags:
        - Template directories
      summary: Get directories
      operationId: get-directories
      description: |
        Retrieve a list of all directories in the Workspace.

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **User role permission required:** `templates: read`
      responses:
        "200":
          description: Directory list
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/template-backend-DirectoryResponse"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/campaigns#tag/Template-directories/operation/get-directories
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/template-backend/directory \
              --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", "/template-backend/directory", 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/template-backend/directory");
            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": "/template-backend/directory",
              "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/template-backend/directory');
            $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/template-backend/directory")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    post:
      tags:
        - Template directories
      summary: Create directory
      operationId: create-directory
      description: |
        Create a new directory for templates. A directory can store only one type of templates.

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **User role permission required:** `templates: create`
      requestBody:
        description: Directory to create
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/template-backend-DirectoryCreateRequest"
      responses:
        "200":
          description: Created directory
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/template-backend-DirectoryResponse"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/campaigns#tag/Template-directories/operation/create-directory
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/template-backend/directory \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"name":"string","type":"EMAIL","readOnly":false,"contentType":"TEMPLATE"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"name\":\"string\",\"type\":\"EMAIL\",\"readOnly\":false,\"contentType\":\"TEMPLATE\"}"

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

            conn.request("POST", "/template-backend/directory", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "name": "string",
              "type": "EMAIL",
              "readOnly": false,
              "contentType": "TEMPLATE"
            });

            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/template-backend/directory");
            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": "/template-backend/directory",
              "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', type: 'EMAIL', readOnly: false, contentType: 'TEMPLATE'}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/template-backend/directory');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"name":"string","type":"EMAIL","readOnly":false,"contentType":"TEMPLATE"}');

            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/template-backend/directory")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"name\":\"string\",\"type\":\"EMAIL\",\"readOnly\":false,\"contentType\":\"TEMPLATE\"}")
              .asString();
  /template-backend/directory/byType:
    get:
      tags:
        - Template directories
      summary: Get directories by type
      operationId: get-type-directories
      description: |
        Retrieve a list of directories of a single type.

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **User role permission required:** `templates: read`
      parameters:
        - in: query
          name: type
          schema:
            type: string
            enum:
              - SMS
              - MOBILE_PUSH
              - WEB_PUSH
              - DYNAMIC_CONTENT
              - LANDING_PAGE
              - EMAIL
              - SOCIAL_MEDIA
              - IN_APP
          description: |
            
            The type of directories to return (directory types match the template types stored in them).

            Directories with null type are always returned.
          required: true
      responses:
        "200":
          description: Directory list
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/template-backend-DirectoryResponse"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/campaigns#tag/Template-directories/operation/get-type-directories
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/template-backend/directory/byType?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", "/template-backend/directory/byType?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/template-backend/directory/byType?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": "/template-backend/directory/byType?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/template-backend/directory/byType');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              '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/template-backend/directory/byType?type=SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /template-backend/directory/{directoryUUID}:
    patch:
      summary: Rename directory
      operationId: update_directory
      description: |
        Rename a directory.

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **User role permission required:** `templates: update`
      tags:
        - Template directories
      parameters:
        - $ref: "#/components/parameters/template-backend-directoryUuid"
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: New name of the directory. If not sent, the name of the directory is set to null.
                  default: null
      responses:
        "200":
          description: Directory details
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/template-backend-DirectoryResponse"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/campaigns#tag/Template-directories/operation/update_directory
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request PATCH \
              --url https://api.synerise.com/template-backend/directory/e0326a2d-7697-4ae9-b490-31f97041adcb \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"name":null}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"name\":null}"

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

            conn.request("PATCH", "/template-backend/directory/e0326a2d-7697-4ae9-b490-31f97041adcb", payload, headers)

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

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

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

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

            xhr.open("PATCH", "https://api.synerise.com/template-backend/directory/e0326a2d-7697-4ae9-b490-31f97041adcb");
            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": "PATCH",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/template-backend/directory/e0326a2d-7697-4ae9-b490-31f97041adcb",
              "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: null}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            HttpRequest::methodRegister('PATCH');
            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/template-backend/directory/e0326a2d-7697-4ae9-b490-31f97041adcb');
            $request->setMethod(HttpRequest::HTTP_METH_PATCH);

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

            $request->setBody('{"name":null}');

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.patch("https://api.synerise.com/template-backend/directory/e0326a2d-7697-4ae9-b490-31f97041adcb")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"name\":null}")
              .asString();
    delete:
      summary: Remove directory
      operationId: remove_directory
      description: |
        Remove a directory. Only empty directories can be removed.

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **User role permission required:** `templates: delete`
      tags:
        - Template directories
      parameters:
        - $ref: "#/components/parameters/template-backend-directoryUuid"
      responses:
        "200":
          description: Directory removed
        "400":
          description: Directory is not empty
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/campaigns#tag/Template-directories/operation/remove_directory
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request DELETE \
              --url https://api.synerise.com/template-backend/directory/e0326a2d-7697-4ae9-b490-31f97041adcb \
              --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", "/template-backend/directory/e0326a2d-7697-4ae9-b490-31f97041adcb", 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/template-backend/directory/e0326a2d-7697-4ae9-b490-31f97041adcb");
            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": "/template-backend/directory/e0326a2d-7697-4ae9-b490-31f97041adcb",
              "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/template-backend/directory/e0326a2d-7697-4ae9-b490-31f97041adcb');
            $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/template-backend/directory/e0326a2d-7697-4ae9-b490-31f97041adcb")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /template-backend/upload/zip:
    post:
      summary: Create template from ZIP
      operationId: create-zip-template
      tags:
        - Templates
      description: |
        Create new template from ZIP file.

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **User role permission required:** `templates: create`
      requestBody:
        description: ZIP file with template
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              required:
                - filename
              properties:
                filename:
                  type: string
                  format: binary
                  description: ZIP file
      responses:
        "200":
          description: Created template
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/template-backend-TemplateResponse"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/campaigns#tag/Templates/operation/create-zip-template
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/template-backend/upload/zip \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: multipart/form-data' \
              --form filename=string
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"filename\"\r\n\r\nstring\r\n-----011000010111000001101001--\r\n"

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

            conn.request("POST", "/template-backend/upload/zip", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = new FormData();
            data.append("filename", "string");

            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/template-backend/upload/zip");
            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": "/template-backend/upload/zip",
              "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=\"filename\"\r\n\r\nstring\r\n-----011000010111000001101001--\r\n");
            req.end();
        - lang: PHP
          label: PHP
          source: "<?php


            $request = new HttpRequest();

            $request->setUrl('https://api.synerise.com/template-backend/upload/zip');

            $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=\"filename\"\r

            \r

            string\r

            -----011000010111000001101001--\r

            ');


            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/template-backend/upload/zip")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"filename\"\r\n\r\nstring\r\n-----011000010111000001101001--\r\n")
              .asString();
  /template-backend/upload/url:
    post:
      summary: Create template from URL
      operationId: create-url-template
      tags:
        - Templates
      description: |
        Create new template from URL.

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **User role permission required:** `templates: create`
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              description: ""
              required:
                - url
              properties:
                url:
                  type: string
                  description: URL of the template
      responses:
        "200":
          description: Created template
          content:
            application/json:
              schema:
                items:
                  $ref: "#/components/schemas/template-backend-TemplateResponse"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/campaigns#tag/Templates/operation/create-url-template
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/template-backend/upload/url \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"url":"string"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"url\":\"string\"}"

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

            conn.request("POST", "/template-backend/upload/url", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "url": "string"
            });

            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/template-backend/upload/url");
            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": "/template-backend/upload/url",
              "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'}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/template-backend/upload/url');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"url":"string"}');

            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/template-backend/upload/url")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"url\":\"string\"}")
              .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-RecoStatsByCampaignSchema:
      type: object
      description: Recommendation campaigns stats.
      properties:
        data:
          type: object
          properties:
            summary:
              $ref: "#/components/schemas/ai-stats-RecoStatsSchema"
            byCampaign:
              type: array
              items:
                $ref: "#/components/schemas/ai-stats-RecoCampaignStatsSchema"
    ai-stats-RecoCampaignStatsSchema:
      type: object
      description: Stats for a single recommendation campaign.
      properties:
        campaignId:
          type: string
          description: Id of the campaign.
        stats:
          $ref: "#/components/schemas/ai-stats-RecoStatsSchema"
    ai-stats-RecoStatsSchema:
      type: object
      description: Recommendation statistics.
      properties:
        views:
          $ref: "#/components/schemas/ai-stats-views"
        revenue:
          $ref: "#/components/schemas/ai-stats-recommendationsRevenue"
        itemPurchases:
          $ref: "#/components/schemas/ai-stats-itemPurchases"
        itemPurchasesPerItemClick:
          $ref: "#/components/schemas/ai-stats-itemPurchasesPerItemClick"
        itemClicks:
          $ref: "#/components/schemas/ai-stats-itemClicks"
        transactions:
          $ref: "#/components/schemas/ai-stats-transactions"
        frameClicks:
          $ref: "#/components/schemas/ai-stats-frameClicks"
        frameClicksPerGeneration:
          $ref: "#/components/schemas/ai-stats-frameClicksPerGeneration"
        frameClicksPerView:
          $ref: "#/components/schemas/ai-stats-frameClicksPerView"
        generations:
          $ref: "#/components/schemas/ai-stats-generations"
        uniqueClients:
          $ref: "#/components/schemas/ai-stats-uniqueClients"
    ai-stats-uniqueClients:
      type: number
      format: integer
      description: Number of unique profiles which generated a recommendation.
    ai-stats-generations:
      type: integer
      description: The number of generated recommendations.
    ai-stats-frameClicksPerView:
      type: number
      format: float
      description: Frame clicks per view ratio.
    ai-stats-frameClicksPerGeneration:
      type: number
      format: float
      description: Frame clicks per generation ratio.
    ai-stats-frameClicks:
      type: number
      format: integer
      description: Number of clicks on a recommendation frame.
    ai-stats-transactions:
      type: integer
      description: The number of transactions resulting from the recommendation.
    ai-stats-itemClicks:
      type: number
      format: integer
      description: Number of clicks on a recommendation item.
    ai-stats-itemPurchasesPerItemClick:
      type: number
      format: float
      description: Item purchases per item click ratio.
    ai-stats-itemPurchases:
      type: integer
      description: The number of individual item purchases.
    ai-stats-recommendationsRevenue:
      type: number
      format: float
      description: Total revenue generated by recommendations.
    ai-stats-views:
      type: integer
      description: The number of recommendation frame views.
    ai-stats-RecoStatsByDateSchema:
      type: object
      description: Recommendation campaigns statistics.
      properties:
        data:
          type: object
          description: The requested statistics.
          properties:
            summary:
              $ref: "#/components/schemas/ai-stats-RecoStatsSchema"
            byDate:
              type: array
              description: Results for individual days.
              items:
                $ref: "#/components/schemas/ai-stats-RecoDateStatsSchema"
    ai-stats-RecoDateStatsSchema:
      type: object
      description: Recommendation campaigns stats for a single date.
      properties:
        date:
          type: string
          description: The date.
          format: date
        stats:
          $ref: "#/components/schemas/ai-stats-RecoStatsSchema"
    ai-stats-RecoTopProductsStatsSchema:
      type: object
      description: The statistics of best-performing products in the campaign, according to the selected metric
      properties:
        data:
          type: array
          description: Each object in the array contains the statistics for one item.
          items:
            $ref: "#/components/schemas/ai-stats-RecoTopProductsEntryStatsSchema"
    ai-stats-RecoTopProductsEntryStatsSchema:
      type: object
      description: Statistics for a single item.
      properties:
        productId:
          type: string
          description: Id of the item.
        stats:
          $ref: "#/components/schemas/ai-stats-RecoStatsSchema"
    recommendation-campaigns-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
    recommendation-campaigns-RecommendationCampaignsResponseV2:
      type: object
      properties:
        meta:
          type: object
          description: Pagination metadata
          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
        data:
          type: array
          description: Campaign details
          items:
            $ref: "#/components/schemas/recommendation-campaigns-RecommendationCampaignDefinitionV2"
        extras:
          type: object
          properties:
            states:
              type: object
              description: Number of campaigns in particular state after applying filters
              properties:
                active:
                  type: number
                draft:
                  type: number
                paused:
                  type: number
    recommendation-campaigns-RecommendationCampaignDefinitionV2:
      title: Campaign definition
      oneOf:
        - $ref: "#/components/schemas/recommendation-campaigns-SimilarRecommendationCampaignsDefinitionV2"
        - $ref: "#/components/schemas/recommendation-campaigns-MetricsRecommendationCampaignsDefinitionV2"
        - $ref: "#/components/schemas/recommendation-campaigns-CrossSellRecommendationCampaignsDefinitionV2"
        - $ref: "#/components/schemas/recommendation-campaigns-SetComplementRecommendationCampaignsDefinitionV2"
        - $ref: "#/components/schemas/recommendation-campaigns-LastViewedRecommendationCampaignsDefinitionV2"
        - $ref: "#/components/schemas/recommendation-campaigns-PersonalizedRecommendationCampaignsDefinitionV2"
        - $ref: "#/components/schemas/recommendation-campaigns-VisuallySimilarRecommendationCampaignsDefinitionV2"
        - $ref: "#/components/schemas/recommendation-campaigns-ItemComparisonRecommendationCampaignsDefinitionV2"
        - $ref: "#/components/schemas/recommendation-campaigns-RecentInteractionsRecommendationCampaignsDefinitionV2"
        - $ref: "#/components/schemas/recommendation-campaigns-SectionRecommendationCampaignsDefinitionV2"
        - $ref: "#/components/schemas/recommendation-campaigns-AttributeRecommendationCampaignsDefinitionV2"
        - $ref: "#/components/schemas/recommendation-campaigns-NextInteractionRecommendationCampaignsDefinitionV2"
        - $ref: "#/components/schemas/recommendation-campaigns-ExternalItemsRecommendationCampaignsDefinitionV2"
    recommendation-campaigns-ExternalItemsRecommendationCampaignsDefinitionV2:
      title: External items
      allOf:
        - type: object
          required:
            - type
          properties:
            type:
              $ref: "#/components/schemas/recommendation-campaigns-CampaignTypeExternalItems"
            parameters:
              $ref: "#/components/schemas/recommendation-campaigns-WithMetricsRecommendationsCampaignParameters"
        - $ref: "#/components/schemas/recommendation-campaigns-BaseRecommendationCampaignsDefinitionV2"
    recommendation-campaigns-BaseRecommendationCampaignsDefinitionV2:
      type: object
      properties:
        campaignId:
          type: string
          description: Campaign ID
        title:
          $ref: "#/components/schemas/recommendation-campaigns-CampaignTitle"
        slug:
          $ref: "#/components/schemas/recommendation-campaigns-Slug"
        description:
          $ref: "#/components/schemas/recommendation-campaigns-CampaignDescription"
        startDate:
          $ref: "#/components/schemas/recommendation-campaigns-StartDate"
        endDate:
          $ref: "#/components/schemas/recommendation-campaigns-EndDate"
        createdAt:
          type: string
          description: Date when the campaign was created
        updatedAt:
          type: string
          description: Date when the campaign was last updated
        state:
          $ref: "#/components/schemas/recommendation-campaigns-State"
        filterRules:
          $ref: "#/components/schemas/recommendation-campaigns-RecommendationsCampaignFilterRules"
        itemsCatalogId:
          $ref: "#/components/schemas/recommendation-campaigns-ItemsCatalogId"
        additionalResponseAttributes:
          type: array
          description: An array of addtional response attributes.
          items:
            type: string
        slots:
          $ref: "#/components/schemas/recommendation-campaigns-Slots"
        keepSlotsOrder:
          $ref: "#/components/schemas/recommendation-campaigns-KeepSlotsOrder"
        personalizeSlotsOrder:
          $ref: "#/components/schemas/recommendation-campaigns-PersonalizeSlotsOrder"
        boostingStrategies:
          $ref: "#/components/schemas/recommendation-campaigns-BoostingStrategies"
        itemsSource:
          $ref: "#/components/schemas/recommendation-campaigns-ItemsSource"
        abTest:
          $ref: "#/components/schemas/recommendation-campaigns-ABTestInfo"
        crossWorkspaceMode:
          $ref: "#/components/schemas/recommendation-campaigns-CrossWorkspaceMode"
      required:
        - title
        - type
        - startDate
        - state
        - itemsCatalogId
    recommendation-campaigns-CrossWorkspaceMode:
      type: object
      properties:
        enabled:
          type: boolean
          description: Specifies if campaign should support multibrand cross workspace segmentation.
    recommendation-campaigns-ABTestInfo:
      type: object
      description: Information whether campaign is part of an a/b test
      properties:
        experimentId:
          type: integer
          description: Experiment ID
        variantId:
          type: integer
          description: Variant ID
        status:
          type: string
          enum:
            - NotStarted
            - Running
            - Paused
            - Finished
          description: Status
        isBaseline:
          type: boolean
          description: Information whether campaign is a baseline.
    recommendation-campaigns-ItemsSource:
      type: object
      description: |
        The source of item ID or IDs for the recommendation context. This parameter can be passed in all recommendations. In recommendations which don't use item context as part of the recommendation model, the context item can be used only to create filters.

        The item ID source (aggregate or expression) should return a string or an array of strings. If it returns numerical values, the recommendations engine attempts to convert them into strings while processing the request.

        Alternatively, you can pass the `itemId` or `itemsSource` parameter when making a request to generate a recommendation from this campaign. The parameter overrides the settings defined here.
      properties:
        type:
          type: string
          enum:
            - aggregate
            - expression
          description: |
            Type of the source of item ID or IDs for the recommendation context. 

            If the items' source type is 'aggregate', the aggregate result will be used as context items. If the items' source type is 'expression', the expression result will be used as context items.
        id:
          type: string
          description: |
            ID of the items' source for the recommendation context. If the source's type is 'aggregate', this is the aggregate's ID. If the source's type is 'expression', this is the expression's ID.
    recommendation-campaigns-BoostingStrategies:
      type: array
      description: Recommendation boosting strategies
      items:
        $ref: "#/components/schemas/recommendation-campaigns-BoostingStrategy"
    recommendation-campaigns-BoostingStrategy:
      type: object
      description: Boosting strategy allows you to promote or demote specific types of products in recommendation scoring
      properties:
        name:
          type: string
          description: Boosting strategy name
        condition:
          type: string
          description: The condition that indicates on which items the boost will be performed. The condition must comply with the rules of creating filters.
        strength:
          type: number
          description: How much influence the strategy has. Values less than 1.0 allow you to degrade items that meet the condition, values greater than 1.0 allow you to promote items that meet the condition. A strength with a value of 1.0 does not change the scoring.
          format: float
          minimum: 0
          maximum: 2
          default: 1
      required:
        - name
        - condition
        - strength
    recommendation-campaigns-PersonalizeSlotsOrder:
      type: boolean
      default: false
      description: |
        Sort the slots by average personalized slot score. This parameter applies only to personalized and attribute recommendation campaigns.

        If you want to set `personalizeSlotsOrder` to `true`, `keepSlotsOrder` must also be `true`.
    recommendation-campaigns-KeepSlotsOrder:
      type: boolean
      default: true
      description: |
        - When `true`, the `data` array in the response is sorted according to slots. Within each slot, the items are sorted by their score (default) or metric (if selected). For example, if you have 3 slots of 2 items each, the first 2 items in `data` are from the first slot, the second 2 are from the second slot, and the last 2 are from the third slot.
        - When `false`, the `data` array in the response is sorted only according to score (default) or metric (if selected). Slots have no effect.

        The additional `extras.slots` object always shows slots and items as if this setting was `true`.

        If you want to set `personalizeSlotsOrder` to `true`, `keepSlotsOrder` must also be `true`.
    recommendation-campaigns-Slots:
      type: array
      minLength: 1
      description: Recommendation slots. Must contain at least one slot with a non-empty `name`.
      items:
        $ref: "#/components/schemas/recommendation-campaigns-Slot"
    recommendation-campaigns-Slot:
      type: object
      description: Slot allows you to define a separate recommendation frame with its filters and other parameters
      properties:
        name:
          $ref: "#/components/schemas/recommendation-campaigns-SlotName"
        itemMin:
          $ref: "#/components/schemas/recommendation-campaigns-ItemMin"
        itemMax:
          $ref: "#/components/schemas/recommendation-campaigns-ItemMax"
        filterRules:
          $ref: "#/components/schemas/recommendation-campaigns-RecommendationsCampaignSlotFilterRules"
        distinctFilter:
          $ref: "#/components/schemas/recommendation-campaigns-DistinctFilter"
        attribute:
          type: object
          description: The attribute for rows grouping in the section and attribute recommendation campaign.
          properties:
            name:
              description: Name of attribute for rows grouping.
              type: string
            levelRangeModifier:
              description: Restricts the range of products in recommendations to a particular attribute level.
              type: integer
        numRows:
          type: integer
          description: The number of rows in the section recommendation campaign.
        numItems:
          type: integer
          description: The number of products in each row in the section recommendation campaign.
        useDefaultDistinctFilters:
          type: boolean
          description: Specify if slot should override distinctFilter and use defaultDistinctFiltersConfiguration specified for the feed instead.
        useDefaultItemFilters:
          type: boolean
          description: Specify if slot should override item filters and use defaultItemFilters specified for the feed instead.
      required:
        - name
    recommendation-campaigns-DistinctFilter:
      type: object
      description: Distinct filter allows to specify how many recommended items can have the same value of specified attributes.
      properties:
        elastic:
          type: boolean
          description: It allows to complete the recommended items with items which don't meet the distinct filter criteria.
        filters:
          type: array
          minItems: 1
          maxItems: 5
          description: Array of distinct filters
          items:
            type: object
            properties:
              field:
                type: string
                description: Attribute name
              maxNumItems:
                type: number
                format: integer
                description: Max number of items with the same value of the attribute
              levelRangeModifier:
                type: number
                format: integer
                description: Parameter used (for the `category` field) to specify how many categories to cut off from the end
            required:
              - field
              - maxNumItems
      required:
        - elastic
        - filters
    recommendation-campaigns-RecommendationsCampaignSlotFilterRules:
      type: object
      description: Filters that apply to this campaign
      properties:
        filters:
          type: string
          description: Filtering string
        elasticFilters:
          type: string
          description: Filtering string for Elastic filter
    recommendation-campaigns-ItemMax:
      type: integer
      description: The maximal number of items in the campaign or the maximal number of attribute values in the attribute recommendation campaign.
    recommendation-campaigns-ItemMin:
      type: integer
      description: The minimal number of items in the campaign or the minimal number of attribute values in the attribute recommendation campaign.
    recommendation-campaigns-SlotName:
      type: string
      description: Slot name
    recommendation-campaigns-ItemsCatalogId:
      type: string
      description: Only items from this catalog will be recommended.
    recommendation-campaigns-RecommendationsCampaignFilterRules:
      type: object
      description: Filters that apply to this campaign. If the filters contain an attribute used in the default filters of the recommendation model ([**Settings > AI Configuration**](https://help.synerise.com/docs/settings/configuration/ai-engine-configuration/engine-configuration-for-recommendations/#selecting-recommendation-types-and-default-filters)), that default filter is ignored.
      properties:
        excludePurchasedItems:
          type: boolean
          description: When true, the recommendation results will include only items that the profile hasn't purchased before.
        excludePurchasedItemsSinceDays:
          type: number
          format: integer
          description: Limits the application of the `excludePurchasedItems` filter to a specified number of days.
        elasticExcludePurchasedItems:
          type: boolean
          description: This is a setting for Elastic filters.<br>When true, the recommendation results will include only items that the profile hasn't purchased before.
        elasticExcludePurchasedItemsSinceDays:
          type: number
          format: integer
          description: This is a setting for Elastic filters.<br>Limits the application of the `elasticExcludePurchasedItemsSinceDays` filter to a specified number of days.
    recommendation-campaigns-State:
      type: string
      description: Campaign status
      enum:
        - draft
        - active
        - paused
        - deleted
    recommendation-campaigns-EndDate:
      type: string
      description: End date for the campaign
    recommendation-campaigns-StartDate:
      type: string
      description: Start date for the campaign
    recommendation-campaigns-CampaignDescription:
      type: string
      description: Campaign description
    recommendation-campaigns-Slug:
      type: string
      description: Unique identifier of the campaign. Can be used for fetching campaigns instead of the ID. Create meaningful, human-readable slugs for easier work with recommendation campaigns.
    recommendation-campaigns-CampaignTitle:
      type: string
      description: Campaign title
    recommendation-campaigns-WithMetricsRecommendationsCampaignParameters:
      allOf:
        - $ref: "#/components/schemas/recommendation-campaigns-BaseRecommendationsCampaignParameters"
        - type: object
          properties:
            boostMetric:
              type: string
              description: ID of the metric to boost the results by. Metric scores will be combined with recommendation scores, favoring the best-performing results.
            sortMetric:
              type: string
              description: ID of the metric to sort the results by.
            boostMetricStrength:
              type: number
              description: How much influence the `boostMetric` has. Values less than 0 allow you to demote items that have high metric score, values greater than 0 allow you to promote items that have high metric score. A strength with a value of 0 does not change the scoring.
              format: float
              minimum: -100
              maximum: 100
            shuffleNumItems:
              $ref: "#/components/schemas/recommendation-campaigns-ShuffleNumItems"
    recommendation-campaigns-ShuffleNumItems:
      type: integer
      description: When this parameter is provided, this many best item recommendations are provided. A number of them, no more than the value of `itemMax`, are chosen randomly for recommendation.
    recommendation-campaigns-BaseRecommendationsCampaignParameters:
      type: object
      description: Parameters that apply to this campaign
      properties:
        additionalResponseAttributes:
          type: array
          items:
            type: string
          description: An array of additional response attributes.
    recommendation-campaigns-CampaignTypeExternalItems:
      type: string
      description: Campaign type
      enum:
        - external-items
    recommendation-campaigns-NextInteractionRecommendationCampaignsDefinitionV2:
      title: Next interaction
      allOf:
        - type: object
          required:
            - type
          properties:
            type:
              $ref: "#/components/schemas/recommendation-campaigns-CampaignTypeNextInteraction"
            parameters:
              $ref: "#/components/schemas/recommendation-campaigns-WithMetricsRecommendationsCampaignParameters"
        - $ref: "#/components/schemas/recommendation-campaigns-BaseRecommendationCampaignsDefinitionV2"
    recommendation-campaigns-CampaignTypeNextInteraction:
      type: string
      description: Campaign type
      enum:
        - next-interaction
    recommendation-campaigns-AttributeRecommendationCampaignsDefinitionV2:
      title: Attribute
      allOf:
        - type: object
          required:
            - type
          properties:
            type:
              $ref: "#/components/schemas/recommendation-campaigns-CampaignTypeAttribute"
            parameters:
              $ref: "#/components/schemas/recommendation-campaigns-AttributeRecommendationsCampaignParameters"
        - $ref: "#/components/schemas/recommendation-campaigns-BaseRecommendationCampaignsDefinitionV2"
    recommendation-campaigns-AttributeRecommendationsCampaignParameters:
      allOf:
        - $ref: "#/components/schemas/recommendation-campaigns-BaseRecommendationsCampaignParameters"
        - type: object
          properties:
            metadataCatalogId:
              type: string
              description: The id of catalog containing attributes metadata.
    recommendation-campaigns-CampaignTypeAttribute:
      type: string
      description: Campaign type
      enum:
        - attribute
    recommendation-campaigns-SectionRecommendationCampaignsDefinitionV2:
      title: Section
      allOf:
        - type: object
          required:
            - type
          properties:
            type:
              $ref: "#/components/schemas/recommendation-campaigns-CampaignTypeSection"
            parameters:
              $ref: "#/components/schemas/recommendation-campaigns-SectionRecommendationsCampaignParameters"
        - $ref: "#/components/schemas/recommendation-campaigns-BaseRecommendationCampaignsDefinitionV2"
    recommendation-campaigns-SectionRecommendationsCampaignParameters:
      allOf:
        - $ref: "#/components/schemas/recommendation-campaigns-BaseRecommendationsCampaignParameters"
        - type: object
          properties:
            metadataCatalogId:
              type: string
    recommendation-campaigns-CampaignTypeSection:
      type: string
      description: Campaign type
      enum:
        - section
    recommendation-campaigns-RecentInteractionsRecommendationCampaignsDefinitionV2:
      title: Recent interactions
      allOf:
        - type: object
          required:
            - type
          properties:
            type:
              $ref: "#/components/schemas/recommendation-campaigns-CampaignTypeRecentInteractions"
            parameters:
              $ref: "#/components/schemas/recommendation-campaigns-RecentInteractionsRecommendationsCampaignParameters"
        - $ref: "#/components/schemas/recommendation-campaigns-BaseRecommendationCampaignsDefinitionV2"
    recommendation-campaigns-RecentInteractionsRecommendationsCampaignParameters:
      allOf:
        - $ref: "#/components/schemas/recommendation-campaigns-BaseRecommendationsCampaignParameters"
        - type: object
          properties:
            aggregateId:
              type: string
              description: Id of the aggregate which provides events as a base of recommendations.
            personalizedBoostingStrength:
              $ref: "#/components/schemas/recommendation-campaigns-PersonalizedBoostingStrength"
    recommendation-campaigns-PersonalizedBoostingStrength:
      type: number
      description: How much influence the personalized scoring has. Greater values allow you to promote items that have high personalized score. A strength with a value of 0 does not change the scoring.
      format: float
      minimum: 0
      maximum: 100
      default: 0
    recommendation-campaigns-CampaignTypeRecentInteractions:
      type: string
      description: Campaign type
      enum:
        - recent-interactions
    recommendation-campaigns-ItemComparisonRecommendationCampaignsDefinitionV2:
      title: Comparison
      allOf:
        - type: object
          required:
            - type
          properties:
            type:
              $ref: "#/components/schemas/recommendation-campaigns-CampaignTypeItemComparison"
            parameters:
              $ref: "#/components/schemas/recommendation-campaigns-WithMetricsRecommendationsCampaignParameters"
        - $ref: "#/components/schemas/recommendation-campaigns-BaseRecommendationCampaignsDefinitionV2"
    recommendation-campaigns-CampaignTypeItemComparison:
      type: string
      description: Campaign type
      enum:
        - item-comparison
    recommendation-campaigns-VisuallySimilarRecommendationCampaignsDefinitionV2:
      title: Visually similar
      allOf:
        - type: object
          required:
            - type
          properties:
            type:
              $ref: "#/components/schemas/recommendation-campaigns-CampaignTypeVisuallySimilar"
            parameters:
              $ref: "#/components/schemas/recommendation-campaigns-WithMetricsRecommendationsCampaignParameters"
        - $ref: "#/components/schemas/recommendation-campaigns-BaseRecommendationCampaignsDefinitionV2"
    recommendation-campaigns-CampaignTypeVisuallySimilar:
      type: string
      description: Campaign type
      enum:
        - visually-similar
    recommendation-campaigns-PersonalizedRecommendationCampaignsDefinitionV2:
      title: Personalized
      allOf:
        - type: object
          required:
            - type
          properties:
            type:
              $ref: "#/components/schemas/recommendation-campaigns-CampaignTypePersonalized"
            parameters:
              $ref: "#/components/schemas/recommendation-campaigns-BaseRecommendationsCampaignParameters"
        - $ref: "#/components/schemas/recommendation-campaigns-BaseRecommendationCampaignsDefinitionV2"
    recommendation-campaigns-CampaignTypePersonalized:
      type: string
      description: Campaign type
      enum:
        - personalized
    recommendation-campaigns-LastViewedRecommendationCampaignsDefinitionV2:
      title: Last viewed
      allOf:
        - type: object
          required:
            - type
          properties:
            type:
              $ref: "#/components/schemas/recommendation-campaigns-CampaignTypeLastViewed"
            parameters:
              $ref: "#/components/schemas/recommendation-campaigns-BaseRecommendationsCampaignParameters"
        - $ref: "#/components/schemas/recommendation-campaigns-BaseRecommendationCampaignsDefinitionV2"
    recommendation-campaigns-CampaignTypeLastViewed:
      type: string
      description: Campaign type
      enum:
        - last-viewed
    recommendation-campaigns-SetComplementRecommendationCampaignsDefinitionV2:
      title: Complementary
      allOf:
        - type: object
          required:
            - type
          properties:
            type:
              $ref: "#/components/schemas/recommendation-campaigns-CampaignTypeComplementary"
            parameters:
              $ref: "#/components/schemas/recommendation-campaigns-SetComplementRecommendationsCampaignParameters"
        - $ref: "#/components/schemas/recommendation-campaigns-BaseRecommendationCampaignsDefinitionV2"
    recommendation-campaigns-SetComplementRecommendationsCampaignParameters:
      allOf:
        - $ref: "#/components/schemas/recommendation-campaigns-BaseRecommendationsCampaignParameters"
        - type: object
          properties:
            itemSimilarity:
              type: integer
              minimum: 0
              maximum: 5
              description: Similarity between items in the cart and the recommended items. Higher values decrease the similarity.
            recommendationVariety:
              type: number
              format: float
              minimum: 0
              maximum: 0.9
              description: Similarity between recommended items - higher values will result in more variety within the recommended item set.
            personalizedBoostingStrength:
              $ref: "#/components/schemas/recommendation-campaigns-PersonalizedBoostingStrength"
    recommendation-campaigns-CampaignTypeComplementary:
      type: string
      description: Campaign type
      enum:
        - set-complement
    recommendation-campaigns-CrossSellRecommendationCampaignsDefinitionV2:
      title: Cross-sell
      allOf:
        - type: object
          required:
            - type
          properties:
            type:
              $ref: "#/components/schemas/recommendation-campaigns-CampaignTypeCrossSell"
            parameters:
              $ref: "#/components/schemas/recommendation-campaigns-WithMetricsRecommendationsCampaignParameters"
        - $ref: "#/components/schemas/recommendation-campaigns-BaseRecommendationCampaignsDefinitionV2"
    recommendation-campaigns-CampaignTypeCrossSell:
      type: string
      description: Campaign type
      enum:
        - cross-sell
    recommendation-campaigns-MetricsRecommendationCampaignsDefinitionV2:
      title: Top items
      allOf:
        - type: object
          required:
            - type
          properties:
            type:
              $ref: "#/components/schemas/recommendation-campaigns-CampaignTypeMetrics"
            parameters:
              $ref: "#/components/schemas/recommendation-campaigns-MetricsRecommendationsCampaignParameters"
        - $ref: "#/components/schemas/recommendation-campaigns-BaseRecommendationCampaignsDefinitionV2"
    recommendation-campaigns-MetricsRecommendationsCampaignParameters:
      allOf:
        - $ref: "#/components/schemas/recommendation-campaigns-WithMetricsRecommendationsCampaignParameters"
        - type: object
          properties:
            personalizedBoostingStrength:
              $ref: "#/components/schemas/recommendation-campaigns-PersonalizedBoostingStrength"
          required:
            - sortMetric
    recommendation-campaigns-CampaignTypeMetrics:
      type: string
      description: Campaign type
      enum:
        - metrics
    recommendation-campaigns-SimilarRecommendationCampaignsDefinitionV2:
      title: Similar
      allOf:
        - type: object
          required:
            - type
          properties:
            type:
              $ref: "#/components/schemas/recommendation-campaigns-CampaignTypeSimilar"
            parameters:
              $ref: "#/components/schemas/recommendation-campaigns-WithMetricsRecommendationsCampaignParameters"
        - $ref: "#/components/schemas/recommendation-campaigns-BaseRecommendationCampaignsDefinitionV2"
    recommendation-campaigns-CampaignTypeSimilar:
      type: string
      description: Campaign type
      enum:
        - similar
    recommendation-campaigns-NextInteractionRecommendationCampaignsCreateRequestV2:
      title: Next interaction
      allOf:
        - type: object
          required:
            - type
          properties:
            type:
              $ref: "#/components/schemas/recommendation-campaigns-CampaignTypeNextInteraction"
            parameters:
              allOf:
                - $ref: "#/components/schemas/recommendation-campaigns-WithMetricsRecommendationsCampaignParameters"
                - type: object
                  properties:
                    personalizedBoostingStrength:
                      $ref: "#/components/schemas/recommendation-campaigns-PersonalizedBoostingStrength"
        - $ref: "#/components/schemas/recommendation-campaigns-BaseRecommendationCampaignsCreateRequestV2"
    recommendation-campaigns-BaseRecommendationCampaignsCreateRequestV2:
      type: object
      properties:
        title:
          $ref: "#/components/schemas/recommendation-campaigns-CampaignTitle"
        slug:
          $ref: "#/components/schemas/recommendation-campaigns-Slug"
        description:
          $ref: "#/components/schemas/recommendation-campaigns-CampaignDescription"
        startDate:
          $ref: "#/components/schemas/recommendation-campaigns-StartDate"
        endDate:
          $ref: "#/components/schemas/recommendation-campaigns-EndDate"
        state:
          $ref: "#/components/schemas/recommendation-campaigns-State"
        filterRules:
          $ref: "#/components/schemas/recommendation-campaigns-RecommendationsCampaignFilterRules"
        itemsCatalogId:
          $ref: "#/components/schemas/recommendation-campaigns-ItemsCatalogId"
        slots:
          $ref: "#/components/schemas/recommendation-campaigns-Slots"
        keepSlotsOrder:
          $ref: "#/components/schemas/recommendation-campaigns-KeepSlotsOrder"
        personalizeSlotsOrder:
          $ref: "#/components/schemas/recommendation-campaigns-PersonalizeSlotsOrder"
        boostingStrategies:
          $ref: "#/components/schemas/recommendation-campaigns-BoostingStrategies"
        itemsSource:
          $ref: "#/components/schemas/recommendation-campaigns-ItemsSource"
      required:
        - title
        - type
        - itemsCatalogId
        - slots
    recommendation-campaigns-ExternalItemsRecommendationCampaignCreateRequestV2:
      title: External items
      allOf:
        - type: object
          required:
            - type
          properties:
            type:
              $ref: "#/components/schemas/recommendation-campaigns-CampaignTypeExternalItems"
            parameters:
              allOf:
                - $ref: "#/components/schemas/recommendation-campaigns-WithMetricsRecommendationsCampaignParameters"
                - type: object
                  properties:
                    personalizedBoostingStrength:
                      $ref: "#/components/schemas/recommendation-campaigns-PersonalizedBoostingStrength"
        - $ref: "#/components/schemas/recommendation-campaigns-BaseRecommendationCampaignsCreateRequestV2"
    recommendation-campaigns-AttributeRecommendationCampaignsCreateRequestV2:
      title: Attribute
      allOf:
        - type: object
          required:
            - type
          properties:
            type:
              $ref: "#/components/schemas/recommendation-campaigns-CampaignTypeAttribute"
            parameters:
              $ref: "#/components/schemas/recommendation-campaigns-AttributeRecommendationsCampaignParameters"
        - $ref: "#/components/schemas/recommendation-campaigns-BaseRecommendationCampaignsCreateRequestV2"
    recommendation-campaigns-SectionRecommendationCampaignsCreateRequestV2:
      title: Section
      allOf:
        - type: object
          required:
            - type
          properties:
            type:
              $ref: "#/components/schemas/recommendation-campaigns-CampaignTypeSection"
            parameters:
              $ref: "#/components/schemas/recommendation-campaigns-SectionRecommendationsCampaignParameters"
        - $ref: "#/components/schemas/recommendation-campaigns-BaseRecommendationCampaignsCreateRequestV2"
    recommendation-campaigns-RecentInteractionsRecommendationCampaignsCreateRequestV2:
      title: Recent interactions
      allOf:
        - type: object
          required:
            - type
          properties:
            type:
              $ref: "#/components/schemas/recommendation-campaigns-CampaignTypeRecentInteractions"
            parameters:
              $ref: "#/components/schemas/recommendation-campaigns-RecentInteractionsRecommendationsCampaignParameters"
        - $ref: "#/components/schemas/recommendation-campaigns-BaseRecommendationCampaignsCreateRequestV2"
    recommendation-campaigns-ItemComparisonRecommendationCampaignsCreateRequestV2:
      title: Comparison
      allOf:
        - type: object
          required:
            - type
          properties:
            type:
              $ref: "#/components/schemas/recommendation-campaigns-CampaignTypeItemComparison"
            parameters:
              allOf:
                - $ref: "#/components/schemas/recommendation-campaigns-WithMetricsRecommendationsCampaignParameters"
                - type: object
                  properties:
                    personalizedBoostingStrength:
                      $ref: "#/components/schemas/recommendation-campaigns-PersonalizedBoostingStrength"
        - $ref: "#/components/schemas/recommendation-campaigns-BaseRecommendationCampaignsCreateRequestV2"
    recommendation-campaigns-VisuallySimilarRecommendationCampaignsCreateRequestV2:
      title: Visually similar
      allOf:
        - type: object
          required:
            - type
          properties:
            type:
              $ref: "#/components/schemas/recommendation-campaigns-CampaignTypeVisuallySimilar"
            parameters:
              allOf:
                - $ref: "#/components/schemas/recommendation-campaigns-WithMetricsRecommendationsCampaignParameters"
                - type: object
                  properties:
                    personalizedBoostingStrength:
                      $ref: "#/components/schemas/recommendation-campaigns-PersonalizedBoostingStrength"
        - $ref: "#/components/schemas/recommendation-campaigns-BaseRecommendationCampaignsCreateRequestV2"
    recommendation-campaigns-PersonalizedRecommendationCampaignsCreateRequestV2:
      title: Personalized
      allOf:
        - type: object
          required:
            - type
          properties:
            type:
              $ref: "#/components/schemas/recommendation-campaigns-CampaignTypePersonalized"
            parameters:
              $ref: "#/components/schemas/recommendation-campaigns-BaseRecommendationsCampaignParameters"
        - $ref: "#/components/schemas/recommendation-campaigns-BaseRecommendationCampaignsCreateRequestV2"
    recommendation-campaigns-LastViewedRecommendationCampaignsCreateRequestV2:
      title: Last viewed
      allOf:
        - type: object
          required:
            - type
          properties:
            type:
              $ref: "#/components/schemas/recommendation-campaigns-CampaignTypeLastViewed"
            parameters:
              allOf:
                - $ref: "#/components/schemas/recommendation-campaigns-BaseRecommendationsCampaignParameters"
                - type: object
                  properties:
                    personalizedBoostingStrength:
                      $ref: "#/components/schemas/recommendation-campaigns-PersonalizedBoostingStrength"
        - $ref: "#/components/schemas/recommendation-campaigns-BaseRecommendationCampaignsCreateRequestV2"
    recommendation-campaigns-SetComplementRecommendationCampaignsCreateRequestV2:
      title: Complementary
      allOf:
        - type: object
          required:
            - type
          properties:
            type:
              $ref: "#/components/schemas/recommendation-campaigns-CampaignTypeComplementary"
            parameters:
              $ref: "#/components/schemas/recommendation-campaigns-SetComplementRecommendationsCampaignParameters"
        - $ref: "#/components/schemas/recommendation-campaigns-BaseRecommendationCampaignsCreateRequestV2"
    recommendation-campaigns-CrossSellRecommendationCampaignsCreateRequestV2:
      title: Cross-sell
      allOf:
        - type: object
          required:
            - type
          properties:
            type:
              $ref: "#/components/schemas/recommendation-campaigns-CampaignTypeCrossSell"
            parameters:
              allOf:
                - $ref: "#/components/schemas/recommendation-campaigns-WithMetricsRecommendationsCampaignParameters"
                - type: object
                  properties:
                    personalizedBoostingStrength:
                      $ref: "#/components/schemas/recommendation-campaigns-PersonalizedBoostingStrength"
        - $ref: "#/components/schemas/recommendation-campaigns-BaseRecommendationCampaignsCreateRequestV2"
    recommendation-campaigns-MetricsRecommendationCampaignsCreateRequestV2:
      title: Top items
      allOf:
        - type: object
          required:
            - type
          properties:
            type:
              $ref: "#/components/schemas/recommendation-campaigns-CampaignTypeMetrics"
            parameters:
              $ref: "#/components/schemas/recommendation-campaigns-MetricsRecommendationsCampaignParameters"
        - $ref: "#/components/schemas/recommendation-campaigns-BaseRecommendationCampaignsCreateRequestV2"
    recommendation-campaigns-SimilarRecommendationCampaignsCreateRequestV2:
      title: Similar
      allOf:
        - type: object
          required:
            - type
          properties:
            type:
              $ref: "#/components/schemas/recommendation-campaigns-CampaignTypeSimilar"
            parameters:
              allOf:
                - $ref: "#/components/schemas/recommendation-campaigns-WithMetricsRecommendationsCampaignParameters"
                - type: object
                  properties:
                    personalizedBoostingStrength:
                      $ref: "#/components/schemas/recommendation-campaigns-PersonalizedBoostingStrength"
        - $ref: "#/components/schemas/recommendation-campaigns-BaseRecommendationCampaignsCreateRequestV2"
    recommendation-campaigns-RecommendationCampaignUpdateRequest:
      oneOf:
        - $ref: "#/components/schemas/recommendation-campaigns-RecommendationCampaignDefinitionV2"
        - $ref: "#/components/schemas/recommendation-campaigns-RecommendationCampaignUpdateFromAnotherCampaign"
    recommendation-campaigns-RecommendationCampaignUpdateFromAnotherCampaign:
      title: Copy from another campaign
      type: object
      properties:
        copyConfigurationFrom:
          type: string
          description: |
            Source campaign ID.

            When you copy from another campaign:
            - the following campaign data is NOT updated:
              - `title`
              - `state`
              - `start_date`
              - `end_date`
              - `campaignId`
              - `createdAt`
            - `modified_by_user_id` changes to the user who performed the update
      required:
        - copyConfigurationFrom
    recommendation-campaigns-RecommendationStateChangeResponseV2:
      type: array
      description: Array of updated campaigns IDs.
      items:
        type: string
    recommendation-campaigns-RecommendationStateChangeRequestV2:
      type: object
      properties:
        state:
          $ref: "#/components/schemas/recommendation-campaigns-State"
        ids:
          type: array
          minItems: 1
          maxItems: 10
          description: An array of campaign IDs.
          items:
            type: string
      required:
        - state
        - ids
    recommendation-campaigns-SimpleRecommendationCampaignsV2:
      type: array
      items:
        type: object
        properties:
          campaignId:
            type: string
            description: Campaign ID
          title:
            type: string
            description: Campaign title
          type:
            type: string
            description: Campaign type
    recommendations-api-materializer-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
    recommendations-api-materializer-RecommendationResponseSchemaV2-materializer:
      type: object
      properties:
        data:
          type: array
          description: Recommended items
          items:
            type: object
            properties:
              itemId:
                type: string
                description: Item identifier
            required:
              - itemId
        extras:
          type: object
          description: Additional data
          properties:
            correlationId:
              type: string
              description: Correlation identifier of a recommendation request
            contextItems:
              type: array
              description: A list of context items provided in request
              items:
                type: object
                properties:
                  itemId:
                    type: string
                    description: Item identifier (`itemId` in item catalog)
                additionalProperties: {}
                required:
                  - itemId
            slots:
              type: array
              description: A list of slots data
              items:
                type: object
                properties:
                  id:
                    type: integer
                    description: Slot identifier. Matches the index (zero-based numbering) of the slot provided in request
                  name:
                    type: string
                    description: Slot name provided in request
                  itemIds:
                    type: array
                    description: A list of item ids that meet the slot criteria
                    items:
                      type: string
                      description: Item identifier (`itemId` in item catalog)
                  error:
                    $ref: "#/components/schemas/recommendations-api-materializer-SlotError"
                required:
                  - id
                  - itemIds
          required:
            - correlationId
            - slots
    recommendations-api-materializer-SlotError:
      type: object
      description: Error details, if applicable
      properties:
        status:
          type: integer
          description: Status code
        error:
          type: string
          description: Summary of the error
        message:
          type: string
          description: Description of the problem
      required:
        - status
        - error
        - message
    recommendations-api-materializer-PostRecommendationsRequest:
      allOf:
        - type: object
          properties:
            clientUUID:
              type: string
              description: |
                Profile UUID. This parameter is required for these recommendation types:
                  - Personalized
                  - Last seen
                  - Recent interactions
                  - Section
                  - Attribute

                This parameter can be passed in all recommendations. In recommendations which don't require the customer context, it can still be used to create filters.
            campaignId:
              type: string
              description: Recommendation campaign ID for establishing the context
            slug:
              type: string
              description: Recommendation campaign slug for establishing the context
        - $ref: "#/components/schemas/recommendations-api-materializer-BasePostRecommendationsRequest"
    recommendations-api-materializer-BasePostRecommendationsRequest:
      type: object
      properties:
        items:
          type: array
          description: |
            An array of item identifiers (`itemId` in the item feed) for the context. This could be, for example, the current basket, or the item that is currently being viewed.  

            This overrides the `itemsSource` settings of the campaign definition.

            This parameter can be passed in all recommendations. In recommendations which don't use the context item as part of the recommendation model, the context item can only be used to create filters.

            Alternatively, you can use the `itemsSource` object to get item IDs from an aggregate or expression. `items` and `itemsSource` can't be used at the same time.
          items:
            type: string
            description: "`itemId` from the item feed"
        itemsSource:
          type: object
          description: |
            Source of the Item ID or item IDs for the recommendation context.

            This overrides the `itemsSource` settings of the campaign definition.

            This parameter can be passed in all recommendations. In recommendations which don't use the context item as part of the recommendation model, the context item can only be used to create filters.

            The item ID source (aggregate or expression) should return a string or an array of strings. If it returns numerical values, the recommendations engine attempts to convert them into strings while processing the request.

            Alternatively, you can pass the `itemId` parameter to define context items directly. Only one of these options is allowed at the same time.
          properties:
            type:
              $ref: "#/components/schemas/recommendations-api-materializer-RecommendationRequestItemsSourceType"
            id:
              $ref: "#/components/schemas/recommendations-api-materializer-RecommendationRequestItemsSourceId"
        itemsExcluded:
          type: array
          minItems: 0
          description: Items (identified by `itemId` in the item feed) that will be excluded from the generated recommendations. For example, items already added to the basket.
          items:
            type: string
            description: Items (identified by `itemId` in the item feed) that will be excluded from the generated recommendations. For example, items already added to the basket.
        additionalFilters:
          type: string
          description: |
            <hr>
            <strong>IMPORTANT</strong>:

            - The `filtersJoiner` attribute is REQUIRED when `additionalFilters` is included. If `filtersJoiner` is missing, the additional filters do not work.  
            - Do NOT send multiple instances of this parameter.

            <hr>

            Additional filters. These are merged with the campaign's own filters according to the logic in `filtersJoiner`.

            This parameter must include all the additional filters as a single string, for example `additionalFilters=effectivePrice>300 AND effectivePrice<400` (the spaces are required).
          example: effectivePrice>300 AND effectivePrice<400
        filtersJoiner:
          type: string
          enum:
            - AND
            - OR
            - REPLACE
          description: |
            Defines the logic of merging `additionalFilters` with the campaign's existing filters.
            - `REPLACE` replaces the campaign's filters with your filters.
            - `AND` matches if both your filters and the campaign filters are met.
            - `OR` matches if at least one of the filters is met.
        additionalElasticFilters:
          type: string
          description: |
            <hr>
            <strong>IMPORTANT</strong>:

            - The `elasticFiltersJoiner` attribute is REQUIRED when `additionalElasticFilters` is included. If `elasticFiltersJoiner` is missing, the additional filters do not work.  
            - Do NOT send multiple instances of this parameter.

            <hr>

            Additional elastic filters. These are merged with the campaign's own elastic filters according to the logic in `elasticFiltersJoiner`.

            This parameter must include all the additional filters as a single string, for example `additionalElasticFilters=effectivePrice>300 AND effectivePrice<400` (the spaces are required).
          example: effectivePrice>300 AND effectivePrice<400
        elasticFiltersJoiner:
          type: string
          enum:
            - AND
            - OR
            - REPLACE
          description: |
            Defines the logic of merging `additionalElasticFilters` with the campaign's existing elastic filters.
            - `REPLACE` replaces the campaign's filters with your filters.
            - `AND` matches if both your filters and the campaign filters are met.
            - `OR` matches if at least one of the filters is met.
        displayAttributes:
          type: array
          minItems: 0
          items:
            type: string
          description: An array of item attributes which value will be returned in a recommendation response. The array will be merged together with the configuration of the recommendation.
        includeContextItems:
          type: boolean
          description: When true, the recommendation response will include context items metadata.
        recommendedItemsFromExternalModel:
          type: array
          minItems: 0
          items:
            type: array
            items:
              type: string
          description: |
            Items provided by an external recommendation model to be returned as recommendation results.

            This parameter is used with campaigns of type "external-items".
        inventoryContext:
          $ref: "#/components/schemas/recommendations-api-materializer-InventoryContext"
        params:
          $ref: "#/components/schemas/recommendations-api-materializer-ParamsMaterializer"
    recommendations-api-materializer-ParamsMaterializer:
      type: object
      example:
        source: mobile
      description: Extra parameters that will be added to the `recommendation.generated` event. The total size must not exceed 500 bytes.
      additionalProperties: true
    recommendations-api-materializer-InventoryContext:
      description: |
        Inventory context used to evaluate inventory-related filters and boosting strategies.
        Can be either a single inventory context or
        a multi-inventory context (set of channel IDs per inventory).
      oneOf:
        - $ref: "#/components/schemas/recommendations-api-materializer-SingleInventoryContext"
        - $ref: "#/components/schemas/recommendations-api-materializer-MultiInventoryContext"
    recommendations-api-materializer-MultiInventoryContext:
      type: object
      description: |
        Multi-inventory context where each inventory can have its own set of channel IDs.
      properties:
        inventoryCatalogs:
          type: object
          additionalProperties:
            $ref: "#/components/schemas/recommendations-api-materializer-InventoryContextDefinition"
          description: |
            Map of inventory ID to inventory context definition. Each inventory can have its own set of channel IDs.
      required:
        - inventoryCatalogs
    recommendations-api-materializer-InventoryContextDefinition:
      type: object
      description: |
        Context definition for a specific inventory.
      properties:
        channelIds:
          type: array
          items:
            type: string
          description: |
            List of channel identifiers for this specific inventory.
    recommendations-api-materializer-SingleInventoryContext:
      type: object
      description: |
        Single inventory context.
      properties:
        channelIds:
          type: array
          items:
            type: string
          description: |
            List of channel identifiers used to evaluate inventory-related filters and boosting strategies.
      required:
        - channelIds
    recommendations-api-materializer-RecommendationRequestItemsSourceId:
      type: string
      description: ID of the items' source (aggregate or expression)
    recommendations-api-materializer-RecommendationRequestItemsSourceType:
      type: string
      enum:
        - aggregate
        - expression
      description: Type of the items' source.
    recommendations-api-materializer-PostRecommendationsWithIdentifierValueRequest:
      allOf:
        - type: object
          required:
            - identifierValue
          properties:
            identifierValue:
              type: string
              description: Value of the identifier selected in the path attributes
        - $ref: "#/components/schemas/recommendations-api-materializer-BasePostRecommendationsRequest"
    recommendations-api-materializer-PreviewAttributeRecommendationCampaignsCreateRequest:
      title: Attribute
      allOf:
        - type: object
          required:
            - type
          properties:
            type:
              $ref: "#/components/schemas/recommendations-api-materializer-CampaignTypeAttribute"
            parameters:
              $ref: "#/components/schemas/recommendations-api-materializer-AttributeRecommendationsCampaignParameters"
        - $ref: "#/components/schemas/recommendations-api-materializer-BaseRecommendationCampaignsPreviewRequest"
    recommendations-api-materializer-BaseRecommendationCampaignsPreviewRequest:
      type: object
      properties:
        title:
          $ref: "#/components/schemas/recommendations-api-materializer-CampaignTitle"
        campaignId:
          $ref: "#/components/schemas/recommendations-api-materializer-CampaignId"
        filterRules:
          $ref: "#/components/schemas/recommendations-api-materializer-RecommendationsCampaignFilterRules"
        itemsCatalogId:
          $ref: "#/components/schemas/recommendations-api-materializer-ItemsCatalogId"
        slots:
          $ref: "#/components/schemas/recommendations-api-materializer-Slots"
        keepSlotsOrder:
          $ref: "#/components/schemas/recommendations-api-materializer-KeepSlotsOrder"
        personalizeSlotsOrder:
          $ref: "#/components/schemas/recommendations-api-materializer-PersonalizeSlotsOrder"
        boostingStrategies:
          $ref: "#/components/schemas/recommendations-api-materializer-BoostingStrategies"
        itemsSource:
          $ref: "#/components/schemas/recommendations-api-materializer-ItemsSource"
      required:
        - type
        - itemsCatalogId
        - slots
    recommendations-api-materializer-ItemsSource:
      type: object
      description: |
        The source of item ID or IDs for the recommendation context. This parameter can be passed in all recommendations. In recommendations which don't use item context as part of the recommendation model, the context item can be used only to create filters.

        The item ID source (aggregate or expression) should return a string or an array of strings. If it returns numerical values, the recommendations engine attempts to convert them into strings while processing the request.

        Alternatively, you can pass the `itemId` or `itemsSource` parameter when making a request to generate a recommendation from this campaign. The parameter overrides the settings defined here.
      properties:
        type:
          type: string
          enum:
            - aggregate
            - expression
          description: |
            Type of the source of item ID or IDs for the recommendation context. 

            If the items' source type is 'aggregate', the aggregate result will be used as context items. If the items' source type is 'expression', the expression result will be used as context items.
        id:
          type: string
          description: |
            ID of the items' source for the recommendation context. If the source's type is 'aggregate', this is the aggregate's ID. If the source's type is 'expression', this is the expression's ID.
    recommendations-api-materializer-BoostingStrategies:
      type: array
      description: Recommendation boosting strategies
      items:
        $ref: "#/components/schemas/recommendations-api-materializer-BoostingStrategy"
    recommendations-api-materializer-BoostingStrategy:
      type: object
      description: Boosting strategy allows you to promote or demote specific types of products in recommendation scoring
      properties:
        name:
          type: string
          description: Boosting strategy name
        condition:
          type: string
          description: The condition that indicates on which items the boost will be performed. The condition must comply with the rules of creating filters.
        strength:
          type: number
          description: How much influence the strategy has. Values less than 1.0 allow you to degrade items that meet the condition, values greater than 1.0 allow you to promote items that meet the condition. A strength with a value of 1.0 does not change the scoring.
          format: float
          minimum: 0
          maximum: 2
          default: 1
      required:
        - name
        - condition
        - strength
    recommendations-api-materializer-PersonalizeSlotsOrder:
      type: boolean
      default: false
      description: |
        Sort the slots by average personalized slot score. This parameter applies only to personalized and attribute recommendation campaigns.

        If you want to set `personalizeSlotsOrder` to `true`, `keepSlotsOrder` must also be `true`.
    recommendations-api-materializer-KeepSlotsOrder:
      type: boolean
      default: true
      description: |
        - When `true`, the `data` array in the response is sorted according to slots. Within each slot, the items are sorted by their score (default) or metric (if selected). For example, if you have 3 slots of 2 items each, the first 2 items in `data` are from the first slot, the second 2 are from the second slot, and the last 2 are from the third slot.
        - When `false`, the `data` array in the response is sorted only according to score (default) or metric (if selected). Slots have no effect.

        The additional `extras.slots` object always shows slots and items as if this setting was `true`.

        If you want to set `personalizeSlotsOrder` to `true`, `keepSlotsOrder` must also be `true`.
    recommendations-api-materializer-Slots:
      type: array
      minLength: 1
      description: Recommendation slots. Must contain at least one slot with a non-empty `name`.
      items:
        $ref: "#/components/schemas/recommendations-api-materializer-Slot"
    recommendations-api-materializer-Slot:
      type: object
      description: Slot allows you to define a separate recommendation frame with its filters and other parameters
      properties:
        name:
          $ref: "#/components/schemas/recommendations-api-materializer-SlotName"
        itemMin:
          $ref: "#/components/schemas/recommendations-api-materializer-ItemMin"
        itemMax:
          $ref: "#/components/schemas/recommendations-api-materializer-ItemMax"
        filterRules:
          $ref: "#/components/schemas/recommendations-api-materializer-RecommendationsCampaignSlotFilterRules"
        distinctFilter:
          $ref: "#/components/schemas/recommendations-api-materializer-DistinctFilter"
        attribute:
          type: object
          description: The attribute for rows grouping in the section and attribute recommendation campaign.
          properties:
            name:
              description: Name of attribute for rows grouping.
              type: string
            levelRangeModifier:
              description: Restricts the range of products in recommendations to a particular attribute level.
              type: integer
        numRows:
          type: integer
          description: The number of rows in the section recommendation campaign.
        numItems:
          type: integer
          description: The number of products in each row in the section recommendation campaign.
      required:
        - name
    recommendations-api-materializer-DistinctFilter:
      type: object
      description: Distinct filter allows to specify how many recommended items can have the same value of specified attributes.
      properties:
        elastic:
          type: boolean
          description: It allows to complete the recommended items with items which don't meet the distinct filter criteria.
        filters:
          type: array
          minItems: 1
          maxItems: 5
          description: Array of distinct filters
          items:
            type: object
            properties:
              field:
                type: string
                description: Attribute name
              maxNumItems:
                type: number
                format: integer
                description: Max number of items with the same value of the attribute
              levelRangeModifier:
                type: number
                format: integer
                description: Parameter used (for the `category` field) to specify how many categories to cut off from the end
            required:
              - field
              - maxNumItems
      required:
        - elastic
        - filters
    recommendations-api-materializer-RecommendationsCampaignSlotFilterRules:
      type: object
      description: Filters that apply to this campaign
      properties:
        filters:
          type: string
          description: Filtering string
        elasticFilters:
          type: string
          description: Filtering string for Elastic filter
    recommendations-api-materializer-ItemMax:
      type: integer
      description: The maximal number of items in the campaign or the maximal number of attribute values in the attribute recommendation campaign.
    recommendations-api-materializer-ItemMin:
      type: integer
      description: The minimal number of items in the campaign or the minimal number of attribute values in the attribute recommendation campaign.
    recommendations-api-materializer-SlotName:
      type: string
      description: Slot name
    recommendations-api-materializer-ItemsCatalogId:
      type: string
      description: Only items from this catalog will be recommended.
    recommendations-api-materializer-RecommendationsCampaignFilterRules:
      type: object
      description: Filters that apply to this campaign. If the filters contain an attribute used in the default filters of the recommendation model ([**Settings > AI Configuration**](https://help.synerise.com/docs/settings/configuration/ai-engine-configuration/engine-configuration-for-recommendations/#selecting-recommendation-types-and-default-filters)), that default filter is ignored.
      properties:
        excludePurchasedItems:
          type: boolean
          description: When true, the recommendation results will include only items that the profile hasn't purchased before.
        excludePurchasedItemsSinceDays:
          type: number
          format: integer
          description: Limits the application of the `excludePurchasedItems` filter to a specified number of days.
        elasticExcludePurchasedItems:
          type: boolean
          description: This is a setting for Elastic filters.<br>When true, the recommendation results will include only items that the profile hasn't purchased before.
        elasticExcludePurchasedItemsSinceDays:
          type: number
          format: integer
          description: This is a setting for Elastic filters.<br>Limits the application of the `elasticExcludePurchasedItemsSinceDays` filter to a specified number of days.
    recommendations-api-materializer-CampaignId:
      type: string
      description: ID of the campaign used in the preview.
      default: preview
    recommendations-api-materializer-CampaignTitle:
      type: string
      description: Title of the campaign used in the preview.
      default: preview
    recommendations-api-materializer-AttributeRecommendationsCampaignParameters:
      allOf:
        - $ref: "#/components/schemas/recommendations-api-materializer-BaseRecommendationsCampaignParameters"
        - type: object
          properties:
            metadataCatalogId:
              type: string
              description: The id of catalog containing attributes metadata.
    recommendations-api-materializer-BaseRecommendationsCampaignParameters:
      type: object
      description: Parameters that apply to this campaign
      properties:
        additionalResponseAttributes:
          type: array
          items:
            type: string
          description: An array of additional response attributes.
    recommendations-api-materializer-CampaignTypeAttribute:
      type: string
      description: Campaign type
      enum:
        - attribute
    recommendations-api-materializer-PreviewSectionRecommendationCampaignsCreateRequest:
      title: Section
      allOf:
        - type: object
          required:
            - type
          properties:
            type:
              $ref: "#/components/schemas/recommendations-api-materializer-CampaignTypeSection"
            parameters:
              $ref: "#/components/schemas/recommendations-api-materializer-SectionRecommendationsCampaignParameters"
        - $ref: "#/components/schemas/recommendations-api-materializer-BaseRecommendationCampaignsPreviewRequest"
    recommendations-api-materializer-SectionRecommendationsCampaignParameters:
      allOf:
        - $ref: "#/components/schemas/recommendations-api-materializer-BaseRecommendationsCampaignParameters"
        - type: object
          properties:
            metadataCatalogId:
              type: string
    recommendations-api-materializer-CampaignTypeSection:
      type: string
      description: Campaign type
      enum:
        - section
    recommendations-api-materializer-PreviewRecentInteractionsRecommendationCampaignsCreateRequest:
      title: Recent interactions
      allOf:
        - type: object
          required:
            - type
          properties:
            type:
              $ref: "#/components/schemas/recommendations-api-materializer-CampaignTypeRecentInteractions"
            parameters:
              $ref: "#/components/schemas/recommendations-api-materializer-RecentInteractionsRecommendationsCampaignParameters"
        - $ref: "#/components/schemas/recommendations-api-materializer-BaseRecommendationCampaignsPreviewRequest"
    recommendations-api-materializer-RecentInteractionsRecommendationsCampaignParameters:
      allOf:
        - $ref: "#/components/schemas/recommendations-api-materializer-BaseRecommendationsCampaignParameters"
        - type: object
          properties:
            aggregateId:
              type: string
              description: Id of the aggregate which provides events as a base of recommendations.
            personalizedBoostingStrength:
              $ref: "#/components/schemas/recommendations-api-materializer-PersonalizedBoostingStrength"
    recommendations-api-materializer-PersonalizedBoostingStrength:
      type: number
      description: How much influence the personalized scoring has. Greater values allow you to promote items that have high personalized score. A strength with a value of 0 does not change the scoring.
      format: float
      minimum: 0
      maximum: 100
      default: 0
    recommendations-api-materializer-CampaignTypeRecentInteractions:
      type: string
      description: Campaign type
      enum:
        - recent-interactions
    recommendations-api-materializer-PreviewItemComparisonRecommendationCampaignsCreateRequest:
      title: Comparison
      allOf:
        - type: object
          required:
            - type
          properties:
            type:
              $ref: "#/components/schemas/recommendations-api-materializer-CampaignTypeItemComparison"
            parameters:
              allOf:
                - $ref: "#/components/schemas/recommendations-api-materializer-WithMetricsRecommendationsCampaignParameters"
                - type: object
                  properties:
                    personalizedBoostingStrength:
                      $ref: "#/components/schemas/recommendations-api-materializer-PersonalizedBoostingStrength"
        - $ref: "#/components/schemas/recommendations-api-materializer-BaseRecommendationCampaignsPreviewRequest"
    recommendations-api-materializer-WithMetricsRecommendationsCampaignParameters:
      allOf:
        - $ref: "#/components/schemas/recommendations-api-materializer-BaseRecommendationsCampaignParameters"
        - type: object
          properties:
            boostMetric:
              type: string
              description: ID of the metric to boost the results by. Metric scores will be combined with recommendation scores, favoring the best-performing results.
            sortMetric:
              type: string
              description: ID of the metric to sort the results by.
            boostMetricStrength:
              type: number
              description: How much influence the `boostMetric` has. Values less than 0 allow you to demote items that have high metric score, values greater than 0 allow you to promote items that have high metric score. A strength with a value of 0 does not change the scoring.
              format: float
              minimum: -100
              maximum: 100
            shuffleNumItems:
              $ref: "#/components/schemas/recommendations-api-materializer-ShuffleNumItems"
    recommendations-api-materializer-ShuffleNumItems:
      type: integer
      description: When this parameter is provided, this many best item recommendations are provided. A number of them, no more than the value of `itemMax`, are chosen randomly for recommendation.
    recommendations-api-materializer-CampaignTypeItemComparison:
      type: string
      description: Campaign type
      enum:
        - item-comparison
    recommendations-api-materializer-PreviewVisuallySimilarRecommendationCampaignsCreateRequest:
      title: Visually similar
      allOf:
        - type: object
          required:
            - type
          properties:
            type:
              $ref: "#/components/schemas/recommendations-api-materializer-CampaignTypeVisuallySimilar"
            parameters:
              allOf:
                - $ref: "#/components/schemas/recommendations-api-materializer-WithMetricsRecommendationsCampaignParameters"
                - type: object
                  properties:
                    personalizedBoostingStrength:
                      $ref: "#/components/schemas/recommendations-api-materializer-PersonalizedBoostingStrength"
        - $ref: "#/components/schemas/recommendations-api-materializer-BaseRecommendationCampaignsPreviewRequest"
    recommendations-api-materializer-CampaignTypeVisuallySimilar:
      type: string
      description: Campaign type
      enum:
        - visually-similar
    recommendations-api-materializer-PreviewPersonalizedRecommendationCampaignsCreateRequest:
      title: Personalized
      allOf:
        - type: object
          required:
            - type
          properties:
            type:
              $ref: "#/components/schemas/recommendations-api-materializer-CampaignTypePersonalized"
            parameters:
              $ref: "#/components/schemas/recommendations-api-materializer-BaseRecommendationsCampaignParameters"
        - $ref: "#/components/schemas/recommendations-api-materializer-BaseRecommendationCampaignsPreviewRequest"
    recommendations-api-materializer-CampaignTypePersonalized:
      type: string
      description: Campaign type
      enum:
        - personalized
    recommendations-api-materializer-PreviewLastViewedRecommendationCampaignsCreateRequest:
      title: Last viewed
      allOf:
        - type: object
          required:
            - type
          properties:
            type:
              $ref: "#/components/schemas/recommendations-api-materializer-CampaignTypeLastViewed"
            parameters:
              allOf:
                - $ref: "#/components/schemas/recommendations-api-materializer-BaseRecommendationsCampaignParameters"
                - type: object
                  properties:
                    personalizedBoostingStrength:
                      $ref: "#/components/schemas/recommendations-api-materializer-PersonalizedBoostingStrength"
        - $ref: "#/components/schemas/recommendations-api-materializer-BaseRecommendationCampaignsPreviewRequest"
    recommendations-api-materializer-CampaignTypeLastViewed:
      type: string
      description: Campaign type
      enum:
        - last-viewed
    recommendations-api-materializer-PreviewSetComplementRecommendationCampaignsCreateRequest:
      title: Complementary
      allOf:
        - type: object
          required:
            - type
          properties:
            type:
              $ref: "#/components/schemas/recommendations-api-materializer-CampaignTypeComplementary"
            parameters:
              $ref: "#/components/schemas/recommendations-api-materializer-SetComplementRecommendationsCampaignParameters"
        - $ref: "#/components/schemas/recommendations-api-materializer-BaseRecommendationCampaignsPreviewRequest"
    recommendations-api-materializer-SetComplementRecommendationsCampaignParameters:
      allOf:
        - $ref: "#/components/schemas/recommendations-api-materializer-BaseRecommendationsCampaignParameters"
        - type: object
          properties:
            itemSimilarity:
              type: integer
              minimum: 0
              maximum: 5
              description: Similarity between items in the cart and the recommended items. Higher values decrease the similarity.
            recommendationVariety:
              type: number
              format: float
              minimum: 0
              maximum: 0.9
              description: Similarity between recommended items - higher values will result in more variety within the recommended item set.
            personalizedBoostingStrength:
              $ref: "#/components/schemas/recommendations-api-materializer-PersonalizedBoostingStrength"
    recommendations-api-materializer-CampaignTypeComplementary:
      type: string
      description: Campaign type
      enum:
        - set-complement
    recommendations-api-materializer-PreviewCrossSellRecommendationCampaignsCreateRequest:
      title: Cross-sell
      allOf:
        - type: object
          required:
            - type
          properties:
            type:
              $ref: "#/components/schemas/recommendations-api-materializer-CampaignTypeCrossSell"
            parameters:
              allOf:
                - $ref: "#/components/schemas/recommendations-api-materializer-WithMetricsRecommendationsCampaignParameters"
                - type: object
                  properties:
                    personalizedBoostingStrength:
                      $ref: "#/components/schemas/recommendations-api-materializer-PersonalizedBoostingStrength"
        - $ref: "#/components/schemas/recommendations-api-materializer-BaseRecommendationCampaignsPreviewRequest"
    recommendations-api-materializer-CampaignTypeCrossSell:
      type: string
      description: Campaign type
      enum:
        - cross-sell
    recommendations-api-materializer-PreviewMetricsRecommendationCampaignsCreateRequest:
      title: Top items
      allOf:
        - type: object
          required:
            - type
          properties:
            type:
              $ref: "#/components/schemas/recommendations-api-materializer-CampaignTypeMetrics"
            parameters:
              $ref: "#/components/schemas/recommendations-api-materializer-MetricsRecommendationsCampaignParameters"
        - $ref: "#/components/schemas/recommendations-api-materializer-BaseRecommendationCampaignsPreviewRequest"
    recommendations-api-materializer-MetricsRecommendationsCampaignParameters:
      allOf:
        - $ref: "#/components/schemas/recommendations-api-materializer-WithMetricsRecommendationsCampaignParameters"
        - type: object
          properties:
            personalizedBoostingStrength:
              $ref: "#/components/schemas/recommendations-api-materializer-PersonalizedBoostingStrength"
          required:
            - sortMetric
    recommendations-api-materializer-CampaignTypeMetrics:
      type: string
      description: Campaign type
      enum:
        - metrics
    recommendations-api-materializer-PreviewSimilarRecommendationCampaignsCreateRequest:
      title: Similar
      allOf:
        - type: object
          required:
            - type
          properties:
            type:
              $ref: "#/components/schemas/recommendations-api-materializer-CampaignTypeSimilar"
            parameters:
              allOf:
                - $ref: "#/components/schemas/recommendations-api-materializer-WithMetricsRecommendationsCampaignParameters"
                - type: object
                  properties:
                    personalizedBoostingStrength:
                      $ref: "#/components/schemas/recommendations-api-materializer-PersonalizedBoostingStrength"
        - $ref: "#/components/schemas/recommendations-api-materializer-BaseRecommendationCampaignsPreviewRequest"
    recommendations-api-materializer-CampaignTypeSimilar:
      type: string
      description: Campaign type
      enum:
        - similar
    recommendations-api-materializer-PreviewRecommendationContext:
      type: object
      properties:
        clientUUID:
          $ref: "#/components/schemas/recommendations-api-materializer-ClientUUID"
        items:
          $ref: "#/components/schemas/recommendations-api-materializer-Items"
        includeContextItems:
          $ref: "#/components/schemas/recommendations-api-materializer-IncludeContextItems"
        params:
          $ref: "#/components/schemas/recommendations-api-materializer-ParamsReco"
        inventoryContext:
          $ref: "#/components/schemas/recommendations-api-materializer-InventoryContext"
    recommendations-api-materializer-ParamsReco:
      type: object
      example:
        source: mobile
      description: Extra parameters that will be added to the `recommendation.generated` event. The total size must not exceed 500 bytes.
    recommendations-api-materializer-IncludeContextItems:
      type: boolean
      default: false
      description: The recommendation results will include context items from the request.
    recommendations-api-materializer-Items:
      type: array
      description: "A list of itemIds for building the context. Alternatively, you can use the `itemsSource` parameter to provide the context. Item context is required by these recommendation types: `similar`, `cross-sell`, `set-complement`, `visually-similar`, `item-comparison`. In other recommendation types, the item context is optional, but may be used by the model when scoring items."
      items:
        $ref: "#/components/schemas/recommendations-api-materializer-Item"
    recommendations-api-materializer-Item:
      type: string
      description: ID of an entity in the item feed
    recommendations-api-materializer-ClientUUID:
      description: UUID of the client
      type: string
      format: uuid
    recommendations-rust-all-Error:
      type: object
      description: Details of an error, if applicable
      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
    recommendations-rust-all-RecommendationResponseSchemaV2:
      type: object
      properties:
        extras:
          type: object
          description: Additional data
          properties:
            correlationId:
              type: string
              description: Correlation ID that allows you to link the "item clicked" events with the "recommendation generated" event that's created for each recommendation result.
            contextItems:
              type: array
              nullable: true
              description: A list of context items provided in the request
              items:
                type: object
                properties:
                  itemId:
                    type: string
                    description: Item identifier (`itemId` in item catalog)
                additionalProperties: true
                required:
                  - itemId
            campaignId:
              type: string
              description: ID of the context campaign
              nullable: true
        data:
          type: array
          description: A list of recommended items
          items:
            type: object
            properties:
              itemId:
                type: string
                description: Item identifier (`itemId` in item catalog)
            additionalProperties: {}
            required:
              - itemId
    recommendations-rust-all-SlotsRecommendationResponseSchemaV2:
      allOf:
        - $ref: "#/components/schemas/recommendations-rust-all-RecommendationResponseSchemaV2"
        - type: object
          properties:
            extras:
              type: object
              properties:
                slots:
                  type: array
                  description: A list of slots data
                  items:
                    type: object
                    properties:
                      id:
                        type: integer
                        description: Slot identifier. Matches the index (zero-based numbering) of the slot provided in request
                      name:
                        type: string
                        description: Slot name provided in request
                      itemIds:
                        type: array
                        description: A list of item ids that meet the slot criteria
                        items:
                          type: string
                          description: Item identifier (`itemId` in item catalog)
                      error:
                        $ref: "#/components/schemas/recommendations-rust-all-Error"
                    required:
                      - id
              required:
                - slots
    recommendations-rust-all-SlotsBodySchemaV2:
      allOf:
        - $ref: "#/components/schemas/recommendations-rust-all-BaseBodySchemaV2"
        - type: object
          properties:
            keepSlotsOrder:
              type: boolean
              default: true
              description: |
                - When `true`, the `data` array in the response is sorted according to slots. Within each slot, the items are sorted by their score (default) or metric (if selected). For example, if you have 3 slots of 2 items each, the first 2 items in `data` are from the first slot, the second 2 are from the second slot, and the last 2 are from the third slot.
                - When `false`, the `data` array in the response is sorted only according to score (default) or metric (if selected). Slots have no effect.

                The additional `extras.slots` object always shows slots and items as if this setting was `true`.

                If you want to set `personalizeSlotsOrder` to `true`, `keepSlotsOrder` must also be `true`.
            personalizeSlotsOrder:
              type: boolean
              default: false
              description: |
                Sort the slots by average personalized slot score. This parameter applies only to personalized and attribute recommendation campaigns.

                If you want to set `personalizeSlotsOrder` to `true`, `keepSlotsOrder` must also be `true`.
            sortMetric:
              type: string
              description: ID of the metric to sort the results by. The list of available metrics can be checked by using [this endpoint](https://developers.synerise.com/AnalyticsSuite/AnalyticsSuite.html#operation/ApiGetAvailableMetricsV2).
            boostingParameters:
              $ref: "#/components/schemas/recommendations-rust-all-BoostingParametersV2"
            boostingStrategies:
              type: array
              description: Boosting strategies
              items:
                $ref: "#/components/schemas/recommendations-rust-all-BoostingStrategyV2"
            crossWorkspaceMode:
              $ref: "#/components/schemas/recommendations-rust-all-CrossWorkspaceMode"
            slots:
              type: array
              description: Slot definitions. To apply default values and fetch all the results as a single slot, send `slots` as an array with one empty object.
              minItems: 1
              items:
                $ref: "#/components/schemas/recommendations-rust-all-SlotSchemaV2Rust"
          required:
            - slots
    recommendations-rust-all-SlotSchemaV2Rust:
      type: object
      properties:
        name:
          type: string
          description: Slot name
        minNumItems:
          $ref: "#/components/schemas/recommendations-rust-all-MinNumItems"
        maxNumItems:
          $ref: "#/components/schemas/recommendations-rust-all-MaxNumItems"
        shuffleNumItems:
          $ref: "#/components/schemas/recommendations-rust-all-ShuffleNumItemsRust"
        filters:
          $ref: "#/components/schemas/recommendations-rust-all-Filter"
        elasticFilters:
          $ref: "#/components/schemas/recommendations-rust-all-ElasticFilter"
        distinctFilter:
          $ref: "#/components/schemas/recommendations-rust-all-DistinctFilterReco"
    recommendations-rust-all-DistinctFilterReco:
      type: object
      description: Distinct filters allow you to specify how many recommended items can have the same value of specified attributes.
      properties:
        elastic:
          type: boolean
          description: When TRUE, allows to complete the recommended items with items which don't meet the distinct filter criteria.
        filters:
          type: array
          minItems: 1
          maxItems: 5
          description: Array of distinct filters
          items:
            type: object
            properties:
              field:
                type: string
                description: Attribute name
              maxNumItems:
                type: number
                format: integer
                description: Max number of items with the same value of the attribute
              levelRangeModifier:
                type: number
                format: integer
                description: Parameter used (for the `category` field) to specify how many categories to cut off from the end
            required:
              - field
              - maxNumItems
      required:
        - elastic
        - filters
    recommendations-rust-all-ElasticFilter:
      description: |
        This string defines the criteria that an item must meet in order to be considered for recommendation. The Elastic filter may be dropped if not enough products meet the required criteria.
        For information on building filters, see ["Items Query Language (IQL)" in the Developer Guide](https://hub.synerise.com/developers/iql/).
      type: string
    recommendations-rust-all-Filter:
      type: string
      description: |
        This string defines the criteria that an item must meet in order to be considered for recommendation.  
        For information on building filters, see ["Items Query Language (IQL)" in the Developer Guide](https://hub.synerise.com/developers/iql/).
    recommendations-rust-all-ShuffleNumItemsRust:
      type: integer
      description: When this parameter is provided, this many best item recommendations are provided. A number of them, no more than the value of `maxItemNums`, are chosen randomly for recommendation.
      minimum: 1
      maximum: 200
    recommendations-rust-all-MaxNumItems:
      type: integer
      description: The maximal number of returned item recommendations.
      maximum: 100
      default: 5
    recommendations-rust-all-MinNumItems:
      type: integer
      description: The minimal number of returned item recommendations. If the service is not able to return at least this many recommendations, it will return an error.
      default: 1
      minimum: 1
    recommendations-rust-all-CrossWorkspaceMode:
      type: object
      description: Specifies if recommendation should use cross-workspace mode and personalize recommendations with events from other members of workspace group if they are available.
      properties:
        enabled:
          type: boolean
          description: Defines if cross-workspace mode is enabled.
    recommendations-rust-all-BoostingStrategyV2:
      type: object
      description: Boosting strategy allows you to promote or demote specific types of products in recommendation scoring
      properties:
        name:
          type: string
          description: Boosting strategy name
        condition:
          type: string
          description: The condition that indicates on which items the boost will be performed. The condition must comply with the rules of creating filters.
        strength:
          type: number
          description: How much influence the strategy has. Values less than 1.0 allow you to demote items that meet the condition, values greater than 1.0 allow you to promote items that meet the condition. A strength with a value of 1.0 does not change the scoring.
          format: float
          minimum: 0
          maximum: 2
          default: 1
      required:
        - name
        - condition
        - strength
    recommendations-rust-all-BoostingParametersV2:
      type: object
      description: Result boosting parameters
      properties:
        metric:
          type: string
          description: ID of the metric to boost the results by. Metric scores will be combined with recommendation scores, favoring the best-performing results. The list of available metrics can be checked by using [this endpoint](https://developers.synerise.com/AnalyticsSuite/AnalyticsSuite.html#operation/ApiGetAvailableMetricsV2).
        strength:
          type: number
          description: How much influence the `boostMetric` has. Values less than 0 allow you to demote items that have high metric score, values greater than 0 allow you to promote items that have high metric score. A strength with a value of 0 does not change the scoring.
          format: float
        personalizedBoostingStrength:
          type: number
          description: How much influence the personalized scoring has. Greater values allow you to promote items that have high personalized score. A strength with a value of 0 does not change the scoring.
          format: float
          minimum: 0
          maximum: 100
          default: 0
    recommendations-rust-all-BaseBodySchemaV2:
      type: object
      properties:
        campaignId:
          type: string
          description: The campaignId which will be passed as *utm_campaign* in a link to the recommended item.
          default: defaultCampaign
        campaignName:
          type: string
          description: The campaign name which will be included in the recommendation.generated event.
        catalogId:
          type: string
          description: ID (_not_ name) of the item feed to use in the request. The requested recommendation type (model) must be ready for this item feed.
          default: default
        clientUUID:
          type: string
          description: |
            Profile UUID. This parameter is required for these recommendation types:
              - Personalized
              - Last seen
              - Recent interactions
              - Section
              - Attribute

            This parameter can be passed in all recommendations. In recommendations which don't require the customer context, it can still be used to create filters.
        contextItemIds:
          type: array
          description: Item identifiers, equal to `itemId` from the *item feed*. They can be used to define the item context of the query.
          items:
            type: string
            description: Item identifier (`itemId` in item catalog)
        includeContextItems:
          type: boolean
          default: false
          description: The recommendation results will include context items from the request.
        filterRules:
          $ref: "#/components/schemas/recommendations-rust-all-FilterRulesV2"
        displayAttributes:
          type: string
          description: Attributes to be returned
        abTestContext:
          $ref: "#/components/schemas/recommendations-rust-all-AbTestContext"
        params:
          $ref: "#/components/schemas/recommendations-rust-all-ParamsReco"
        inventoryContext:
          $ref: "#/components/schemas/recommendations-rust-all-InventoryContext"
    recommendations-rust-all-InventoryContext:
      description: |
        Inventory context used to evaluate inventory-related filters and boosting strategies.
        Can be either a single inventory context or
        a multi-inventory context (set of channel IDs per inventory).
      oneOf:
        - $ref: "#/components/schemas/recommendations-rust-all-SingleInventoryContext"
        - $ref: "#/components/schemas/recommendations-rust-all-MultiInventoryContext"
    recommendations-rust-all-MultiInventoryContext:
      type: object
      description: |
        Multi-inventory context where each inventory can have its own set of channel IDs.
      properties:
        inventoryCatalogs:
          type: object
          additionalProperties:
            $ref: "#/components/schemas/recommendations-rust-all-InventoryContextDefinition"
          description: |
            Map of inventory ID to inventory context definition. Each inventory can have its own set of channel IDs.
      required:
        - inventoryCatalogs
    recommendations-rust-all-InventoryContextDefinition:
      type: object
      description: |
        Context definition for a specific inventory.
      properties:
        channelIds:
          type: array
          items:
            type: string
          description: |
            List of channel identifiers for this specific inventory.
      required:
        - channelIds
    recommendations-rust-all-SingleInventoryContext:
      type: object
      description: |
        Single inventory context.
      properties:
        channelIds:
          type: array
          items:
            type: string
          description: |
            List of channel identifiers used to evaluate inventory-related filters and boosting strategies.
      required:
        - channelIds
    recommendations-rust-all-ParamsReco:
      type: object
      example:
        source: mobile
      description: Extra parameters that will be added to the `recommendation.generated` event. The total size must not exceed 500 bytes.
    recommendations-rust-all-AbTestContext:
      type: object
      description: A/B test context.
      properties:
        experimentId:
          type: integer
          description: Experiment ID which will be included in the `recommendation.generated` event.
        variantId:
          type: string
          description: Campaign variant ID which will be included in the `recommendation.generated` event.
        requestedCampaignId:
          type: string
          description: Requested campaign ID which will be included in the `recommendation.generated` event.
    recommendations-rust-all-FilterRulesV2:
      type: object
      description: Filter configuration
      properties:
        excludePurchasedItems:
          $ref: "#/components/schemas/recommendations-rust-all-ExcludePurchasedItems"
        excludePurchasedItemsSinceDays:
          $ref: "#/components/schemas/recommendations-rust-all-ExcludePurchasedItemsSince"
        elasticExcludePurchasedItems:
          $ref: "#/components/schemas/recommendations-rust-all-ExcludePurchasedItems"
        elasticExcludePurchasedItemsSinceDays:
          $ref: "#/components/schemas/recommendations-rust-all-ExcludePurchasedItemsSince"
    recommendations-rust-all-ExcludePurchasedItemsSince:
      description: Limits the application of the `excludePurchasedItems` filter to a specified number of days.
      type: integer
    recommendations-rust-all-ExcludePurchasedItems:
      description: |
        When true, the recommendation results will include only items that the Profile hasn't purchased before.  
        **IMPORTANT**: Only the last 250 purchased items are taken into account. Items further back in the purchase history may be included in the recommendation.
      type: boolean
      default: false
    recommendations-rust-all-SectionsSlotsRecommendationResponseSchemaV2:
      allOf:
        - $ref: "#/components/schemas/recommendations-rust-all-RecommendationResponseSchemaV2"
        - type: object
          properties:
            extras:
              type: object
              properties:
                slots:
                  type: array
                  description: A list of slots data
                  items:
                    type: object
                    properties:
                      id:
                        type: integer
                        description: Slot identifier. Matches the index (zero-based numbering) of the slot provided in request
                      name:
                        type: string
                        description: Slot name provided in request
                      rows:
                        type: array
                        description: A list of rows that groups items with the same attribute value
                        items:
                          type: object
                          properties:
                            attributeValue:
                              type: string
                              description: The attribute value used to group items in the row
                            itemIds:
                              type: array
                              description: A list of item ids that meet the slot and row criteria
                              items:
                                type: string
                                description: Item identifier (`itemId` in item catalog)
                            metadata:
                              type: object
                              description: Metadata catalog attributes
                              properties:
                                itemId:
                                  type: string
                                  description: Item identifier (`itemId` in item metadata catalog)
                              additionalProperties: {}
                              required:
                                - itemId
                      error:
                        $ref: "#/components/schemas/recommendations-rust-all-Error"
                    required:
                      - id
              required:
                - slots
    recommendations-rust-all-SectionsSlotsBodySchemaV2:
      allOf:
        - $ref: "#/components/schemas/recommendations-rust-all-BaseBodySchemaV2"
        - type: object
          properties:
            metadataCatalogId:
              $ref: "#/components/schemas/recommendations-rust-all-MetadataCatalogId"
            slots:
              type: array
              description: Slots data
              items:
                $ref: "#/components/schemas/recommendations-rust-all-SectionSlotSchemaV2"
          required:
            - slots
    recommendations-rust-all-SectionSlotSchemaV2:
      type: object
      properties:
        name:
          type: string
          description: Slot name
        attribute:
          $ref: "#/components/schemas/recommendations-rust-all-Attribute"
        numRows:
          $ref: "#/components/schemas/recommendations-rust-all-NumRows"
        numItems:
          $ref: "#/components/schemas/recommendations-rust-all-NumItems"
        filters:
          $ref: "#/components/schemas/recommendations-rust-all-Filter"
        elasticFilters:
          $ref: "#/components/schemas/recommendations-rust-all-ElasticFilter"
      required:
        - attribute
        - numRows
        - numItems
    recommendations-rust-all-NumItems:
      type: integer
      description: The number of items in each row in the slot.
      minimum: 1
      maximum: 100
    recommendations-rust-all-NumRows:
      type: integer
      description: The number of rows in the slot.
      minimum: 1
      maximum: 10
    recommendations-rust-all-Attribute:
      type: object
      description: The attribute for grouping rows in the section and attribute recommendations.
      properties:
        name:
          description: Name of the attribute
          type: string
        levelRangeModifier:
          description: Restricts the range of items in recommendations to a particular attribute level.
          type: integer
      required:
        - name
    recommendations-rust-all-MetadataCatalogId:
      type: string
      description: ID of the catalog which stores attribute metadata
    recommendations-rust-all-AttributesSlotsBodySchemaV2:
      allOf:
        - $ref: "#/components/schemas/recommendations-rust-all-BaseBodySchemaV2"
        - type: object
          properties:
            metadataCatalogId:
              $ref: "#/components/schemas/recommendations-rust-all-MetadataCatalogId"
            slots:
              type: array
              description: Slots data
              items:
                $ref: "#/components/schemas/recommendations-rust-all-AttributeSlotSchemaV2"
          required:
            - slots
    recommendations-rust-all-AttributeSlotSchemaV2:
      type: object
      properties:
        name:
          type: string
          description: Slot name
        attribute:
          $ref: "#/components/schemas/recommendations-rust-all-Attribute"
        minNumItems:
          $ref: "#/components/schemas/recommendations-rust-all-MinNumItems"
        maxNumItems:
          $ref: "#/components/schemas/recommendations-rust-all-MaxNumItems"
        filters:
          $ref: "#/components/schemas/recommendations-rust-all-Filter"
        elasticFilters:
          $ref: "#/components/schemas/recommendations-rust-all-ElasticFilter"
      required:
        - attribute
    recommendations-rust-all-MetricsBodySchemaV2:
      allOf:
        - $ref: "#/components/schemas/recommendations-rust-all-SlotsBodySchemaV2"
        - type: object
          required:
            - sortMetric
            - clientUUID
    schema-service-ErrorSchemaService:
      type: object
      properties:
        timestamp:
          type: string
          format: date-time
          description: Time when the error occurred
        errorCode:
          type: string
          description: |
            Code of the error, needed for troubleshooting

            See error reference: [https://developers.synerise.com/errors.html](https://developers.synerise.com/errors.html)
        status:
          type: integer
          description: Error's HTTP status code
        message:
          type: string
          description: Description of the problem
    schema-service-AuthError:
      type: object
      properties:
        timestamp:
          type: string
          description: Time when the error occurred
        error:
          type: string
          description: Summary of the error
        message:
          type: string
          description: Description of the problem
        status:
          type: integer
          format: int32
          description: HTTP status code
    schema-service-GenerateResponse:
      type: object
      required:
        - id
        - hash
        - priority
        - name
        - createdAt
        - updatedAt
        - audience
        - data
        - path
      properties:
        id:
          $ref: "#/components/schemas/schema-service-screenViewId"
        hash:
          $ref: "#/components/schemas/schema-service-screenViewId"
        priority:
          $ref: "#/components/schemas/schema-service-screenViewPriority"
        name:
          $ref: "#/components/schemas/schema-service-screenViewName"
        createdAt:
          $ref: "#/components/schemas/schema-service-CreatedAt"
        updatedAt:
          $ref: "#/components/schemas/schema-service-UpdatedAt"
        audience:
          $ref: "#/components/schemas/schema-service-Audience"
        data:
          type: object
          description: The JSON structure of the screen view, with inserts processed
          properties:
            collection:
              type: array
              description: By default, the `collection` property exists in each screen view, unless the default content was overwritten. This property's value is the output of the `{% screenviewcollection %}` insert. If you moved the insert into a different position in the JSON structure, its result (the array) will be stored at the position where you placed the insert (you can modify the screen definition so that the insert is under a key different than `collection`).
              items:
                $ref: "#/components/schemas/schema-service-DocumentGenerateResponse"
          additionalProperties:
            description: Other JSON entities included in the screen view's JSON structure.
        path:
          type: string
          description: Address of the screen view definition
          example: /v2/screen-views/f9215cb9-4a7e-410b-88cb-8bc40363cc10
    schema-service-DocumentGenerateResponse:
      type: object
      description: Processed document
      required:
        - id
        - slug
        - schema
        - content
      properties:
        uuid:
          $ref: "#/components/schemas/schema-service-DocumentId"
        slug:
          $ref: "#/components/schemas/schema-service-DocumentSlug"
        schema:
          $ref: "#/components/schemas/schema-service-DocumentSchema"
        content:
          $ref: "#/components/schemas/schema-service-documentContentProcessed"
    schema-service-documentContentProcessed:
      description: Content of the document
      anyOf:
        - type: object
          description: The processed JSON content of the document
          additionalProperties:
            description: JSON keys in the document and their values
          example:
            someBoolean: true
            someString: Lorem ipsum
            aNestedDocument:
              uuid: 772d94f7-a604-409a-bfa9-24a64b8a5051
              slug: apple
              schema: fruit
              content:
                color: red
        - type: string
          description: Processed string value of a document (for example, a small document which only includes an insert to return an expression result)
    schema-service-DocumentSchema:
      type: string
      description: Schema of the document (called "Type" in the Synerise Web Application)
      example: containers
    schema-service-DocumentSlug:
      type: string
      description: Slug of the document
      example: basket
      pattern: "[a-z0-9]+(?:-[a-z0-9]+)*"
    schema-service-DocumentId:
      type: string
      format: uuid
      description: UUID of the document
    schema-service-Audience:
      type: object
      description: The profiles (clients) which have access to this resource
      required:
        - targetType
      properties:
        targetType:
          type: string
          description: |
            The method of defining the audience:
            - SEGMENT sets the audience to segmentations whose UUIDs are provided in `segments`
            - QUERY sets the audience to an analytics query provided in `query`
            - ALL sets the audience to all profiles in the database
          enum:
            - SEGMENT
            - QUERY
            - ALL
        segments:
          type: array
          description: "An array of segmentation IDs. Used with `targetType: SEGMENT`"
          items:
            type: string
        query:
          type: string
          description: "Stringified `analysis` object for the segmentation analytics engine. Used with `targetType: QUERY`. Refer to the [Analytics API Reference](https://developers.synerise.com/#operation/addSegmentationPOST_v2)."
          example: '{"analysis":{"title":"Unnamed segmentation","description":"","unique":true,"segments":[{"title":"Segmentation A","description":"","filter":{"matching":true,"expressions":[{"_id":"a9b76c8e-34bd-4ac3-be8f-f37041d126bd","name":"","type":"FUNNEL","matching":true,"funnel":{"_id":"5c759d73-49c6-409f-96a3-b569dff8f8ff","title":"Unnamed","completedWithin":null,"dateFilter":{"type":"RELATIVE","offset":{"type":"DAYS","value":0},"duration":{"type":"DAYS","value":30}},"steps":[{"_id":"78b97ae0-1bc5-45fb-82a4-4f1280cfbdff","title":"","action":{"id":944,"name":"page.visit"},"eventName":"page.visit","expressions":[]}],"exact":false}}]}}]}}'
    schema-service-UpdatedAt:
      type: string
      format: date-time
      description: Last update time
    schema-service-CreatedAt:
      type: string
      description: Creation date
      format: date-time
    schema-service-screenViewName:
      type: string
      description: Name of the screen view
    schema-service-screenViewPriority:
      type: integer
      description: Priority determines which screen view to show to a customer if their profile matches the conditions of more than one screen view. `1` is the highest priority.
      default: 99
    schema-service-screenViewId:
      type: string
      format: uuid
      description: UUID of the screen view
    schema-service-additionalPropertiesForGenerate:
      description: |
        If you are generating the resource with a context that doesn't have the data for inserts in the resource (for example, a document has a `{% customer param %}` insert, but you're authenticated with a workspace JWT, so the customer context can't be extracted from the JWT), you can include the parameters in the request body. If an insert can't be processed, the returned content is empty.

        **Usage example**: if the `{% customer firstName %}` insert is used in a document, you can pass its value by sending `"customer.firstName": "Joe"`

        Because inserts are always encapsulated with quotation marks, inserts that return a number or a boolean value return it as a string.
      anyOf:
        - type: string
        - type: number
    schema-service-screenView:
      type: object
      required:
        - id
        - businessProfileId
        - name
        - status
        - priority
        - scheduled
        - author
        - content
        - audience
        - createdAt
        - updatedAt
        - directory
        - feed
      properties:
        id:
          $ref: "#/components/schemas/schema-service-screenViewId"
        businessProfileId:
          $ref: "#/components/schemas/schema-service-screenViewBpId"
        name:
          $ref: "#/components/schemas/schema-service-screenViewName"
        description:
          $ref: "#/components/schemas/schema-service-screenViewDescription"
        status:
          $ref: "#/components/schemas/schema-service-screenViewStatus"
        priority:
          $ref: "#/components/schemas/schema-service-screenViewPriority"
        scheduled:
          $ref: "#/components/schemas/schema-service-screenViewScheduled"
        author:
          $ref: "#/components/schemas/schema-service-screenViewAuthor"
        content:
          $ref: "#/components/schemas/schema-service-ScreenViewContent"
        audience:
          $ref: "#/components/schemas/schema-service-Audience"
        createdAt:
          $ref: "#/components/schemas/schema-service-CreatedAt"
        updatedAt:
          $ref: "#/components/schemas/schema-service-UpdatedAt"
        deletedAt:
          $ref: "#/components/schemas/schema-service-DeletedAt"
        directory:
          $ref: "#/components/schemas/schema-service-Directory"
        feed:
          $ref: "#/components/schemas/schema-service-Feed"
    schema-service-Feed:
      type: object
      description: Feeds are used to group screen views, similar to document groups.
      required:
        - id
        - slug
        - name
        - createdAt
        - default
      properties:
        id:
          type: string
          format: uuid
          description: UUID of the screen view feed
        slug:
          $ref: "#/components/schemas/schema-service-FeedSlug"
        name:
          $ref: "#/components/schemas/schema-service-FeedName"
        createdAt:
          $ref: "#/components/schemas/schema-service-CreatedAt"
        default:
          type: boolean
          description: Informs if this is the default screen view feed
    schema-service-FeedName:
      type: string
      description: Name of the screen view feed
    schema-service-FeedSlug:
      type: string
      description: Unique slug of the screen view feed
    schema-service-Directory:
      type: object
      description: Details of the directory where the resource is assigned
      required:
        - id
        - name
        - createdAt
        - default
      properties:
        id:
          $ref: "#/components/schemas/schema-service-directoryId"
        name:
          $ref: "#/components/schemas/schema-service-DirectoryName"
        createdAt:
          type: string
          format: date-time
          description: Date and time when the directory was created
        default:
          type: boolean
          description: "`true` if this is the default directory"
    schema-service-DirectoryName:
      type: string
      description: Name of the directory
    schema-service-directoryId:
      type: string
      format: uuid
      description: |
        UUID of a directory. Directories can be used to organize documents and screen views for display in the Synerise Web Application.
        - If you want to organize documents for screen view campaigns, use document groups instead.
        - If you want to organize screen views for display, use screen view feeds instead.
    schema-service-DeletedAt:
      type: string
      format: date-time
      description: Deletion time, if applicable
      nullable: true
    schema-service-ScreenViewContent:
      type: object
      title: With document groups
      description: Content of the screen view
      required:
        - json
        - documents
        - groups
      properties:
        json:
          $ref: "#/components/schemas/schema-service-ScreenViewJsonContent"
        documents:
          type: array
          description: An array of [documents](https://help.synerise.com/docs/assets/documents/introduction-to-documents/). If `groups` is used, this array must be empty.
          items:
            type: string
        data:
          type: array
          description: An array of documents or Brickworks records
          items:
            oneOf:
              - $ref: "#/components/schemas/schema-service-DocumentSlugAsObject"
              - $ref: "#/components/schemas/schema-service-BrickworksRecord"
        groups:
          type: array
          description: An array of [document groups](https://help.synerise.com/docs/assets/documents/introduction-to-documents/), If `documents` is used, this array must be empty.
          items:
            $ref: "#/components/schemas/schema-service-DocumentGroupId"
        groupsOrder:
          type: boolean
          default: false
          description: By default, group are ordered for display by their priority. When this field is set to `true`, they are displayed according to their order in the `groups` array instead.
    schema-service-DocumentGroupId:
      type: string
      format: uuid
      example: 43c97b25-4a10-45d0-99b7-d472eea2bb24
      description: UUID of the group
    schema-service-BrickworksRecord:
      type: object
      description: Object represents brickworks record id.
      required:
        - schemaId
        - objectId
      properties:
        schemaId:
          type: string
          format: uuid
        objectId:
          type: string
    schema-service-DocumentSlugAsObject:
      type: object
      required:
        - slug
      properties:
        slug:
          type: string
          description: Slug of the document
          example: basket
          pattern: "[a-z0-9]+(?:-[a-z0-9]+)*"
    schema-service-ScreenViewJsonContent:
      type: object
      description: |
        JSON structure of the screen view. By default, a newly created screen view has the following `json` value:

        ```
        "collection": "{% screenviewcollection %}"
        ```
        The `{% screenviewcollection %}` insert is used to pick and display the documents from the documents in `documents` or `groups`.

        If this insert is not used, you must manually insert each document with `{% document slug%}`.
      additionalProperties:
        $ref: "#/components/schemas/schema-service-anyProp"
    schema-service-anyProp:
      description: Any JSON entity or entities
    schema-service-screenViewAuthor:
      type: object
      description: Information about the user who created this screen view
      required:
        - id
      properties:
        id:
          type: integer
          description: ID of the user
        name:
          type: string
          description: Name of the user
        avatar:
          type: string
          description: URL of the author's avatar image
    schema-service-screenViewScheduled:
      type: boolean
      description: Informs if the screen view has a defined schedule. Screen views scheduled to be published immediately after activation are considered to be scheduled, so only a draft screen view can have this property at `false`. Copied screen views inherit the schedule of their source.
    schema-service-screenViewStatus:
      type: string
      enum:
        - DRAFT
        - ACTIVE
        - SCHEDULED
        - PAUSED
        - FINISHED
      description: |
        Status of the screen view

        - DRAFT: a screen view that is a work in progress, not complete for activation
        - ACTIVE: a screen view that can be displayed to customers
        - SCHEDULED: a screen view scheduled to activate later
        - PAUSED: a screen view that is temporarily stopped and cannot be displayed
        - FINISHED: a screen view that is stopped and cannot be displayed
    schema-service-screenViewDescription:
      type: string
      description: Description of the screen view
    schema-service-screenViewBpId:
      type: integer
      description: ID of the workspace where this screen view is saved
    schema-service-CreateScreenViewRequest:
      type: object
      required:
        - priority
        - directoryId
        - content
        - audience
        - feedId
      properties:
        priority:
          $ref: "#/components/schemas/schema-service-screenViewPriority"
        name:
          $ref: "#/components/schemas/schema-service-screenViewName"
        directoryId:
          $ref: "#/components/schemas/schema-service-directoryId"
        content:
          $ref: "#/components/schemas/schema-service-ScreenViewContent"
        audience:
          $ref: "#/components/schemas/schema-service-Audience"
        schedule:
          $ref: "#/components/schemas/schema-service-EntrySchedule"
        feedId:
          $ref: "#/components/schemas/schema-service-feedId"
    schema-service-feedId:
      type: string
      format: uuid
      description: UUID of the feed where this screen view is assigned.
    schema-service-EntrySchedule:
      type: object
      description: Configuration of the schedule
      properties:
        enabled:
          type: boolean
          description: Defines if the schedule configuration is enabled. A schedule must be enabled in order to become active at the selected time.
        endDate:
          type: string
          format: date-time
          description: Time when the schedule stops being active. If `endType` is NEVER, this field is null.
          nullable: true
        endType:
          type: string
          description: |
            - NEVER: schedule never becomes inactive.

            - DATE: schedule becomes inactive at the time set by `endDate`.
          enum:
            - NEVER
            - DATE
        parts:
          type: array
          description: |
            
            An array of time rules that allow more granularity. All objects must match the period type set in `periodType` (for example, you **cannot mix** weekly and monthly conditions). 

            If `periodType` is ENTIRE, this array is empty.
          items:
            $ref: "#/components/schemas/schema-service-EntryScheduleRepeatPart"
        periodType:
          type: string
          description: |
            Defines when the schedule applies within its activity period.

            - ENTIRE: schedule is applied at all time since it becomes active until it becomes inactive.


            - WEEKLY: schedule is applied at specified days of the week (and optionally at specific times during those days)

            - MONTHLY: schedule is applied at specified days of the month (and optionally at specific times during those days)
          enum:
            - ENTIRE
            - WEEKLY
            - MONTHLY
        startDate:
          type: string
          format: date-time
          description: Time when the schedule becomes active. If `startType` is NOW, this field is null.
        startType:
          type: string
          enum:
            - NOW
            - SCHEDULED
        timezone:
          type: string
          example: Europe/Warsaw
          description: Time zone according to the [tz database](https://en.wikipedia.org/wiki/Tz_database)
    schema-service-EntryScheduleRepeatPart:
      type: object
      properties:
        startDay:
          type: integer
          format: int32
          example: 1
          description: |
            If `periodType` is:


            - WEEKLY, the values are 1-7 (1 is Monday).

            - MONTHLY, the values are 1-31 (days of the month).

            **Note:**<br/>
            If you want to define two time rules for a day (for example, the schedule is active on Monday at 06:00-07:00 and 15:00-16:00), create a separate object for each time period in the `parts` array.
        startTime:
          type: string
          example: 08:18:03
          description: The hour when the schedule becomes active.
        endDay:
          type: integer
          format: int32
          example: 1
          description: Must be identical to `startDay`.
        endTime:
          type: string
          example: 44283
          description: The hour when the schedule becomes inactive.
    schema-service-CreateRequest:
      type: object
      properties:
        name:
          type: string
          description: If no name is provided, defaults to "Unnamed document" or Screen View Campaign" (depending on what you are initializing).
        directory:
          type: string
          format: uuid
          description: If no directory is provided, the default directory is used.
    schema-service-standardApiResponse:
      type: object
      required:
        - status
        - body
      properties:
        status:
          type: string
          description: Status of the request
        body:
          type: string
          description: Additional information, if applicable.
    schema-service-identifierValue:
      type: string
      description: Value of the profile identifier selected in `identifierType` (profile ID is sent as a string)
    schema-service-ScreenViewFeed:
      type: object
      required:
        - name
        - slug
      properties:
        slug:
          $ref: "#/components/schemas/schema-service-FeedSlug"
        name:
          $ref: "#/components/schemas/schema-service-FeedName"
    schema-service-ScreenViewsListResponse:
      type: object
      required:
        - meta
        - data
      properties:
        meta:
          $ref: "#/components/schemas/schema-service-Meta"
        data:
          type: array
          description: Array of analytics
          items:
            oneOf:
              - $ref: "#/components/schemas/schema-service-screenView"
    schema-service-Meta:
      type: object
      description: Pagination metadata
      properties:
        links:
          type: array
          description: Links to the neighboring pages and the first page
          items:
            $ref: "#/components/schemas/schema-service-Link"
        limit:
          type: integer
          format: int32
          description: Limit of items per page
        count:
          type: number
          nullable: true
          description: Currently unused
    schema-service-Link:
      type: object
      required:
        - url
        - rel
      properties:
        url:
          type: string
          description: URL of the page, used for navigation
        rel:
          type: string
          description: The type of relation to the current page. `first` is always the first page.
          enum:
            - first
            - prev
            - next
    schema-service-screenViewMetadata:
      type: object
      description: Data of the screen view
      properties:
        id:
          $ref: "#/components/schemas/schema-service-screenViewId"
        version:
          $ref: "#/components/schemas/schema-service-screenViewVersion"
        status:
          $ref: "#/components/schemas/schema-service-screenViewStatus"
        hash:
          $ref: "#/components/schemas/schema-service-hashId"
        parentVersion:
          $ref: "#/components/schemas/schema-service-screenViewParentVersion"
        authorId:
          type: string
          description: ID of the user who created the screen view
        businessProfileId:
          $ref: "#/components/schemas/schema-service-screenViewBpId"
        priority:
          $ref: "#/components/schemas/schema-service-screenViewPriority"
        name:
          $ref: "#/components/schemas/schema-service-screenViewName"
        description:
          $ref: "#/components/schemas/schema-service-screenViewDescription"
        isActive:
          $ref: "#/components/schemas/schema-service-screenViewActive"
        createdAt:
          $ref: "#/components/schemas/schema-service-CreatedAt"
        updatedAt:
          $ref: "#/components/schemas/schema-service-UpdatedAt"
        deletedAt:
          $ref: "#/components/schemas/schema-service-DeletedAt"
    schema-service-screenViewActive:
      type: boolean
      description: Defines if the screen view is active.
    schema-service-screenViewParentVersion:
      type: string
      description: If the current was created from another version, this is is the UUID of the parent version.
    schema-service-hashId:
      type: string
      description: Hash ID of the version. Consists of the UUID of the screen view and and the version ID.
      example: bb6639b2-a98e-49d9-804f-ed6c0e2a0d2f:2019-12-05T08:22:10.094
    schema-service-screenViewVersion:
      type: string
      description: Version of the screen view
    schema-service-GraphObject:
      type: object
      required:
        - id
        - type
        - children
      properties:
        id:
          type: string
          description: UUID of the screen view or document
        type:
          type: string
          description: Type of the entity
          enum:
            - document
            - screenview
        name:
          type: string
          description: Name of the screen view or document (not slug)
        children:
          type: array
          description: Screen views or documents that refer to this entity
          items:
            $ref: "#/components/schemas/schema-service-GraphObject"
    schema-service-NewDirectory:
      type: object
      required:
        - name
      properties:
        name:
          $ref: "#/components/schemas/schema-service-DirectoryName"
    schema-service-DocumentMetadata:
      type: object
      description: Data of the document
      required:
        - docId
        - name
        - status
        - scheduled
        - authorId
        - directoryId
      properties:
        docId:
          $ref: "#/components/schemas/schema-service-DocumentId"
        name:
          $ref: "#/components/schemas/schema-service-DocumentName"
        status:
          $ref: "#/components/schemas/schema-service-DocumentStatus"
        authorId:
          type: integer
          format: int64
          description: ID of the user who created the document
        directoryId:
          type: string
          format: uuid
          description: UUID of the directory where the document is saved
        scheduled:
          $ref: "#/components/schemas/schema-service-DocumentScheduled"
        createdAt:
          $ref: "#/components/schemas/schema-service-CreatedAt"
        updatedAt:
          $ref: "#/components/schemas/schema-service-UpdatedAt"
        deletedAt:
          $ref: "#/components/schemas/schema-service-DeletedAt"
    schema-service-DocumentScheduled:
      type: boolean
      description: Informs if the document has a defined schedule. Documents scheduled to be published immediately after activation are considered to be scheduled, so only a draft document can have this property at `false`. Copied documents inherit the schedule of their source document.
    schema-service-DocumentStatus:
      type: string
      enum:
        - DRAFT
        - ACTIVE
        - SCHEDULED
        - PAUSED
        - FINISHED
      description: Filter by status
    schema-service-DocumentName:
      type: string
      description: Name of the document
    schema-service-SchedulerResponse:
      type: object
      description: Details of the schedule
      properties:
        active:
          type: boolean
          description: "`true` if the conditions of the schedule match the current time. This is not related to document/screen view status."
        externalId:
          $ref: "#/components/schemas/schema-service-ScheduleExternalId"
        type:
          $ref: "#/components/schemas/schema-service-ScheduleType"
        finished:
          type: boolean
          description: "`true` if the conditions of the schedule mean it ended in the past. This is not related to document/screen view status."
        schedule:
          $ref: "#/components/schemas/schema-service-EntrySchedule"
    schema-service-ScheduleType:
      type: string
      description: Type of the scheduled object
      enum:
        - SCREENVIEW
        - DOCUMENT
    schema-service-ScheduleExternalId:
      type: string
      format: uuid
      description: UUID of the screen view or document that the schedule applies to
    schema-service-SchedulerRequest:
      type: object
      description: Schedule object
      properties:
        externalId:
          $ref: "#/components/schemas/schema-service-ScheduleExternalId"
        type:
          $ref: "#/components/schemas/schema-service-ScheduleType"
        schedule:
          $ref: "#/components/schemas/schema-service-EntrySchedule"
    schema-service-paginatedScreenViews:
      type: object
      required:
        - data
        - pagination
      properties:
        data:
          type: array
          description: A page of screen views
          items:
            $ref: "#/components/schemas/schema-service-screenView"
        pagination:
          $ref: "#/components/schemas/schema-service-pagination"
    schema-service-pagination:
      type: object
      description: Pagination metadata
      required:
        - limit
        - page
        - pages
        - total
      properties:
        limit:
          type: integer
          description: The number of items per page
        page:
          type: integer
          description: The current page
        pages:
          type: integer
          description: The total number of pages
        total:
          type: integer
          description: The total number of items on all pages
    schema-service-screenViewLegacy:
      type: object
      required:
        - id
        - businessProfileId
        - name
        - status
        - priority
        - scheduled
        - author
        - content
        - audience
        - createdAt
        - updatedAt
        - directory
        - feed
      properties:
        id:
          $ref: "#/components/schemas/schema-service-screenViewId"
        version:
          $ref: "#/components/schemas/schema-service-screenViewVersion"
        parentVersion:
          $ref: "#/components/schemas/schema-service-screenViewParentVersion"
        businessProfileId:
          $ref: "#/components/schemas/schema-service-screenViewBpId"
        name:
          $ref: "#/components/schemas/schema-service-screenViewName"
        description:
          $ref: "#/components/schemas/schema-service-screenViewDescription"
        status:
          $ref: "#/components/schemas/schema-service-screenViewStatus"
        priority:
          $ref: "#/components/schemas/schema-service-screenViewPriority"
        scheduled:
          $ref: "#/components/schemas/schema-service-screenViewScheduled"
        author:
          $ref: "#/components/schemas/schema-service-screenViewAuthor"
        content:
          $ref: "#/components/schemas/schema-service-ScreenViewContentLegacy"
        audience:
          $ref: "#/components/schemas/schema-service-Audience"
        createdAt:
          $ref: "#/components/schemas/schema-service-CreatedAt"
        updatedAt:
          $ref: "#/components/schemas/schema-service-UpdatedAt"
        deletedAt:
          $ref: "#/components/schemas/schema-service-DeletedAt"
        directory:
          $ref: "#/components/schemas/schema-service-Directory"
        feed:
          $ref: "#/components/schemas/schema-service-Feed"
    schema-service-ScreenViewContentLegacy:
      type: object
      description: Content of the screen view. It's possible to create a screen view without any documents (`documents` and `groups` arrays are both empty in that case).
      required:
        - json
        - documents
        - groups
      properties:
        json:
          $ref: "#/components/schemas/schema-service-ScreenViewJsonContent"
        documents:
          type: array
          minItems: 0
          description: An array of [documents](https://help.synerise.com/docs/assets/documents/introduction-to-documents/). If `groups` is used or the SV contains no documents, this array must be empty.
          items:
            $ref: "#/components/schemas/schema-service-documentId"
        groups:
          type: array
          minItems: 0
          description: An array of [document groups](https://help.synerise.com/docs/assets/documents/introduction-to-documents/). If `documents` is used or the SV contains no documents, this array must be empty.
          items:
            $ref: "#/components/schemas/schema-service-DocumentGroupId"
        groupsOrder:
          type: boolean
          default: false
          description: By default, group are ordered for display by their priority. When this field is set to `true`, they are displayed according to their order in the `groups` array instead.
    schema-service-documentId:
      type: object
      required:
        - slug
      properties:
        slug:
          type: string
          description: Slug of the document
        version:
          type: string
          description: Version of the document
    schema-service-versionsOfScreenView:
      type: object
      properties:
        draft:
          $ref: "#/components/schemas/schema-service-screenViewMetadata"
        currentlyPublished:
          $ref: "#/components/schemas/schema-service-screenViewMetadata"
        previouslyPublished:
          $ref: "#/components/schemas/schema-service-paginatedScreenViewMetadata"
    schema-service-paginatedScreenViewMetadata:
      type: object
      description: Paginated list of previously published screen views
      required:
        - data
        - pagination
      properties:
        data:
          type: array
          description: A page of screen views
          items:
            $ref: "#/components/schemas/schema-service-screenViewMetadata"
        pagination:
          $ref: "#/components/schemas/schema-service-pagination"
    schema-service-GenerateScreenViewResponse:
      type: object
      required:
        - id
        - version
        - hash
        - businessProfileId
        - name
        - priority
        - audience
        - createdAt
        - updatedAt
        - path
        - data
      properties:
        id:
          $ref: "#/components/schemas/schema-service-screenViewId"
        version:
          $ref: "#/components/schemas/schema-service-screenViewVersion"
        parentVersion:
          $ref: "#/components/schemas/schema-service-screenViewParentVersion"
        name:
          $ref: "#/components/schemas/schema-service-screenViewName"
        priority:
          $ref: "#/components/schemas/schema-service-screenViewPriority"
        audience:
          $ref: "#/components/schemas/schema-service-Audience"
        createdAt:
          $ref: "#/components/schemas/schema-service-CreatedAt"
        updatedAt:
          $ref: "#/components/schemas/schema-service-UpdatedAt"
        hash:
          $ref: "#/components/schemas/schema-service-hashId"
        path:
          $ref: "#/components/schemas/schema-service-path"
        data:
          type: object
    schema-service-path:
      type: string
      description: Url Path.
      example: /screenView
    schema-service-versionedScreenViewKey:
      type: object
      properties:
        screenViewId:
          $ref: "#/components/schemas/schema-service-screenViewId"
        screenViewVersion:
          $ref: "#/components/schemas/schema-service-screenViewVersion"
    schema-service-publishRequest:
      type: object
      required:
        - overwrite
      properties:
        overwrite:
          description: Currently unused
          type: boolean
    template-backend-TemplateOverviewResponse:
      type: object
      required:
        - id
        - hashId
        - name
        - businessProfileId
        - type
        - subtype
        - contentType
        - createdAt
        - updatedAt
        - directory
        - thumbnailUrl
        - author
        - status
        - source
      properties:
        id:
          $ref: "#/components/schemas/template-backend-TemplateId"
        hashId:
          $ref: "#/components/schemas/template-backend-TemplateHashId"
        name:
          $ref: "#/components/schemas/template-backend-TemplateName"
        businessProfileId:
          $ref: "#/components/schemas/template-backend-BusinessProfileId"
        type:
          $ref: "#/components/schemas/template-backend-TemplateType"
        subtype:
          $ref: "#/components/schemas/template-backend-TemplateSubType"
        contentType:
          $ref: "#/components/schemas/template-backend-TemplateContentType"
        createdAt:
          $ref: "#/components/schemas/template-backend-CreatedAt"
        updatedAt:
          $ref: "#/components/schemas/template-backend-UpdateAt"
        directory:
          $ref: "#/components/schemas/template-backend-DirectoryResponse"
        thumbnailUrl:
          $ref: "#/components/schemas/template-backend-ThumbnailUrl"
        author:
          $ref: "#/components/schemas/template-backend-Author"
        status:
          $ref: "#/components/schemas/template-backend-TemplateStatus"
        source:
          $ref: "#/components/schemas/template-backend-Source"
    template-backend-Source:
      type: integer
      format: int64
      description: |
        Information about used editor. Currently accepted builder are
        - `LACK_OF_INFORMATION` = 0
        - `BEE_FREE_EDITOR` = 1
        - `DYNAMIC_CONTENT_CODE_EDITOR` = 2
        - `MAIL_EDITOR` = 3
        - `SMS_EDITOR` = 4
        - `WEB_PUSH_EDITOR` = 5
        - `MOBILE_SIMPLE_PUSH_VISUAL_EDITOR` = 6
        - `MOBILE_SILENT_PUSH_CODE_EDITOR` = 7
        - `FACEBOOK_POST_EDITOR` = 13
        - `IMPORT_FROM_ZIP` = 14
        - `IMPORT_FROM_URL` = 15
        - `GRAPES_EDITOR` = 16
        - `VISUAL_BUILDER` = 17
        - `LANDING_PAGE_ADVANCED_DRAG_AND_DROP` = 18
        - `WEB_BEE_FREE_EDITOR` = 19
        - `MOBILE_SIMPLE_PUSH_CODE_EDITOR` = 20
        - `LANDING_PAGE_CODE_EDITOR` = 21
        - `LANDING_PAGE_BASIC_DRAG_AND_DROP` = 22
    template-backend-TemplateStatus:
      type: string
      description: Approval status of the template. If approvals are disabled, the status is null.
      nullable: true
      enum:
        - DRAFT
        - REVIEW
        - APPROVED
        - REJECTED
    template-backend-Author:
      type: integer
      format: int64
      description: Author ID
      example: 123
    template-backend-ThumbnailUrl:
      type: string
      description: URL of the template's thumbnail
      example: https://foo.bar
    template-backend-DirectoryResponse:
      type: object
      description: Details of the directory that includes this template
      required:
        - hashId
        - name
        - readOnly
        - createdAt
        - default
        - type
      properties:
        hashId:
          type: string
          format: uuid
          example: e0326a2d-7697-4ae9-b490-31f97041adcb
          description: Directory hashId (UUID)
        name:
          type: string
          description: Name of the directory
        readOnly:
          type: boolean
          example: true
          description: "`true` when the directory is read-only"
        createdAt:
          $ref: "#/components/schemas/template-backend-CreatedAt"
        type:
          nullable: true
          type: string
          description: Directory type
          example: EMAIL
        contentType:
          $ref: "#/components/schemas/template-backend-TemplateContentType"
        default:
          type: boolean
          example: true
          description: When `true`, this template belongs to one of the default folders
        predefined:
          type: boolean
          example: true
    template-backend-TemplateContentType:
      type: string
      enum:
        - TEMPLATE
        - BLOCK
      example: TEMPLATE
    template-backend-CreatedAt:
      type: string
      description: Time of creation
      format: date-time
      example: 2019-03-21T12:31:26Z
    template-backend-UpdateAt:
      type: string
      description: Time of last update
      example: 2019-03-21T12:31:26Z
    template-backend-TemplateSubType:
      type: string
      description: |
        Template subtype. Currently accepted subtypes are
        - `BANNER` (can be used with mobile push)
        - `TOP_BAR`, `BOTTOM_BAR`, `MODAL` (can be used with in app notifications)
        - `null`.
      example: BANNER
      nullable: true
      default: null
      enum:
        - BANNER
        - TOP_BAR
        - BOTTOM_BAR
        - MODAL
        - null
    template-backend-TemplateType:
      type: string
      description: Template type
      example: EMAIL
      default: null
      nullable: true
      enum:
        - SMS
        - MOBILE_PUSH
        - WEB_PUSH
        - DYNAMIC_CONTENT
        - LANDING_PAGE
        - EMAIL
        - SOCIAL_MEDIA
        - IN_APP
        - null
    template-backend-BusinessProfileId:
      type: integer
      description: Workspace ID
      example: 594
    template-backend-TemplateName:
      type: string
      description: Name of the template
      default: null
      nullable: true
    template-backend-TemplateHashId:
      type: string
      description: Template hashId (UUID)
      example: e0326a2d-7697-4ae9-b490-31f97041adcb
    template-backend-TemplateId:
      type: integer
      format: int64
      description: Template ID
    template-backend-TemplateDetailsResponse:
      type: object
      required:
        - id
        - hashId
        - businessProfileId
        - name
        - templateContent
        - type
        - subtype
        - thumbnailUrl
        - directory
        - createdAt
        - updatedAt
        - parsedData
        - parsedContent
        - functionType
        - author
        - status
        - source
      properties:
        id:
          $ref: "#/components/schemas/template-backend-TemplateId"
        hashId:
          $ref: "#/components/schemas/template-backend-TemplateHashId"
        businessProfileId:
          $ref: "#/components/schemas/template-backend-BusinessProfileId"
        name:
          $ref: "#/components/schemas/template-backend-TemplateName"
        templateContent:
          $ref: "#/components/schemas/template-backend-TemplateContent"
        type:
          $ref: "#/components/schemas/template-backend-TemplateType"
        subtype:
          $ref: "#/components/schemas/template-backend-TemplateSubType"
        contentType:
          $ref: "#/components/schemas/template-backend-TemplateContentType"
        thumbnailUrl:
          $ref: "#/components/schemas/template-backend-ThumbnailUrl"
        directory:
          $ref: "#/components/schemas/template-backend-DirectoryResponse"
        createdAt:
          $ref: "#/components/schemas/template-backend-CreatedAt"
        updatedAt:
          $ref: "#/components/schemas/template-backend-UpdateAt"
        parsedData:
          $ref: "#/components/schemas/template-backend-ParsedData"
        parsedContent:
          $ref: "#/components/schemas/template-backend-ParsedContent"
        functionType:
          $ref: "#/components/schemas/template-backend-FunctionType"
        author:
          $ref: "#/components/schemas/template-backend-Author"
        status:
          $ref: "#/components/schemas/template-backend-TemplateStatus"
        source:
          $ref: "#/components/schemas/template-backend-Source"
        includeSafeArea:
          $ref: "#/components/schemas/template-backend-IncludeSafeArea"
    template-backend-IncludeSafeArea:
      type: boolean
      description: Define if in_app template should include safe area
      default: false
      nullable: true
    template-backend-FunctionType:
      type: string
      description: Function type
      example: Password Change
    template-backend-ParsedContent:
      type: string
    template-backend-ParsedData:
      type: object
      properties:
        links:
          type: object
    template-backend-TemplateContent:
      type: string
      description: |
        Template content as a **stringified, escaped object**.

        This includes HTML, JS, CSS, and other data, depending on the template type.
      example: '{"json":"","html":"<p>some text</p>","css":"p {\n    font-weight: bold\n}","js":"console.log(\"test\")","raw":"<html><head><style type=\"text/css\">p {\n    font-weight: bold\n}</style></head><body><p>some text</p></body></html>","source":2}'
    template-backend-TemplateCreateRequest:
      type: object
      required:
        - content
        - directory
        - source
      properties:
        name:
          $ref: "#/components/schemas/template-backend-TemplateName"
        type:
          $ref: "#/components/schemas/template-backend-TemplateType"
        subtype:
          $ref: "#/components/schemas/template-backend-TemplateSubType"
        contentType:
          $ref: "#/components/schemas/template-backend-TemplateContentType"
        directory:
          $ref: "#/components/schemas/template-backend-DirectoryIdForSave"
        content:
          $ref: "#/components/schemas/template-backend-TemplateContent"
        source:
          $ref: "#/components/schemas/template-backend-Source"
        includeSafeArea:
          $ref: "#/components/schemas/template-backend-IncludeSafeArea"
        hidden:
          type: boolean
          description: Define if the template is hidden
          default: false
          nullable: true
        temporal:
          type: boolean
          description: Define if template can be deleted if was not used in any place
          default: false
          nullable: true
    template-backend-DirectoryIdForSave:
      type: string
      format: uuid
      description: UUID of the directory where the template will be saved
      example: e0326a2d-7697-4ae9-b490-31f97041adcb
    template-backend-TemplateUpdateRequest:
      type: object
      properties:
        name:
          $ref: "#/components/schemas/template-backend-TemplateName"
        content:
          $ref: "#/components/schemas/template-backend-TemplateContent"
        includeSafeArea:
          $ref: "#/components/schemas/template-backend-IncludeSafeArea"
    template-backend-DefaultTemplateDetailsResponse:
      type: object
      required:
        - id
        - hashId
        - businessProfileId
        - type
        - subtype
        - functionType
        - thumbnailUrl
        - createdAt
        - createdBy
      properties:
        id:
          $ref: "#/components/schemas/template-backend-TemplateId"
        hashId:
          $ref: "#/components/schemas/template-backend-TemplateHashId"
        businessProfileId:
          $ref: "#/components/schemas/template-backend-BusinessProfileId"
        type:
          $ref: "#/components/schemas/template-backend-TemplateType"
        subtype:
          $ref: "#/components/schemas/template-backend-TemplateSubType"
        functionType:
          nullable: true
          type: string
          description: Function type
          example: Password Change
        thumbnailUrl:
          $ref: "#/components/schemas/template-backend-ThumbnailUrl"
        createdAt:
          $ref: "#/components/schemas/template-backend-CreatedAt"
        createdBy:
          $ref: "#/components/schemas/template-backend-Author"
    template-backend-FunctionTemplateCreateRequest:
      type: object
      required:
        - directory
        - content
        - functionType
      properties:
        name:
          type: string
          description: Template name
          example: name
          default: null
        content:
          type: string
          description: Template content
          example: <html><h1>Content</h1></html>
        functionType:
          $ref: "#/components/schemas/template-backend-FunctionType"
        directory:
          $ref: "#/components/schemas/template-backend-DirectoryIdForSave"
    template-backend-MoveTemplatesRequest:
      type: object
      required:
        - templateHashIds
        - directoryHash
      properties:
        templateHashIds:
          type: array
          description: List of templates to move, identified by hashIds (UUIDs)
          items:
            type: string
            format: uuid
            example: 2ede34f8-1c27-4131-bfb1-5c88856882e1
        directoryHash:
          type: string
          description: UUID of the directory where the template will be moved
          example: 2ede34f8-1c27-4131-bfb1-5c88856882e1
    template-backend-DirectoryCreateRequest:
      type: object
      required:
        - type
        - name
      properties:
        name:
          type: string
          description: Name of the directory
        type:
          $ref: "#/components/schemas/template-backend-TemplateType"
        readOnly:
          type: boolean
          description: Define if the directory is read-only
          default: false
        contentType:
          $ref: "#/components/schemas/template-backend-TemplateContentType"
    template-backend-TemplateResponse:
      type: object
      required:
        - html
        - css
        - date
      properties:
        html:
          nullable: true
          type: string
          description: Template content in HTML
        css:
          nullable: true
          type: string
          description: Template CSS
        date:
          $ref: "#/components/schemas/template-backend-CreatedAt"
  parameters:
    ai-stats-timeZone:
      name: timeZone
      in: query
      required: false
      description: Time zone identifier.
      schema:
        type: string
        default: UTC
      example: Europe/Warsaw
    ai-stats-to:
      name: to
      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-from:
      name: from
      in: query
      required: false
      description: |
        Upper bound of the interval for which the statistics will be retrieved.  
        Must be provided with `from`, otherwise the filter is treated as unspecified.  
        If not specified, the interval is last 7 days.
      schema:
        type: string
        format: date
    ai-stats-campaignIdPath:
      name: campaignId
      in: path
      required: true
      description: ID of the recommendation campaign
      schema:
        type: string
        example: 50NCGoRK0VRb
    ai-stats-productMetricName:
      name: metric
      in: query
      required: false
      description: |
        The response will include statistics for up to 10 top-performing items according to the selected metric, sorted from best to worst.
        If not specified, the default metric is `views`.
        - views - the number of displayed recommendation frames.
        - generations - the number of generated recommendation frames.
        - clicks - the number of times an item in a recommendation frame was clicked.
        - charges - the number of transactions caused by the recommendation.
        - revenue - the revenue generated by the recommendation.
      schema:
        type: string
        default: views
        enum:
          - views
          - clicks
          - revenue
          - generations
          - charges
    recommendation-campaigns-campaignId:
      name: campaignId
      in: path
      description: ID of the campaign
      required: true
      schema:
        type: string
    recommendations-api-materializer-paramsMaterializer:
      name: params
      in: query
      required: false
      description: |
        List of extra params that will be added to the `recommendation.generated` 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
    recommendations-api-materializer-itemsSourceId:
      in: query
      name: itemsSourceId
      description: |
        Source of item IDs for the recommendation context. In recommendations whose models doesn't use the item context, the attributes of those items can only be used in filters.

        Must be used with `itemsSourceType`.

        If the items' source type is 'aggregate', this is the aggregate's ID. If the items' source type is 'expression', this is the expression's ID.

        The item ID source (aggregate or expression) should return a string or an array of strings. If it returns numerical values, the recommendations engine attempts to convert them into strings while processing the request.

        Alternatively, you can pass the `itemId` parameter to define context items directly. Only one of these options is allowed at the same time.
      required: false
      schema:
        type: string
    recommendations-api-materializer-itemsSourceType:
      in: query
      name: itemsSourceType
      description: |
        Item ID or item IDs source type for the recommendation context.

        Must be used with `itemSourceId`. This overrides the `itemsSource` settings of the campaign definition.

        In recommendations whose models doesn't use the item context, the attributes of those items can only be used in filters.  

        If the items' source type is 'aggregate', the aggregate result will be used as context items. If the items' source type is 'expression', the expression result will be used as context items.

        The item ID source (aggregate or expression) should return a string or an array of strings. If it returns numerical values, the recommendations engine attempts to convert them into strings while processing the request.

        Alternatively, you can pass the `itemId` parameter to define context items directly. Only one of these options is allowed at the same time.
      required: false
      schema:
        type: string
        enum:
          - aggregate
          - expression
    recommendations-api-materializer-campaignIdentifier:
      name: campaignIdentifier
      in: path
      description: Recommendation campaign identifier - a campaignID or a slug
      required: true
      schema:
        type: string
    recommendations-api-materializer-identifierName:
      name: identifierName
      in: path
      description: The name of the profile identifier to use for the request. By default, the allowed identifier types are `id`, `uuid`, `email`, and `custom_identify`. This may be changed in the workspace configuration.
      required: true
      schema:
        type: string
        enum:
          - id
          - uuid
          - email
          - custom_identify
    recommendations-rust-all-crossWorkspaceMode:
      name: crossWorkspaceMode
      in: query
      required: false
      description: |
        Specifies if recommendation should use cross-workspace mode and personalize recommendations with events from other members of workspace group if they are available.
      schema:
        type: boolean
    recommendations-rust-all-inventoryChannelId:
      name: inventoryChannelId
      in: query
      required: false
      description: |
        Inventory context identifier used to evaluate inventory-related filters and boosting strategies. If not provided, no inventory context will be applied.
      schema:
        type: string
    recommendations-rust-all-params:
      name: params
      in: query
      required: false
      description: |
        List of extra params that will be added to the `recommendation.generated` 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
    recommendations-rust-all-recommendationsIncludeContextItems:
      name: includeContextItems
      in: query
      required: false
      description: The recommendation results will include context items from the request.
      schema:
        type: boolean
    recommendations-rust-all-distinctFilter:
      in: query
      name: distinctFilter
      required: false
      schema:
        type: object
        description: Distinct filters allow you to specify how many recommended items can have the same value of specified attributes.
        properties:
          elastic:
            type: boolean
            description: When TRUE, allows to complete the recommended items with items which don't meet the distinct filter criteria.
          filters:
            type: array
            minItems: 1
            maxItems: 5
            description: Array of distinct filters
            items:
              type: object
              properties:
                field:
                  type: string
                  description: Attribute name
                maxNumItems:
                  type: number
                  format: integer
                  description: Max number of items with the same value of the attribute
                levelRangeModifier:
                  type: number
                  format: integer
                  description: Parameter used (for the `category` field) to specify how many categories to cut off from the end
              required:
                - field
                - maxNumItems
        required:
          - elastic
          - filters
    recommendations-rust-all-itemCatalogId:
      name: itemCatalogId
      in: query
      required: false
      description: ID (_not_ name) of the item feed to use in the request. The requested recommendation type (model) must be ready for this item feed.
      schema:
        type: string
        default: default
    recommendations-rust-all-inParamsItemId:
      name: itemId
      in: query
      required: false
      description: Item identifier, equal to `itemId` from the *item feed*. It can be used to define the item context of the query.
      schema:
        type: string
    recommendations-rust-all-elasticFilterExpr:
      name: elastic:filters
      in: query
      required: false
      description: |
        This string defines the criteria that an item must meet in order to be considered for recommendation. The Elastic filter may be dropped if not enough products meet the required criteria.  
        For information on building filters, see ["Items Query Language (IQL)" in the Developer Guide](https://hub.synerise.com/developers/iql/).
      schema:
        type: string
    recommendations-rust-all-filterExpr:
      name: filters
      in: query
      required: false
      description: |
        This string defines the criteria that an item must meet in order to be considered for recommendation.  
        For information on building filters, see ["Items Query Language (IQL)" in the Developer Guide](https://hub.synerise.com/developers/iql/).
      schema:
        type: string
    recommendations-rust-all-recommendationsExcludePurchasedItemsSince:
      name: excludePurchasedItemsSinceDays
      in: query
      required: false
      description: Limits the application of the `excludePurchasedItems` filter to a specified number of days.
      schema:
        description: Limits the application of the `excludePurchasedItems` filter to a specified number of days.
        type: integer
    recommendations-rust-all-recommendationsExcludePurchasedItems:
      name: excludePurchasedItems
      in: query
      required: false
      description: |
        When true, the recommendation results will include only items that the profile hasn't purchased before.  
        **IMPORTANT**: Only the last 250 purchased items are taken into account. Items further back in the purchase history may be included in the recommendation.
      schema:
        description: |
          When true, the recommendation results will include only items that the Profile hasn't purchased before.  
          **IMPORTANT**: Only the last 250 purchased items are taken into account. Items further back in the purchase history may be included in the recommendation.
        type: boolean
        default: false
    recommendations-rust-all-recommendationsCampaignName:
      name: campaignName
      in: query
      required: false
      description: The campaign name which will be included in the recommendation.generated event.
      schema:
        type: string
    recommendations-rust-all-recommendationsCampaignId:
      name: campaignId
      in: query
      required: false
      description: The campaignId which will be passed as *utm_campaign* in a link to the recommended item.
      schema:
        type: string
        default: defaultCampaign
    recommendations-rust-all-recommendationsMaxNumItems:
      name: maxNumItems
      in: query
      required: false
      description: The maximal number of returned item recommendations.
      schema:
        type: integer
        description: The maximal number of returned item recommendations.
        maximum: 100
        default: 5
    recommendations-rust-all-recommendationsMinNumItems:
      name: minNumItems
      in: query
      required: false
      description: The minimal number of returned item recommendations. If the service is not able to return at least this many recommendations, it will return an error.
      schema:
        type: integer
        description: The minimal number of returned item recommendations. If the service is not able to return at least this many recommendations, it will return an error.
        default: 1
        minimum: 1
    recommendations-rust-all-inPathClientUUID:
      name: clientUuid
      in: path
      description: Recommendations will be generated for the provided profile UUID.
      required: true
      schema:
        type: string
    recommendations-rust-all-pathClientUuid:
      name: clientUuid
      in: path
      description: Information will be shown for the provided profile UUID.
      required: true
      schema:
        type: string
    recommendations-rust-all-pathAggregateUuid:
      name: aggregateUUID
      in: path
      description: Information will be shown for the provided aggregate UUID.
      required: true
      schema:
        type: string
    recommendations-rust-all-recommendationsClientUUID:
      name: clientUUID
      in: query
      description: |
        Profile UUID. This parameter is required for these recommendation types:
          - Personalized
          - Last seen
          - Recent interactions
          - Section
          - Attribute

        This parameter can be passed in all recommendations. In recommendations which don't require the customer context, it can still be used to create filters.
      required: false
      schema:
        type: string
    recommendations-rust-all-recommendationsSortMetric:
      name: sortMetric
      in: query
      required: false
      description: ID of the metric to sort the results by. The list of available metrics can be checked by using [this endpoint](https://developers.synerise.com/AnalyticsSuite/AnalyticsSuite.html#operation/ApiGetAvailableMetricsV2).
      schema:
        type: string
    recommendations-rust-all-recommendationsBoostMetric:
      name: boostMetric
      in: query
      required: false
      description: ID of the metric to boost the results by. Metric scores will be combined with recommendation scores, favoring the best-performing results. The list of available metrics can be checked by using [this endpoint](https://developers.synerise.com/AnalyticsSuite/AnalyticsSuite.html#operation/ApiGetAvailableMetricsV2).
      schema:
        type: string
    recommendations-rust-all-inParamsItemIdList:
      name: itemId
      in: query
      required: false
      description: Item identifiers, equal to `itemId` from the *item feed*. They can be used to define the item context of the query.
      schema:
        type: array
        items:
          type: string
          description: Item identifier, equal to `itemId` from the *item feed*. It can be used to define the item context of the query.
    recommendations-rust-all-inPathItemId:
      in: path
      name: itemId
      required: true
      description: Item identifier, equal to `itemId` from the *item feed*.
      schema:
        type: string
    schema-service-pathFeedSlug:
      in: path
      name: feedSlug
      description: Slug of the screen view feed
      required: true
      schema:
        type: string
    schema-service-pathScreenViewId:
      name: screenViewId
      in: path
      required: true
      description: UUID of the screen view
      schema:
        type: string
        format: uuid
    schema-service-pathIdentifierType:
      in: path
      name: identifierType
      description: Type of the profile identifier. The value is sent in `identifierValue` in the request body.
      required: true
      schema:
        type: string
        enum:
          - id
          - uuid
          - email
          - custom_identify
    schema-service-queryFeedId:
      name: feedId
      in: query
      required: false
      schema:
        type: string
        format: uuid
        description: UUID of the screen view feed for filtering the results
    schema-service-queryStatus:
      name: status
      in: query
      required: false
      schema:
        type: string
        enum:
          - DRAFT
          - ACTIVE
          - SCHEDULED
          - PAUSED
          - FINISHED
        description: Filter by status
    schema-service-queryDirectoryId:
      name: directoryId
      in: query
      required: false
      description: UUID of the directory for filtering the results
      schema:
        type: string
        format: uuid
    schema-service-querySearch:
      name: search
      in: query
      required: false
      description: A string to search for in resource names
      schema:
        type: string
    schema-service-queryLimit:
      name: limit
      in: query
      required: false
      description: Limit of items per page
      schema:
        type: number
        format: int32
        default: 25
    schema-service-queryPage:
      name: page
      in: query
      required: false
      schema:
        type: number
        format: int32
        minimum: 1
        default: 1
    schema-service-pathDirectoryId:
      name: directoryId
      in: path
      required: true
      description: UUID of the directory
      schema:
        type: string
        format: uuid
    schema-service-pathFeedId:
      name: feedId
      in: path
      required: true
      description: UUID of a screen view feed
      schema:
        type: string
        format: uuid
    schema-service-QueryPageRequired:
      in: query
      name: page
      description: The number of the page to retrieve
      required: true
      schema:
        type: integer
    schema-service-QueryLimitRequired:
      in: query
      name: limit
      description: The maximum number of items to retrieve for pagination
      required: true
      schema:
        type: string
    schema-service-pathScreenViewVersion:
      name: screenViewVersion
      in: path
      required: true
      description: Version of the screen view
      schema:
        type: string
    template-backend-templateUuid:
      in: path
      name: templateUuid
      schema:
        type: string
        format: uuid
        example: e0326a2d-7697-4ae9-b490-31f97041adcb
      description: Template UUID
      required: true
    template-backend-directoryUuid:
      in: path
      name: directoryUUID
      schema:
        type: string
        format: uuid
        example: e0326a2d-7697-4ae9-b490-31f97041adcb
      description: Directory UUID
      required: true
  responses:
    recommendations-api-materializer-500error:
      description: An error occurred
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/recommendations-api-materializer-Error"
    recommendations-api-materializer-404cannotGenerate:
      description: No recommendations could be generated for the specified campaign and context.
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/recommendations-api-materializer-Error"
    recommendations-api-materializer-429toManyRequestsError:
      description: The user has sent too many requests in a given amount of time ("rate limiting").
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/recommendations-api-materializer-Error"
    recommendations-rust-all-500-error-occurred:
      description: An error occurred
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/recommendations-rust-all-Error"
    recommendations-rust-all-404-no-recommendation:
      description: No recommendations could be generated for the specified profile and filters
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/recommendations-rust-all-Error"
    schema-service-404:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/schema-service-ErrorSchemaService"
    schema-service-403:
      description: Forbidden; insufficient permissions
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/schema-service-AuthError"
    schema-service-401:
      description: "Unauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc."
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/schema-service-AuthError"
    schema-service-genericError:
      description: See error message for details
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/schema-service-ErrorSchemaService"
